12095 Commits

Author SHA1 Message Date
Misty De Meo
587f338daa
vendor-install: use Ruby as a sha256 fallback
But still prefer shasum/sha256sum where present.
2017-05-30 18:48:55 -07:00
Misty De Meo
a40291ee4a
Pathname: use Digest::SHA256 alias
Digest::SHA2 wasn't exposed under that name in older versions of Ruby.
2017-05-30 18:30:16 -07:00
Mike McQuaid
90c971625e Merge pull request #2704 from MikeMcQuaid/jenkins-brew-sh
Update jenkins.brew.sh links.
2017-05-30 20:28:50 +01:00
Mike McQuaid
9032574038 Update jenkins.brew.sh links.
These previously, incorrectly pointed to bot.brew.sh.

Fixes #2703.
2017-05-30 19:14:40 +01:00
Bob W. Hogg
e2c707d8b1 Stdenv: Add ENV.libxml2 and ENV.x11 for Linux
Add ENV.libxml2 primarily for the use of test do blocks.
Add a dummy ENV.x11 function.

See Linuxbrew/brew#356 and Linuxbrew/brew#382
2017-05-30 10:37:26 -07:00
Gautham Goli
cfbdc17cb7 Use relevant methods to consolidate logic in text_cop.rb 2017-05-30 15:28:05 +05:30
Gautham Goli
88f21b84f4 Refactor and add more methods in formula_cop.rb 2017-05-30 15:28:05 +05:30
Gautham Goli
51f2338dd5 audit: Port audit_text method to rubocop and add tests 2017-05-30 15:28:05 +05:30
Gautham Goli
5b97a8f2e1 Add methods in FormulaCop to find method nodes, dependency nodes 2017-05-30 15:28:05 +05:30
Mike McQuaid
28cd0d3856 Fix Linux build
Remove `testbottest` formula (this should have lived in the `brew
test-bot` repository from the outset) and make various other changes to
fix the Linux build here.
2017-05-30 09:51:06 +01:00
Mike McQuaid
2f97b0ae55 Merge pull request #2695 from MikeMcQuaid/pin-bundler-version
tests: install specific Bundler version.
2017-05-30 07:44:24 +01:00
Misty De Meo
2bca6fb338 check_non_libraries: fix false positive subdirectory reports 2017-05-29 16:49:21 -07:00
Mike McQuaid
2cbbdb51bf tests: install specific Bundler version.
Otherwise `brew tests` fails with the latest. See the failing
Homebrew/homebrew-test-bot `master` build as an example.
2017-05-29 20:52:17 +01:00
Mike McQuaid
7a38bab333 Fixup all RuboCop warnings. 2017-05-29 18:43:18 +01:00
Mike McQuaid
4356016b4a Use parallel RuboCop
This requires updating to Rubocop 0.49.0 which will require some fixes
to rules, in Homebrew/brew and Homebrew/homebrew-core but opening this
for now so I remember.
2017-05-29 18:42:02 +01:00
Markus Reiter
3165fd2519 Merge pull request #2663 from reitermarkus/lockfile
Convert `FormulaLock` to more generic `LockFile`.
2017-05-29 19:27:58 +02:00
Markus Reiter
d700a5ba18 Use Formatter::pluralize where possible. 2017-05-29 17:50:13 +02:00
Mike McQuaid
d7e2d5be36 update-test: tweak more edge cases.
Don't try to `fetch --depth=1` unless we've confirmed the repository is
already shallow. Otherwise this can discard history from a full clone.

Additionally, if the repository wasn't shallow but there's no tags found
assume that Git is too old and try a naive sort if on Linux where `sort`
is able to sort versions.
2017-05-29 15:13:08 +01:00
Mike McQuaid
224d2c21ca update-test: improve no tags found messaging.
Currently you just get `Could not find start commit!` which is not as
explicit as it could be.
2017-05-29 10:06:04 +01:00
Mike McQuaid
c2cb2c7868 Merge pull request #2682 from MikeMcQuaid/improve-installed-messaging
Improve some `brew install` messaging.
2017-05-29 09:15:15 +01:00
Mike McQuaid
da39db01a2 Merge pull request #2687 from issyl0/fix_formula_description_regex
Match the "formula name in description" on word boundaries
2017-05-29 08:06:27 +01:00
Markus Reiter
dc4f303937 Remove unused popen_read_text method. 2017-05-29 01:45:05 +02:00
Markus Reiter
54c4580871 Use XDG_CACHE_HOME for RuboCop. 2017-05-29 01:31:38 +02:00
Isabell Long
279a4df6c3 Match the "formula name in description" on word boundaries
- The regexp for the "check if formula name is used in formula's
  description" cop matches every instance of the formula name if it
  exists, whether it's in a word or not.
- For example, the formula `mon` has the description "Monitor
  hosts/services/whatever and alert about problems". This makes
  `brew audit --strict` complain because it matches "Monitor",
  which isn't the formula name! The formula `pass` has the description
  "Password manager".  Again, the strict audit matches "Password",
  which isn't an issue.
- Instead, this change matches on a word boundary, so it will match
  `mon:`, or `mon `, but not "Monitor", or, for example, "harmony".
- I've changed the tests to account for this change.
2017-05-29 00:26:47 +01:00
Mike McQuaid
945cfc7cb7 diagnostic: move some more macOS doctor checks.
Move some `brew doctor` checks that are pretty macOS specific so they
are only run on macOS.
2017-05-27 13:34:59 +01:00
Mike McQuaid
ef59a751f4 Improve some brew install messaging.
Improve the messaging around `brew install` when there's a possible user
action such as an `upgrade` or `link` and don't tell people to
`install --force` when it's unnecessary.

While I did this, tweak the output and function usage in a couple of
related places.

Some example output before this change:
```
Warning: openssl is a keg-only and another version is linked to opt.
Use `brew install --force` if you want to install this version
Warning: mysql@5.6 is a keg-only and another version is linked to opt.
Use `brew install --force` if you want to install this version
Warning: analog-6.0_1 already installed
Warning: bash-completion@2-2.5 already installed, it's just not linked.
```

Some example output after this change:
```
Error: openssl 1.0.2k is already installed
To upgrade to 1.0.2l, run `brew upgrade openssl`
Warning: mysql@5.6 5.6.36_1 is already installed
Warning: analog 6.0_1 is already installed
Warning: bash-completion@2 2.5 is already installed, it's just not linked.
You can use `brew link bash-completion@2` to link this version.
```
2017-05-27 10:15:37 +01:00
Misty De Meo
fb33acbbe4 Merge pull request #2624 from mistydemeo/use_python_flock
Use Python's flock instead of Ruby's
2017-05-25 11:48:15 -07:00
Markus Reiter
fd97e88b99 Use LockFile instead of Hbc::Utils::file_locked?. 2017-05-25 06:18:52 +02:00
Markus Reiter
060af0a26a Rename FormulaLock to LockFile. 2017-05-25 06:18:52 +02:00
Markus Reiter
68a513083e Also move --binarydir to compat/*. 2017-05-24 23:54:36 +02:00
Markus Reiter
0bb2773b17 Deprecate --caskroom flag. 2017-05-24 23:54:36 +02:00
Markus Reiter
a3e30a11d1 Merge pull request #2678 from reitermarkus/fix-cli-default-options
Fix cli default options.
2017-05-24 22:14:52 +02:00
Misty De Meo
c6c8725f1b Merge pull request #2675 from mistydemeo/vendor_compatibility_fixes
Vendor compatibility fixes
2017-05-24 13:09:34 -07:00
Markus Reiter
b91d0254bb Add test for --binaries default value. 2017-05-24 20:34:20 +02:00
Markus Reiter
d025e0e7ab Fix --binaries not using default value. 2017-05-24 20:16:09 +02:00
Tim D. Smith
8db2998819 Merge pull request #2598 from tdsmith/relocate-virtualenv-orig-prefix
Relocate virtualenv orig-prefix
2017-05-24 10:41:47 -07:00
Misty De Meo
67dc3323ed
lock: simplify ruby conditional 2017-05-24 09:12:21 -07:00
Misty De Meo
7c7a0fc720
brew.sh: don't call xcode-select if it doesn't exist 2017-05-23 18:42:19 -07:00
Misty De Meo
6453c81dac
vendor-install: fix array syntax for old bash 2017-05-23 18:39:35 -07:00
Misty De Meo
b8fee7fe4d
vendor-install: check -x on output of which
This works around older versions of `which`, which return a
string on failure.
2017-05-23 18:36:25 -07:00
Misty De Meo
94ed3e3583
lock: check tools are executable 2017-05-23 18:36:06 -07:00
Misty De Meo
129ee966f8 Optionally use Python's flock instead of Ruby's
Ruby first gained flock in 1.8.7, which is a problem since we're using
this lock utility in `vendor-install` in order to install a newer Ruby.

Fortunately, Python 2.3(!) has flock support.
2017-05-23 17:50:22 -07:00
Markus Reiter
fdd9972aa7 Merge pull request #2670 from reitermarkus/fix-uninstall-order
Fix `uninstall` order.
2017-05-23 18:46:48 +02:00
Vítor Galvão
b7cfd5e30d Merge pull request #2671 from reitermarkus/manpage-sudo-askpass
Add `SUDO_ASKPASS` to `brew-cask` manpage.
2017-05-23 17:06:26 +01:00
Mike McQuaid
457fdc4abb Merge pull request #2668 from reitermarkus/fix-audit-checksum
Fix `previous_version_and_checksum` method.
2017-05-23 17:00:01 +01:00
Markus Reiter
4bfd94cb30 Add SUDO_ASKPASS to brew-cask manpage. 2017-05-23 16:01:13 +02:00
Markus Reiter
38b5e4254b Fix uninstall order. 2017-05-23 15:37:55 +02:00
Markus Reiter
45496f3156 Remove cask_tokens_from method. 2017-05-23 14:58:03 +02:00
Markus Reiter
cc295601c7 Fix undefined cask_tokens method. 2017-05-23 14:57:51 +02:00
Markus Reiter
f4bacb4444 Fix previous_version_and_checksum method. 2017-05-23 14:11:34 +02:00