891 Commits

Author SHA1 Message Date
Shaun Jackman
3c4f9c746e Elide prefix "/usr/local" in bottle block
brew test-bot --ci-upload is run on a Linux machine.
The macOS bottles have a prefix of "/usr/local".
The default prefix on Linux is /home/linuxbrew/.linuxbrew.
Elide prefix "/usr/local" in the bottle block, even it does not match
the default prefix. Ditto for cellar.
2018-09-11 14:21:33 -07:00
Shaun Jackman
f6093961ef Add Homebrew::DEFAULT_PREFIX for Linux
The default prefix is /usr/local on macOS
and /home/linuxbrew/.linuxbrew on Linux.
2018-09-11 09:57:08 -07:00
Mike McQuaid
1fe8cf7079
Merge pull request #4858 from cblecker/bump-pr-protocol
Determine remote_url using git config
2018-09-09 15:18:49 +01:00
Christoph Blecker
5f18f0bb03
Determine remote_url using git config 2018-09-07 11:08:35 -07:00
Markus Reiter
072127197a Check for range support instead of rescuing error. 2018-09-06 16:25:22 +02:00
Mike McQuaid
c6b6fc678e
dev-cmd/edit: simplify project view handling.
The way Homebrew is structured now there’s no need to manually
specify a few different directories here.
2018-09-06 12:31:29 +01:00
William Woodruff
eacdca872e
Merge pull request #4819 from woodruffw/error-pipe
utils: Use JSON to marshal child errors
2018-09-04 21:02:29 -04:00
William Woodruff
367629d289
utils: Use JSON to marshal child errors
Replaces our serialization of child process
errors via Marshal with JSON, preventing
unintentional or malicious code execution outside
of the build sandbox.

Additionally, adds tests for the new behavior.
2018-09-04 11:03:32 -04:00
Mike McQuaid
90b3a13909
cask: move cask/lib/hbc/* to cask/*.
Fix the load path, requires and some filenames accordingly.
2018-09-04 09:56:57 +01:00
Mike McQuaid
088730c6f1
Revert "Use JSON to marshal errors from children" 2018-09-04 08:37:08 +01:00
William Woodruff
86b9647450
utils: Use JSON to marshal child errors
Replaces our serialization of child process
errors via Marshal with JSON, preventing
unintentional or malicious code execution outside
of the build sandbox.

Additionally, adds tests for the new behavior.
2018-09-03 18:42:59 -04:00
Mike McQuaid
80d75bc0d8
Homebrew/.rubocop: tweak rules.
Adjust the rules based on the current codebase. Remove various enable,
disables and default values that are unnecessary. Add more comments
explaining why. Make minor changes needed to enable a few more rules.
2018-09-02 20:15:09 +01:00
Mike McQuaid
bcb1ec5499
Improve Homebrew/brew line length.
Use 124 max line length everywhere. Also, reduce tap max line length to
189 as Homebrew/homebrew-core has that as a maximum now. In future
Homebrew/homebrew-core will also be reduced to 124 maximum line length.
2018-09-02 16:15:09 +01:00
Mike McQuaid
c46cecf277
tests: set HOME.
This is the only way to override the user's Git configuration which can
break tests when e.g. `gpg` cannot be found but signing is requested.
2018-09-02 12:56:31 +01:00
Markus Reiter
fbcaa8c85a Resolve URL to get real file extension. 2018-08-31 16:51:23 +02:00
Gautham Goli
32bc5535b6
style: Fix npe and add test for corrected offense results 2018-08-28 23:31:35 +05:30
Gautham Goli
5d2ca08a93
audit: Use fetch with default value prevent NPE 2018-08-28 13:16:44 +05:30
Gautham Goli
23846d6ca8
audit: Add null check on style results 2018-08-27 19:50:11 +05:30
Gautham Goli
3705956f53
Merge pull request #4753 from GauthamGoli/autocorrect-count
audit: Show RuboCop offense correction status and count in output
2018-08-26 23:55:17 +05:30
Gautham Goli
b82dbdcfa8
audit: Show RuboCop offense correction status in output when --fix is passed 2018-08-26 19:33:19 +05:30
Mike McQuaid
9bc17c8a82
Merge pull request #4563 from alebcay/extract
Add new extract dev command to retrieve old versions of formulae
2018-08-26 12:59:50 +01:00
Caleb Xu
b1120dd404 extract: check if DependencyCollector::Compat is defined before monkey-patch 2018-08-26 02:22:09 -04:00
Caleb Xu
ad0f9d603f extract: localize DependencyCollector monkey-patches too 2018-08-25 19:52:22 -04:00
Caleb Xu
bd352bcf35 extract: use localized monkey-patching
Instead of just blanketing over with monkey-patches like before,
set up monkey-patches as needed, and make sure to clean up after
we're done.
2018-08-25 14:52:30 -04:00
Caleb Xu
a8563afc9e extract: add progress message when searching Git history
For the impatient ones out there.
2018-08-25 13:40:57 -04:00
Caleb Xu
ff2ce2f093 extract: better success message
Fixes the empty rev string when copying file from HEAD; explicitly
set rev to HEAD in that case.
2018-08-25 13:35:08 -04:00
Caleb Xu
d4a2006f04 extract: add missing monkey-patch 2018-08-25 13:33:25 -04:00
Caleb Xu
be0cd21d0f extract: explicitly load cli_parser 2018-08-25 10:58:13 -04:00
Caleb Xu
1e4cd780c3 extract: fix style 2018-08-25 10:49:06 -04:00
Caleb Xu
a232e3a791 extract: fix corner case
If the formula to be retrieved was just version-bumped in the most
recent commit (HEAD), we would've ended up grabbing the second-most
recent version.

Instead, if the file already exists in tree at the current commit,
just construct the formula from that to get the version (for naming
purposes) and copy the file outright to its new location.
2018-08-24 11:38:14 -04:00
commitay
e0c3ea7474 audit: remove "bottle is not defined" 2018-08-23 11:06:35 +10:00
Steven Peters
26e1d17b4d dev-cmd/bottle: save local_filename to json 2018-08-22 01:30:18 -07:00
Caleb Xu
0552dcff62 extract: accept tap as a non-flagged argument 2018-08-21 10:17:23 -04:00
Caleb Xu
6018968f91 Further collapse monkeypatches 2018-08-21 10:17:23 -04:00
Caleb Xu
713aedb6ed Fix code review requests 2018-08-21 10:17:23 -04:00
Caleb Xu
260867627b Switch back to monkey-patching
Also gsub! some particular formula contents to work around older
formulae ("brewkit" isn't around anymore, and url is expected to
be a method, not an instance variable).
2018-08-21 10:17:23 -04:00
Caleb Xu
95abdf9662 Use refinements instead of general monkey-patching 2018-08-21 10:17:23 -04:00
Caleb Xu
ff8b5f8c5a extract: rework to search through old/deleted formulae
- Removed use of FormulaVersions - it's generally too brittle for our uses. We
  now interface directly with the Git repo via utils/git and monkeypatch the
  formula loading process where needed.

- Really old formulae (that specify fields as instance vars instead of methods)
  still need more work to be supported; they don't work here quite yet.

- Properly handles deleted/removed formulae from Homebrew/homebrew-core.
  Additional work is still needed to search through Homebrew/legacy-homebrew if
  this functionality is desired.
2018-08-21 10:17:23 -04:00
Caleb Xu
1003aa72c9 Additional fixups for extract command
- Rework command line options
- Make specifying a version optional
- Remove stdout option and require a tap to be specified
- Do not allow user to extract into homebrew/core
- Rework new class name generation to use existing Formulary tools
2018-08-21 10:17:23 -04:00
Caleb Xu
bd2ac70c0f Fix style issues in extract command 2018-08-21 10:17:23 -04:00
Caleb Xu
055460884b Fix up extract command
- Move from cmd to dev-cmd
- Add --stdout flag
- Add sanity checks for args/flags
- Minor rewording on error messages
2018-08-21 10:17:23 -04:00
Mike McQuaid
7df5b7057e
Revert "Use JSON to marshal errors from children" 2018-08-18 08:20:13 +01:00
William Woodruff
5c90833f0a
Use JSON to marshal errors from children 2018-08-17 15:23:08 -04:00
Jonathan Chang
2487345460 audit: fixes for test checks 2018-08-16 12:43:13 -04:00
Markus Reiter
55cde526a8 Deprecate brew cask cleanup. 2018-08-13 20:09:34 +02:00
Dominyk Tiller
20311aec15
audit: flag redundant shell_output() exit codes 2018-08-11 01:53:00 +01:00
Markus Reiter
771cf49352 Remove executable bit from ruby.rb and prof.rb. 2018-08-08 21:13:57 +02:00
Chongyu Zhu
3bce1c78bc
Merge pull request #4630 from lembacon/obsolete-github-env
Remove environment variables used by `hub`.
2018-08-09 00:01:09 +08:00
Mike McQuaid
daa3e415d6 Add/remove more maintainers.
And remove the Homebrew/homebrew-core lead maintainer role.
2018-08-08 09:41:26 +01:00
Chongyu Zhu
bd5b41ed94
Remove environment variables used by hub.
As of #3870, this is no longer needed.
2018-08-08 12:27:41 +08:00