77 Commits

Author SHA1 Message Date
Mike McQuaid
e40b171127
Rename cli_parser to cli/parser. 2019-04-17 22:16:50 +09:00
EricFromCanada
fa6404e0f5 grammar fixes 2019-04-13 21:29:32 -04:00
Mike McQuaid
17f3ee1957
Improve Bundler cleanup
Rather than trying to be smart and doing this ourselves in `brew cleanup` let’s just installed Bundler somewhere it doesn’t try to clean itself up and use `bundle install --cleanup` when we need cleanup done.

Also, use `ohai` and `odie` when possible as they look nicer.
2019-02-27 14:02:46 +00:00
Mike McQuaid
97958410f4
dev-cmd/tests: improve parallel args naming. 2019-02-27 14:02:46 +00:00
Mike McQuaid
6b326f4465
Move all gems to vendor/bundle, remove vendor/bundle-standlone. 2019-02-21 16:34:20 +00:00
Markus Reiter
c74799fe8a
tests: Use system_command rather than popen_read
Co-Authored-By: sjackman <sjackman@gmail.com>
2019-02-20 11:33:00 -08:00
Shaun Jackman
cb0fe44af3 tests: Set environment variable USER if not set
These two tests fail if the enivornment variable USER is not set:

./test/utils/user_spec.rb:6 # User should eq nil
./test/utils/user_spec.rb:22 # User#gui? when the current user is in a
console session gui? should equal true
2019-02-20 09:38:29 -08:00
Mike McQuaid
bbea109926
dev-cmd: remove --help headers and tweak docs. 2019-01-30 21:39:28 +00:00
Mike McQuaid
eed1444d61
Update deprecations and cleanup
- Move `odeprecated` to `odisabled`
- Remove `odisabled`
- Enable automatic cleanup on install/reinstall/upgrade.
2019-01-23 21:57:40 +00:00
Mike McQuaid
efc3c0c4c0
Use bundle install in more places.
This provides a more consistent version for `rubocop` than relying on
`Homebrew.install_gem_setup_path!` (and we really want `brew style` to
provide consistent output).
2019-01-08 15:08:21 +00:00
Mike McQuaid
5b7404a0d2
Install Bundler <2.
Newer versions require the systems RubyGems to be updated.
2019-01-03 16:43:56 +00:00
Mike McQuaid
438939cea5
tests: delete HOMEBREW_INSTALL_CLEANUP for test consistency. 2018-12-30 20:05:29 +00:00
EricFromCanada
388781f6a7 dev-cmd/: remove colons from command specs.
These aren't needed when converting Parser-based help text to man page or Markdown formats.
Includes regenerated docs.
2018-10-19 13:12:55 -04:00
EricFromCanada
ddf057f3dd dev-cmd/: edit help text and descriptions. 2018-10-19 13:12:11 -04:00
Gautham Goli
a03d2e0cd1
man: Correct option synopsis 2018-10-03 19:49:46 +05:30
Gautham Goli
f60582ca48
man: Remove [] from command synopsis 2018-10-03 19:49:45 +05:30
Gautham Goli
446b1cb9e3
man: Seperate global options into a section 2018-10-03 19:49:45 +05:30
Gautham Goli
e0e876cf37
man: Make command heading H3 2018-10-03 19:49:44 +05:30
Gautham Goli
4f58f2db99
man: Generate dev cmd manpages 2018-10-03 19:49:41 +05:30
Gautham Goli
c7bf79407a
Better man page formatting 2018-10-03 19:20:26 +05:30
Gautham Goli
b6c456b681
Extract out arg parsing method to <cmd>_args method 2018-10-03 19:19:04 +05:30
Markus Reiter
7a991985a4 Run tests with HOMEBREW_DEVELOPER unset. 2018-09-19 19:43:45 +02:00
Markus Reiter
e9b9ea49a1 Update to RuboCop 0.59.1. 2018-09-17 03:45:59 +02: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
Markus Reiter
55cde526a8 Deprecate brew cask cleanup. 2018-08-13 20:09:34 +02:00
Markus Reiter
9db17ab5bc Allow forcing colored output. 2018-08-02 16:03:44 +02:00
Andrew Janke
e0a8a79921 Style fixes for Rubocop 0.57.1 2018-06-30 19:40:14 -04:00
Mike McQuaid
34ae75d511 brew.sh: enable linkage cache for developers.
This seems stable on CI so I think we can expose it to more people.
2018-06-11 20:10:40 +01:00
Markus Reiter
04cb105e46 Unset HOMEBREW_NO_EMOJI for all tests. 2018-06-07 18:42:30 +02:00
Markus Reiter
845cb99e29 Ignore HOMEBREW_NO_GITHUB_API when testing. 2018-06-07 14:02:31 +02:00
Gautham Goli
fba52e2f74 cli_parser: Store parsed args in Homebrew.args and access args everywhere else 2018-05-30 00:05:39 +05:30
Mike McQuaid
0408b78a23 tests: remove linkage cache env.
Otherwise this will mess with `brew tests`.
2018-05-24 15:09:41 +01:00
Markus Reiter
5e2d4d52ba Refactor OsxfuseRequirement spec. 2018-04-20 19:11:22 +02:00
Gautham Goli
48aecf2fa7 cli_parser: Refactor required argument for flag to '=' 2018-04-14 19:04:24 +05:30
Gautham Goli
d22b750e17 Store common switch as Homebrew.args global var 2018-04-10 00:00:35 +05:30
Mike McQuaid
9fca172d03 Fix HOMEBREW_RUBY_WARNINGS="-w"
Fix various circular requirements, method redefinitions, etc.
2018-04-07 20:28:56 +01:00
Gautham Goli
ed387572ec cli_parser: Add class method to make options declaration more readable 2018-03-25 18:02:29 +05:30
Gautham Goli
191e49511b tests: Use Parser to parse args 2018-03-25 13:48:24 +05:30
Mike McQuaid
8ed1425ed7 tests: don't output seed multiple times.
This clutters up the output. Instead, hide it with a RSpec formatter and
generate and output it ourselves.
2017-12-15 09:14:44 +00:00
Mike McQuaid
ec574c0e7f tests: unpin bundler.
These issues were fixed by https://github.com/Homebrew/brew/pull/2872
and https://github.com/Homebrew/brew/pull/2823.
2017-07-13 17:15:03 +01:00
Mike McQuaid
021cef4b2b Autocorrect Rubocop Style/SpecialGlobalVars. 2017-06-12 09:11:42 +01:00
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
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
Mike McQuaid
9853a78397 Travis CI tweaks.
Attempt to improve Travis CI. This time without any vendoring gems
nonsense.
2017-05-08 08:38:25 +01:00
Mike McQuaid
57db2e539e Revert "Merge pull request #2597 from MikeMcQuaid/vendor-gems"
This reverts commit 3e4547f52e7ebec633f8bfefc8a396d944edf908, reversing
changes made to 6edf9382bcc1240ad6f97c8b752cfe56cef9965d.
2017-05-07 17:28:39 +01:00
Mike McQuaid
ee253e465b Vendor all Homebrew's gems.
Homebrew's actually ended up using a fair few gems. While we want to
avoid Bundler at runtime (and this PR still does that, in fact uses
Bundler even less at runtime than it did before) writing our own version
to use at build-time seems redundant.
2017-05-07 13:52:57 +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