aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/global.rb
AgeCommit message (Collapse)Author
2016-10-02Use `module_function` for commands.Markus Reiter
2016-09-23Style/Alias: Prefer `alias`.Markus Reiter
2016-09-17Improve rescue nesting.Mike McQuaid
2016-09-17rubocop --auto-correct all remaining files.Mike McQuaid
But remove some manual `.freeze`s on constants that shouldn't be constants.
2016-09-16Move LinkedKegs/PinnedKegs/Locks from Library.Mike McQuaid
These don't make sense to be tied to the `HOMEBREW_REPOSITORY` but instead should live in the `HOMEBREW_PREFIX` as they all relate to its state.
2016-09-15Use constants for LinkedKegs/PinnedKegs/Locks.Mike McQuaid
These definitions are scattered throughout the codebase which makes it hard to refactor them later (my goal is to move them outside of HOMEBREW_LIBRARY). Unify their definitions for clearer code and easier movement later.
2016-08-18remove ruby 1.8 compatible codesXu Cheng
2016-08-17global: raise unless Ruby 2.Mike McQuaid
2016-08-12global: add Homebrew.raise_deprecation_exceptionsMike McQuaid
2016-07-12github: produce better curl error messages. (#441)Mike McQuaid
* global: add RUBY_TWO global variable. * test-bot: use RUBY_TWO global variable. * github: produce better curl error messages. If we don't know why curl has failed then ensure that the error messages that it produced are included as part of the user output.
2016-07-07Use GitRepositoryExtension for HOMEBREW_REPOSITORYMartin Afanasjew
2016-07-07Add GitRepositoryExtensionMartin Afanasjew
Add an extension for accessing Git-related meta data that can be mixed in into a Pathname object (e.g. `HOMBREW_REPOSITORY` or the path of a `Tap` instance). The goal here is to eliminate code duplication.
2016-07-04Revert "Revert "Test officially supported cmd taps. (#390)""Mike McQuaid
This reverts commit dba1958bd79c1c9d18f215dfc2b806ea62edd1c8.
2016-07-04Revert "Test officially supported cmd taps. (#390)"Martin Afanasjew
This reverts commit 252c701c59227c385ef6178fe99523cca8c843bb. Taps installed prior to running the test suite are not visible to the test suite as most Homebrew paths are redefined as to not mess up the local installation.
2016-07-04Test officially supported cmd taps. (#390)Mike McQuaid
All of these taps use Homebrew internal APIs (or will shortly) and we autoinstall them all from `brew $CMD`. We should adjust our CI to ensure that we never accidentally break these taps when making changes to core code so that these taps can rely more on this core code rather than having to e.g. vendor equivalent code that never changes on our end.
2016-06-03Use `curl` for the GitHub API (#295)Mike McQuaid
* Move GitHub API module to utils/github.rb. * Move curl method to utils/curl.rb. * global: use long curl arguments and an array. This makes the code more self-documenting. * utils/curl: support reading curl's output. * utils/github: use curl instead of open-uri. It has far better proxy support. * pull: set Homebrew user agent. * gist-logs: remove trailing whitespace. * gist-logs: use first instead of [0]. Easier to read. * gist-logs: use curl-based GitHub.open method.
2016-05-26HOMEBREW_CURL_ARGS: add -R to preserve remote timestampXu Cheng
Reference from `man curl` > -R, --remote-time > When used, this will make curl attempt to figure out the time- > stamp of the remote file, and if that is available make the > local file get that same timestamp.
2016-04-12Homebrew (opt-in) Analytics tweaks. (#57)Mike McQuaid
- add `HOMEBREW_PRODUCT` global variable - only differentiate between `/usr/local` and `non-/usr/local` Homebrew prefixes to avoid sharing sensitive user information - note if e.g. build errors are occurring under CI - Add `HOMEBREW_NO_ANALYTICS` variable (this will be how people opt-out when this is enabled for everyone) - Add `HOMEBREW_ANALYTICS_DEBUG` variable to output all the analytics that are sent - Move Bash analytics code to `Library/Homebrew/utils/analytics.sh` - Add documentation for our analytics and why/what/when/how and opt-out - Only official Homebrew commands are reported - Ruby analytics are now reported in a forked, background process
2016-04-04Make Homebrew user agent consistent, use a slash.Mike McQuaid
Generally it seems user agents are all `software/version` but ours is not. Also, set the user agent in a way that it's shared between Bash and Ruby code. Closes https://github.com/Homebrew/legacy-homebrew/pull/50480.
2016-04-02audit/test-bot/pull: fix for core/formula separationXu Cheng
All formulae are in taps now.
2016-03-11Fix `brew update` user agent.Mike McQuaid
This needs to be `Homebrew $HOMEBREW_VERSION` so we can be adequately filtered. Closes Homebrew/homebrew#49961. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-03-08Set HOMEBREW_API_TOKEN from Git when available.Mike McQuaid
As requested in Homebrew/homebrew#46578. Falls back to existing functionality. Closes Homebrew/homebrew#46578. Closes Homebrew/homebrew#49846. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-02-15Move internal command aliases from Ruby to Bash.Mike McQuaid
This means that internal command aliases can be used for Bash commands (such as the new, Bash-based `brew update`). Fixes Homebrew/homebrew#49182. Closes Homebrew/homebrew#49184. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-12-13pull: use tap objectXu Cheng
Fix the regression introduced by Homebrew/homebrew#46735.
2015-10-18MacOS: full_version addedBaptiste Fontaine
Closes Homebrew/homebrew#44988. Signed-off-by: Xu Cheng <xucheng@me.com>
2015-08-06backport flat_map for Ruby 1.8Xu Cheng
Code is copied from https://github.com/marcandre/backports/blob/master/lib/backports/1.9.2/enumerable/flat_map.rb (MIT License by Marc-Andre Lafortune) Closes Homebrew/homebrew#42543. Signed-off-by: Xu Cheng <xucheng@me.com>
2015-08-03Core files style updates.BrewTestBot
Closes Homebrew/homebrew#42354. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-07-03add `brew command`Xu Cheng
Closes Homebrew/homebrew#41034. Signed-off-by: Xu Cheng <xucheng@me.com>
2015-06-19Remove backports for Ruby 1.8.6Jack Nagel
refs. Homebrew/linuxbrew#438, mistydemeo/tigerbrew#327, mistydemeo/tigerbrew#334
2015-06-16"Mac OS X" -> "OS X" in copyJack Nagel
2015-04-29Extract runtime configuration from global.rbJack Nagel
This allows global.rb to be safely loaded in the test environment.
2015-04-21Inline error messageJack Nagel
2014-12-08Document Formula attributes.Mike McQuaid
The beginnings of some decent API documentation. Also, tweak `.yardopts` to better fix our internal style.
2014-07-21Ruby 1.8 doesn't have the \h regexp metacharacterJack Nagel
2014-07-19Improve pull request URL regexpJack Nagel
- use a regexp literal and avoid escaping forward slashes - escape the period in "github.com" - match only hex characters in the commit part - allow hyphen in usernames and repo names, matching what we allow for tap names - avoid unnecessary capture
2014-07-12Linuxbrew: Move ISSUES_URL to os from globalShaun Jackman
Closes Homebrew/linuxbrew#103 Closes Homebrew/homebrew#30830. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-07-06Give the cache the same permissions as the installer doesJack Nagel
2014-07-06Extend with a module instead of aliasing on the singleton classJack Nagel
2014-07-06Remove inaccurate commentJack Nagel
2014-06-19Only "extend self" once on the Homebrew moduleJack Nagel
2014-06-09Use RbConfig.ruby if it's availableJack Nagel
2014-06-07Eliminate FORMULA_META_FILES constantJack Nagel
2014-05-14Taps: cleanup regexps around TapsTsukasa OMOTO
Closes Homebrew/homebrew#29139. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-05-03The \w character class already includes underscoreJack Nagel
Newer versions of Ruby issue a warning for repeated character classes.
2014-04-24Make the on-disk representation of taps unambiguousTsukasa OMOTO
This commit supports "-" and "_" in names of user and repository. Closes Homebrew/homebrew#28203. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-12-14Update string references to mxcl/homebrew.Mike McQuaid
2013-12-14Extract HOMEBREW_TEMP constantJack Nagel
2013-10-31Allow configuring HOMEBREW_LOGS.Mike McQuaid
2013-10-30Cleanup use of some global constants.Mike McQuaid
2013-10-30global: add more tap regexes.Mike McQuaid