aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/utils
AgeCommit message (Collapse)Author
2016-09-05Utils::Shell: convert to use module_functionMisty De Meo
2016-09-04Merge pull request #201 from gregory-nisbet/feature-env-shellsMike McQuaid
--env: support more shells, allow explicit shell selection
2016-08-29bottles: translate foo@1.2 to foo:1.2Dominyk Tiller
2016-08-17utils/curl: assume Ruby 2.Mike McQuaid
2016-08-10move shell_profile to compat/utils.rb & deprecateGreg Nisbet
2016-08-10tests for shell-specific diagnostic messageGreg Nisbet
2016-08-10Multi-shell diagnostic checkGreg Nisbet
2016-08-10resolve conflict in diagnostic.rbGreg Nisbet
2016-08-10Enable vendored Ruby 2.0.Mike McQuaid
2016-08-09utils/analytics.sh: tweak output in debug modeMartin Afanasjew
Avoid some duplication (thereby also shortening line length) and put everything in a single string for output via `echo`.
2016-08-09analytics.rb: URL encode reported data.Mike McQuaid
2016-08-09analytics.*: use curl --data for readability.Mike McQuaid
2016-08-09analytics.*: output curl command in debug mode.Mike McQuaid
2016-08-08utils/analytics.sh: fix style inconsistenciesMartin Afanasjew
2016-08-05various: eliminate the usage of `any?` (#638)Xu Cheng
`any?` is not the opposite of `empty?`. Besides the case that `[false, nil].any?` will return false, `any?`(O(n)) has much worse performance than `empty?`(O(1)).
2016-07-29utils/bottles: don't rely on tar wildcards, location.Mike McQuaid
This doesn’t work quite as-is on Linux’s GNU tar.
2016-07-27bottles: more porting to generic layer.Mike McQuaid
2016-07-27utils/github: fix reverted order of credentialsMartin Afanasjew
We always return the token/password first and, if applicable, the user name is the second element in the returned array. Closes #581. Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-07-27utils/github: fix broken pipe errorMartin Afanasjew
Closes #573.
2016-07-24analytics.sh: use full uuidgen path on OS X.Mike McQuaid
Fixes #575.
2016-07-18inreplace: support for audit arg in non-block formilovezfs
Provides feature parity between the block and non-block forms of inreplace by creating a four-argument version of the non-block form, where the fourth argument is an optional Boolean value, defaulting to true, which specifies whether a failed inreplace should cause an InreplaceError error to be raised. The fourth argument is passed along to StringInreplaceExtension#gsub!, which already supports an optional audit_result argument. This resolves the Catch-22 that single replacements aren't permissible in the block form (in that they now cause `brew audit` to complain), but the audit_result argument is not available in the non-block form. Closes #552. Signed-off-by: ilovezfs <ilovezfs@icloud.com>
2016-07-15ENV: move to new paths. (#507)Mike McQuaid
Move some stuff formerly in `Library/ENV` around: - Move `Library/ENV/$XCODE_VERSION` to `Library/Homebrew/env/super` as they are all superenv wrappers and all symlinks to the same version. We never needed the "separate shims for separate versions" functionality and it just adds confusion. - Move `Library/ENV/pkgconfig` to `Library/Homebrew/env/pkgconfig` to get more things under `Library/Homebrew` - Move `Library/ENV/scm` to `Library/scm` as these wrappers are not actually used by or related to superenv (or stdenv) in any way.
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-12ruby.sh: allow forcing the usage of the vendored Ruby.Mike McQuaid
2016-07-12ruby.sh: fix original setup ruby path name.Mike McQuaid
2016-07-11ruby.sh: add test flagXu Cheng
2016-07-11brew.sh: new HOMEBREW_RUBY_PATH resolution logicXu Cheng
* Use vendor Ruby if it's present * Install vendor Ruby for system without Ruby 2.x
2016-07-03gist-logs: close temp file before passing to curl (#418)Andrew Janke
Ensures that the data gets written to disk so curl can see it, avoiding intermittent JSON parsing errors in gist creation.
2016-06-29utils/lock.sh: remove redundant 'local'Martin Afanasjew
2016-06-29analytics: make Linux UUID generation more robustMartin Afanasjew
Not every Linux system has a pre-installed `uuidgen` command (Debian has a package `uuid-runtime` but doesn't install it by default). In contrast, `/proc/sys/kernel/random/uuid` is always available on a modern Linux system and produces type/version 4 UUIDs, just like `uuidgen`. Closes #416. Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-06-29analytics: handle UUID generation errorsMartin Afanasjew
Avoid writing an empty UUID to the Git configuration file and disable analytics temporarily to avoid sending bogus data with an invalid UUID.
2016-06-19utils/git: provide git_path and git_versionMartin Afanasjew
2016-06-08introduce global lock directory (#337)Xu Cheng
Since #292, HOMEBREW_CACHE was moved to a per-user directory. This makes it unsuitable to store global lock files on multiple users environment. Therefore, introducing a global lock directory `/Library/Lock.d` to store lock files from formula lockers as well as `brew update`.
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-06-01Prefer $stderr over STDERR for consistency (#304)Martin Afanasjew
Prior to this change there were only 3 instances of `STD(IN|OUT|ERR)` versus 74 instances of `$std(in|out|err)` in the Homebrew code base. The latter variant is also strongly suggested by bbatsov's Ruby Style Guide.
2016-05-28bottle/test-bot: deep merge bottle JSON hashes.Mike McQuaid
2016-05-23utils/lock.sh: default to system Ruby if available (#271)Mike McQuaid
This avoids weird issues with custom Rubies. Closes #253.
2016-05-12add utils/lock.shXu Cheng
a Bash implementation of lock using `flock(2)`.
2016-05-08utils/bottles: fix Regexp escaping for Ruby 1.8Martin Afanasjew
Make sure `Regexp.escape` gets a string as Ruby 1.8 is unable to convert the symbol to a string automatically. Related to changes from #168.
2016-05-08Make bottle code cross-platform.Mike McQuaid
2016-05-04Don't report cask to analytics.Mike McQuaid
2016-05-03analytics: move to a class. Mike McQuaid
Global namespaces are good to avoid when possible.
2016-05-01add `brew analytics` command (#173)Xu Cheng
2016-04-30analytics: relocate UUID to homebrew.analyticsuuid in .git/configZhiming Wang
This way analytics related settings and parameters (currently analyticsdisabled, analyticsmessage and analyticsuuid) are all kept in the same place. Note that in this commit we offer a path of migration: if ~/.homebrew_analytics_user_uuid already exists, read the UUID from it, write to homebrew.analyticsuuid, and remove it. See more detailed discussions in #145. Closes #162. Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-04-26Analytics: Separate user-supplied and internal-use DISABLE_ANALYTICS (#155)Andrew Janke
This prevents `brew` self-calls from interacting with the stickiness of HOMEBREW_NO_ANALYTICS being persisted to the brew repo and accidentally disabling analytics permanently when it should have been for just one run, while restoring the stickiness of an explicit user-supplied HOMEBREW_NO_ANALYTICS.
2016-04-26fix setup-analytics (#154)Xu Cheng
DO not invoke git config because HOMEBREW_NO_ANALYTICS, otherwise it will disable analytics for everyone when running `brew update` in following manners: * `brew update` will set HOMEBREW_NO_ANALYTICS because the absence of `homebrew.analyticsmessage` * `brew update-report` will set `homebrew.analyticsdisabled` because of HOMEBREW_NO_ANALYTICS. Also reduce file IO.
2016-04-25More analytics tweaks.Mike McQuaid
Provide a single command that can be run to disable analytics, run it if `HOMEBREW_NO_ANALYTICS` is ever set and remove the user UUID file in that case too. References https://github.com/Homebrew/brew/issues/142.
2016-04-23Ship analytics for Homebrew.Mike McQuaid
For more information and opt-out instructions please read: https://github.com/Homebrew/brew/blob/master/share/doc/homebrew/Analytics.md#analytics
2016-04-21brew-audit: pull style checks in to main audit outputAndrew Janke
This collects all violations for each formula in a single place, instead of doing `brew style` outputs for all formulae first, and then the other audit checks. Closes #112. Signed-off-by: Andrew Janke <andrew@apjanke.net>
2016-04-21analytics: roll tracking ID.Mike McQuaid
Someone else has been sending weird data to ours and it has bad initial test data so let's roll it before we ship it to everyone on Saturday.