| Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
I wasn’t aware this existed when I created puts_hash so: may as well
remove it.
|
|
Fix those that can be done so without tearing Homebrew to pieces and
remove the comments for those that can never be done.
|
|
|
|
Hide these tokens to avoid malicious subprocesses e.g. sending them
over the network. Also, support using these tokens with environment
filtering and clear `HOMEBREW_PATH` from subprocesses to stop them
sniffing it. Finally, use `HOMEBREW_PATH` to detect Homebrew’s user’s
PATH for e.g. `brew doctor` etc.
|
|
If `brew instal` is permissible, `brew uninstal` should be, too.
|
|
|
|
Try first with an (exact, actual) browser user agent from Safari and
then try again with the default Homebrew `curl` user agent.
|
|
This allows us to detect if homepages such as e.g. `aiccu` which
blocks `curl` are up or not.
|
|
Allow configuring whether output should be shown or the default the
default user agent is used.
|
|
|
|
|
|
|
|
|
|
But remove some manual `.freeze`s on constants that shouldn't be
constants.
|
|
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.
|
|
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.
|
|
|
|
|
|
|
|
* 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.
|
|
|
|
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.
|
|
This reverts commit dba1958bd79c1c9d18f215dfc2b806ea62edd1c8.
|
|
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.
|
|
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.
|
|
* 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.
|
|
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.
|
|
- 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
|
|
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.
|
|
All formulae are in taps now.
|
|
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>
|
|
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>
|
|
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>
|
|
Fix the regression introduced by Homebrew/homebrew#46735.
|
|
Closes Homebrew/homebrew#44988.
Signed-off-by: Xu Cheng <xucheng@me.com>
|
|
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>
|
|
Closes Homebrew/homebrew#42354.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
|
|
Closes Homebrew/homebrew#41034.
Signed-off-by: Xu Cheng <xucheng@me.com>
|
|
refs. Homebrew/linuxbrew#438, mistydemeo/tigerbrew#327,
mistydemeo/tigerbrew#334
|
|
|
|
This allows global.rb to be safely loaded in the test environment.
|
|
|
|
The beginnings of some decent API documentation.
Also, tweak `.yardopts` to better fix our internal style.
|
|
|
|
- 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
|