258 Commits

Author SHA1 Message Date
Markus Reiter
dcf5d8d79b Add test for migrate_cache_entries_to_double_dashes. 2018-08-05 20:38:50 +02:00
Markus Reiter
1003d722bd Use -- to separate download name and version. 2018-08-05 15:57:28 +02:00
Markus Reiter
7762ce32aa Use more descriptive heredoc names. 2018-07-11 18:15:30 +02:00
Mike McQuaid
7cc970fea2 link: refactor, reorder and fix bugs.
The change in #4441 broke the handling of the `elsif`s due to the
change in logic. As every block here has a `next` there's no need to do
an `elsif` in here at all. Additionally, reorder the conditions in here
so you get an appropriate message depending on what you're trying to do.
Finally, tweak some of the messaging to remove things that are ignored
and tell people correct commands to run to link things.
2018-07-10 09:32:42 +01:00
Markus Reiter
1d629c6978 Don’t show Casks on Linux. 2018-06-18 16:23:35 +02:00
Markus Reiter
da193d2f7e Merge brew cask search into brew search. 2018-06-18 16:23:35 +02:00
Andrew Janke
c0b7aa00e4 brew style: assume files under Library are no-formulae 2018-06-13 14:06:23 -04:00
Markus Reiter
dd8370a9fa Move shared search logic into Homebrew::Search module. 2018-06-07 13:50:10 +02:00
Markus Reiter
3a361c139e Extend search tests. 2018-06-07 13:48:35 +02:00
Markus Reiter
8b33fbef51 Refactor search_taps to return Formulae and Casks separately. 2018-06-07 13:48:35 +02:00
Andrew Janke
8b55cb5ecb Refactor commands to remove "require cmd/help" 2018-06-07 04:59:59 -04:00
Mike McQuaid
054866653d
Merge pull request #4185 from sjackman/superenv-linux
Add superenv for Linux
2018-05-31 19:56:16 +01:00
Markus Reiter
de246cc528 Update Homebrew-Cask references. 2018-05-25 18:20:02 +02:00
Markus Reiter
c4222141ac Revert "Update Homebrew-Cask references."
This reverts commit 4475651b548afdcf15c4cf7a7cb57baca1885186.
2018-05-25 17:57:32 +02:00
Markus Reiter
4475651b54 Update Homebrew-Cask references. 2018-05-25 17:56:16 +02:00
Markus Reiter
54834ccbe3 Move repo_var method to Tap class. 2018-05-25 16:21:37 +02:00
Mike McQuaid
f6bf989378 Remove some integration tests
We have an awful lot of integration tests and they are (comparatively)
really slow. Let's kill those that test edge case conditions and focus
on those that test that our functionality works as expected. Edge cases
can be better tested with unit tests.
2018-05-23 14:41:31 +01:00
Shaun Jackman
434e8d8e2f test/cmd/install: Fix a test failure on Linux
Fix the error:
Error: Homebrew GCC requested, but formula gcc not found!
2018-05-22 10:48:17 -07:00
Douglas F Shearer
18b362aa96 Alphabetize the brew outdated formula listing.
Sorts by `Formula#<=>`.

Includes updated test example.
2018-05-16 13:01:12 +01:00
Steven Peters
2adfb77cd8 missing: exit nonzero if missing deps are found 2018-04-12 22:48:02 -07:00
Mike McQuaid
cffa5a9864 Disable/delete/add more deprecations
Move various `odeprecated` to `odisabled` and delete uses of
`odisabled`.
2018-04-08 14:57:17 -07:00
Mike McQuaid
9fca172d03 Fix HOMEBREW_RUBY_WARNINGS="-w"
Fix various circular requirements, method redefinitions, etc.
2018-04-07 20:28:56 +01:00
Mike McQuaid
33b5ac78ad cmd/switch: improve usability.
- Ensure that we output the available versions where relevant
- Use `<formula>` to be consistent with other commands’ help
- General code cleanup
2018-03-30 15:19:13 +01:00
Mike McQuaid
5e1806e796 test: rubocop-rspec style auto-corrects.
There’s too many warnings to start enabling `rubocop-rspec` by default
but let’s at least apply the cleanups it does automatically.
2018-03-25 13:30:37 +01:00
Mike McQuaid
96ff688b9d upgrade: make pinned error have correct exit code.
Also, display before saying "no packages to upgrade".

Fixes #3936.
2018-03-16 20:31:20 +00:00
Mike McQuaid
83cca40fc9 RuboCop 0.53.0 manual fixes. 2018-03-08 14:10:02 +00:00
Mike McQuaid
1a51d7fb44 migrator: tweak more messaging.
- Make it clearer what the migrator is doing and why
- Recommend an unconditional brew upgrade
2018-03-05 10:14:39 +00:00
Mike McQuaid
c57ab279ba Use rspec-retry in flaky brew tests.
We have a few tests that are intermittently flaky. Let's try this to see
if we can get them a bit more reliable.
2018-02-13 09:34:25 +00:00
ilovezfs
da77f23bc7 rubocop: don't always display cop names. 2018-01-21 07:23:53 -08:00
Mike McQuaid
b96ec879dc (un)linkapps: hide from manpage, use odeprecated. 2018-01-21 13:38:44 +00:00
Mike McQuaid
8cd0d85afb rubocop 0.52.1 2018-01-15 16:17:32 +00:00
Bob W. Hogg
3cd869651b Add test fixtures for ELF executables
Add test/support/fixtures/elf/
and test/support/fixtures/tarballs/testball-0.1-linux.tbz
2017-11-26 08:37:57 -08:00
Markus Reiter
9bee9ca575 Use “squiggly” heredocs. 2017-10-18 14:39:09 +02:00
Markus Reiter
71b6e239d7 Set RuboCop maximum to current maximum. 2017-10-10 17:00:04 +02:00
Josh Soref
8e4150b20b spelling: should 2017-09-10 16:42:24 +00:00
Mike McQuaid
49d2d7b94d home_spec: use different test formula.
Instead of `testball` use a formula named `testballhome` to avoid this
clashing with any other formula named testball.
2017-09-07 19:18:03 +01:00
Misty De Meo
a26cde8299
search_remote_tap spec: fix test offline
Even though we stub the JSON response, the method being tested always
returns [] immediately if HOMEBREW_NO_GITHUB_API is set.
2017-08-31 22:29:43 -07:00
Viktor Szakats
b44c7a1022 upgrade more urls to https 2017-08-22 10:31:21 +00:00
Mike McQuaid
961d79011e search: explain why it takes the time it does.
Provide a bit of clarity that this isn't just searching a local database
but doing an GitHub API and Git history query.
2017-08-15 10:25:51 +01:00
Ben Muschol
eb009503ed Fix test typo 2017-08-11 15:52:50 -04:00
Ben Muschol
b06fceda57 Add a test 2017-08-11 15:49:57 -04:00
Bob W. Hogg
3b7113b304 cmd/search: use new Fedora package search
pkgdb has been put into read-only mode,
so it won't be updated for new Fedora releases
going forward. Use apps.fedoraproject.org/packages instead.

Signed-off-by: Bob W. Hogg <rwhogg@linux.com>
2017-08-07 18:22:26 -07:00
Markus Reiter
2ad3a87045 Silence all specs by default. 2017-07-29 20:25:37 +02:00
Gautham Goli
086e540231 Add a rubocop config file to control cops' execution in audit and style 2017-07-18 20:23:03 +05:30
Mike McQuaid
7d5b8a5cea tests: cleanup tests.
Remove pending tests that are never run on CI (i.e. require `--online`),
remove fixtures for those tests and just make `--official-cmd-taps`
run by `--online` instead.
2017-06-07 16:25:07 +01:00
Markus Reiter
3064b5b3c3 Add test for brew style. 2017-06-04 10:11:59 +02: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
Markus Reiter
5828eefd01 Remove to_s from some Pathnames. 2017-05-08 13:37:28 +02:00
Mike McQuaid
18c2713df4 formula_installer: improve install/upgrade message
If you `brew install` a formula that's already installed you get:
  Warning: ripgrep-0.5.1 already installed

If you `brew install` an outdated formula that's installed you get:
  Error: ripgrep-0.5.1 already installed. To install this version, first
  `brew unlink ripgrep`

Instead, suggest that the user should `brew upgrade` in this case. If
the formula isn't outdated use the previous message.
2017-04-25 12:45:39 +01:00
Markus Reiter
2bda194bd9 Add GitHub::search_code method. 2017-04-25 12:29:01 +02:00