Commit Graph
126 Commits
Author SHA1 Message Date
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
Mike McQuaid b3c69aba87 search: use single HTTP call for tap searches.
Use GitHub's code search API to search using the filename based on the
search query. This means we only need a single HTTP call and no more
multithreading madness. This also means we're able to search everything
in the Homebrew and Caskroom organisation by default without having to
maintain a list of things to search (and not) in here.
2017-04-24 14:11:04 +01:00
Mike McQuaid 45a7730f61 Fix and remove various TODOs.
Fix those that can be done so without tearing Homebrew to pieces and
remove the comments for those that can never be done.
2017-04-23 15:10:18 +01:00
Mike McQuaid a6df701fad tests: reduce some noise.
- Tweak the way offline skipping happens
- Skip more tests that break when offline
- Hide more stdout output from tests.
2017-04-22 12:49:14 +01:00
Eugene Nikolsky edd9a9717c Fix the 'export PATH' message in link for a keg-only formula
Commit 4cae6a724e introduced the message,
but it printed the wrong path, e.g. for `brew link sqlite`:

```
If you need to have this software first in your PATH instead consider running:
  echo 'export PATH="/usr/local/opt/sqlite:$PATH"' >> ~/.zshrc/bin
```

where `/bin` is appended at the end, but should be inserted before
`:$PATH`: `echo 'export PATH="/usr/local/opt/sqlite/bin:$PATH"' >> ~/.zshrc`.
This patch fixes that and updates a test to verify it.
2017-04-01 20:12:00 -07:00
William Roe 996dcdee2c Add pinned version to outdated json output
The structure should be consistent, so there are always pinned and
pinned_version fields even if there are no pinned versions for a given formula.
2017-03-27 11:41:08 +01:00
William Roe 70446d9112 Add pinned version to outdated output 2017-03-27 11:30:36 +01:00
William Roe 755d43d46d Add test for verbose brew outdated output
Split the tests up into quiet and verbose output with contexts.
2017-03-27 11:27:48 +01:00
Mike McQuaid 623c95b3f8 cmd/log: improve output messaging.
This wasn’t adapted to the new, multiple repository world.
2017-03-20 18:20:31 +02:00
Mike McQuaid 0e30d34d27 test: fix tests with a shallow clone.
In this case `HOMEBREW_VERSION` is `>1.1.0 (no git repository)` so these
tests failed. This was the cause of the Homebrew/homebrew-test-bot
Linux CI failures as it was testing a shallow clone.
2017-03-10 16:16:01 +00:00
Markus Reiter 3b74c69c13 Silence cmd/cask test. 2017-03-05 17:11:46 +01:00
Markus Reiter a554902380 Add mktmpdir helper method. 2017-02-28 15:06:32 +01:00
Markus ReiterandGitHub 2a750619b9 Merge pull request #2208 from reitermarkus/spec-uninstall
Convert `brew uninstall` test to spec.
2017-02-27 16:49:13 +01:00
Markus Reiter 125abd228c Convert brew commands test to spec. 2017-02-27 15:26:56 +01:00
Markus Reiter 3ae115bfb3 Convert brew uninstall test to spec. 2017-02-27 13:09:23 +01:00
Markus Reiter cc9d76cf22 Convert cmd/update-report test to spec. 2017-02-26 13:23:25 +01:00
Markus Reiter 4501f69592 Convert cmd/info test to spec. 2017-02-25 20:12:28 +01:00
Markus Reiter ec0f2187a2 Avoid warnings when HOMEBREW_PREFIX/bin is not in PATH. 2017-02-25 09:08:05 +01:00
Markus Reiter a2b4ee1ecd Convert brew install test to spec. 2017-02-25 09:01:40 +01:00
Markus ReiterandGitHub 069cf2198c Merge pull request #2114 from reitermarkus/spec-info
Convert `brew info` test to spec.
2017-02-25 07:23:49 +01:00
Markus ReiterandGitHub cdf9a0ddfb Merge pull request #2120 from reitermarkus/spec-switch
Convert `brew switch` test to spec.
2017-02-25 07:22:13 +01:00
Markus ReiterandGitHub 0759c7dcb6 Merge pull request #2124 from reitermarkus/spec-upgrade
Convert `brew upgrade` test to spec.
2017-02-25 07:16:28 +01:00
Markus ReiterandGitHub 4d0986b567 Merge pull request #2144 from reitermarkus/spec-readall
Convert `brew readall` test to spec.
2017-02-25 07:15:08 +01:00
Markus ReiterandGitHub e768786f22 Merge pull request #2115 from reitermarkus/spec-linkapps
Convert `brew linkapps` test to spec.
2017-02-25 07:04:52 +01:00
Markus ReiterandGitHub 53ec50afdf Merge pull request #2127 from reitermarkus/spec-uses
Convert `brew uses` test to spec.
2017-02-25 07:04:24 +01:00
Markus ReiterandGitHub e393fd5a30 Merge pull request #2125 from reitermarkus/spec-unlink
Convert `brew unlink` test to spec.
2017-02-25 07:03:22 +01:00
Markus ReiterandGitHub 1f9faa09a9 Merge pull request #2128 from reitermarkus/spec-unpack
Convert `brew unpack` test to spec.
2017-02-25 07:03:02 +01:00
Markus ReiterandGitHub 6a2693ba3d Merge pull request #2122 from reitermarkus/spec-uninstall
Convert `brew uninstall` test to spec.
2017-02-25 07:02:22 +01:00
Markus ReiterandGitHub 9010c37ab4 Merge pull request #2146 from reitermarkus/spec-prune
Convert `brew prune` test to spec.
2017-02-25 07:01:40 +01:00
Markus ReiterandGitHub 9ca7b351e9 Merge pull request #2131 from reitermarkus/spec-help
Convert `brew help` test to spec.
2017-02-25 06:59:24 +01:00
Markus ReiterandGitHub 3470edd615 Merge pull request #2164 from reitermarkus/spec-bundle
Convert `brew bundle` test to spec.
2017-02-25 06:56:52 +01:00
Markus ReiterandGitHub 798e8ec45b Merge pull request #2123 from reitermarkus/spec-unlinkapps
Convert `brew unlinkapps` test to spec.
2017-02-25 06:56:28 +01:00
Markus ReiterandGitHub 7701bfcb1f Merge pull request #2139 from reitermarkus/spec-missing
Convert `brew missing` test to spec.
2017-02-25 06:54:54 +01:00