aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/utils
AgeCommit message (Collapse)Author
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.
2016-04-16analytics: add more documentation, Linuxbrew ID. (#98)Mike McQuaid
2016-04-12Document disabling of opt-in Homebrew analytics. (#79)Mike McQuaid
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-07analytics: avoid unnecessary string interpolationMartin Afanasjew
2016-04-07always prefer HOMEBREW_CURL over plain 'curl'Martin Afanasjew
2016-04-04utils/analytics: fix usage of undefined variable.Carlos D'Agostino
2016-04-04utils: add analytics functions.Mike McQuaid
2016-04-02git: check homebrew/core existence before installing brewed gitXu Cheng
2016-03-21utils/git: various improvementXu Cheng
* Use `ENV/scm/git` to check whether git is installed. * Use `brew install git` to enforce pre-install checks such as sudo check.
2015-12-26Revert "minor perf improvements"Baptiste Fontaine
This reverts commit 16a2a8274a7808e63a6c78475e12a7c0ef5812ef.
2015-12-26minor perf improvementsBaptiste Fontaine
Closes Homebrew/homebrew#47224. Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-09-09FormulaInstaller: reset git_available? when installing gitXu Cheng
Closes Homebrew/homebrew#43693 Signed-off-by: Xu Cheng <xucheng@me.com>
2015-09-09doctor: use Utils.git_available? instead of git?Xu Cheng
2015-09-09git_available?: cache the resultXu Cheng
2015-09-02add git utilsXu Cheng
Two methods: * `Utils.git_available?` checks whether git is installed. * `Utils.ensure_git_installed!` installs git for users who don't install Xcode or CLT.
2015-08-29More API documentation.Mike McQuaid
And remove the documented stuff from the `example-formula.rb`. Closes Homebrew/homebrew#43241. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-03Core files style updates.BrewTestBot
Closes Homebrew/homebrew#42354. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-05-12Close the socket after sending the file descriptor to the childJack Nagel
Fixes Homebrew/homebrew#39691.
2015-04-28The forked build process should never run at_exit handlersJack Nagel
We don't use at_exit anywhere that matters, but the test framework does.
2015-04-25Keep subprocess code inside begin blockJack Nagel
2015-04-25Clean up socket and filesystem resources separatelyJack Nagel
2015-04-15move safe_fork into a standalone methodXu Cheng
2014-09-28Make inreplace errors fatalJack Nagel
Closes Homebrew/homebrew#32649. Closes Homebrew/homebrew#32703.
2014-07-11Read if no block is passed to Utils.popen_readJack Nagel
2014-07-05Add popen wrapper that does not invoke the shellJack Nagel
2014-06-18Expose inreplace as a class methodJack Nagel
2014-03-26Replace files atomically in inreplaceJack Nagel
2014-03-26Drop intermediate variableJack Nagel
2013-11-12inreplace: odie for Homebrew developers.Mike McQuaid
2013-09-17inreplace: Open the file as binaryShaun Jackman
Closes Homebrew/homebrew#22628. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-08-17let inreplace take a symbolJason Whittle
As discussed in https://github.com/mxcl/homebrew/pull/21936 Closes Homebrew/homebrew#21942. Signed-off-by: Adam Vandenberg <flangy@gmail.com>