14001 Commits

Author SHA1 Message Date
Mike McQuaid
744e7dd190 Merge pull request #2679 from MikeMcQuaid/parallel-rubocop
Use parallel RuboCop
2017-05-29 19:22:46 +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
0a02d1a029 Merge pull request #2694 from reitermarkus/formatter-pluralize
Use `Formatter::pluralize` where possible.
2017-05-29 19:13:12 +02:00
Markus Reiter
d700a5ba18 Use Formatter::pluralize where possible. 2017-05-29 17:50:13 +02:00
Mike McQuaid
481a91a92d Merge pull request #2693 from MikeMcQuaid/update-test-more-tweaks
update-test: tweak more edge cases.
2017-05-29 15:44:50 +01: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
dbf10cc06e Merge pull request #2692 from MikeMcQuaid/update-test-no-tag-messaging
update-test: improve no tags found messaging.
2017-05-29 13:57:21 +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
52b54aaeb9 Merge pull request #2690 from reitermarkus/rubocop-cache
Use `XDG_CACHE_HOME` for RuboCop.
2017-05-29 02:40:49 +02: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
803f9cbf7b Merge pull request #2685 from MikeMcQuaid/more-macos-doctor
diagnostic: move some more macOS doctor checks.
2017-05-28 17:20: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
e931fee732 Merge pull request #2672 from reitermarkus/deprecate-caskroom-flag
Deprecate `--caskroom` flag.
2017-05-25 00:45:46 +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
0871e069a2 Merge pull request #2669 from reitermarkus/fix-appcast-checkpoint
Fix appcast checkpoint command.
2017-05-23 15:29:38 +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
Markus Reiter
d1f599f1ed Merge pull request #2654 from reitermarkus/refactor-cli
Refactor `CLI`.
2017-05-23 13:27:44 +02:00
Alyssa Ross
04420d07a4 Merge pull request #2666 from alyssais/patch_forwardable
patch: clean up with Forwardable
2017-05-23 10:18:56 +01:00
Alyssa Ross
b01a9b0695 patch: clean up with Forwardable 2017-05-22 20:39:17 +01:00
JCount
dd5d4880dc Merge pull request #2658 from JCount/audit-fix-versioned-aliases-homebrew-core
audit: fix versioned alias errors in homebrew/core introduced in a7c6a57
2017-05-21 21:54:17 -04:00
Markus Reiter
02a1e2781f Fix tests for CLI::Options DSL. 2017-05-22 02:51:17 +02:00