65 Commits

Author SHA1 Message Date
EricFromCanada
dfc9906184
internal messaging fixes 2023-02-10 23:17:16 -05:00
Mike McQuaid
6b4363092d
Revert "Merge pull request #14548 from Homebrew/revert-14382-deprecate-disable-remove"
This reverts commit 932d2cf3b77c9439a57b6a43577fc8d3b6399a62, reversing
changes made to f4e60482791d2ff628efadfdbf0d14d9237d2d29.
2023-02-07 19:25:51 +01:00
Mike McQuaid
6882ac17e7
Revert "Add deprecations and disables" 2023-02-07 15:13:19 +01:00
Mike McQuaid
59c03cb2a6
Add deprecations and disables
Do the usual dance:
- commented `odeprecated` to `odeprecated`
- `odeprecated` to `odisabled`
- `odisabled` removed
2023-02-03 10:48:43 +00:00
Rylan Polster
174087958b
Simulate all OS/arch combinations in brew readall 2022-10-10 23:56:37 -04:00
Mike McQuaid
e2759fbdff
Deprecate reading all formulae through commands
We added the `--all` flag (now renamed to `--eval-all`) for various
commands for this behaviour so let's start deprecating this.

Also, introduce a `HOMEBREW_EVAL_ALL` environment variable to use the
existing, less secure, behaviour by default and avoid passing
`--eval-all` everywhere.
2022-09-05 13:57:22 +01:00
Mike McQuaid
41e94afda5
Fix brew style
Fixes for https://github.com/Homebrew/brew/pull/12152.

Extracted into a separate PR so this can be merged immediately.
2021-09-30 10:13:53 +01:00
Rylan Polster
d1f3e39b7b
Update commands to generate usage banner 2021-01-18 21:20:11 -05:00
Dawid Dziurla
332372469f
cmd: indicate multiple named args in usage banner 2021-01-15 13:04:00 +01:00
Rylan Polster
da811373d3 Add named_args DSL for commands 2021-01-13 17:09:42 -05:00
Markus Reiter
5be4c9b5e0 Upgrade typed sigils. 2020-11-25 17:04:19 +01:00
Markus Reiter
da9289eff0 Add more type signatures. 2020-11-13 12:26:36 +01:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Markus Reiter
d4c2ffd705 Refactor CLI::Parser. 2020-07-31 15:07:17 +02:00
Mike McQuaid
047738069f
Speed up timing-out tests.
- make `brew readall` only check Homebrew/brew syntax with no tap
  passed.
- pass specified tap to `brew readall` test for speed
- only shell out once in `FormulaInfo` test for speed
2020-07-27 14:01:22 +01:00
Sean Molenaar
3f6d3e5cf0
Support casks in readall 2020-06-18 20:15:07 +02:00
Mike McQuaid
a7fe0ed847
cmd: use more and cleanup new args APIs. 2020-03-05 09:40:15 +00:00
EricFromCanada
c246207ba0 cmd: updates for command descriptions 2019-12-13 15:24:00 -05:00
EricFromCanada
8a8359cdd4 manpages: sentence rewording for readability
Use active voice when applicable, better verbs & adjectives, preposition usage, proper tense, etc.
2019-08-20 09:05:45 -04:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
Mike McQuaid
e40b171127
Rename cli_parser to cli/parser. 2019-04-17 22:16:50 +09:00
Mike McQuaid
6cb7a00f2d
cmd: remove --help headers and tweak docs. 2019-01-30 21:39:28 +00:00
Gautham Goli
bf51e3ea14
readall: Use CLI::Parser to parse args 2018-11-05 18:31:22 +05:30
EricFromCanada
1d2b4ed321 docs: add more missing option descriptions
and improve wording or formatting where necessary.
2018-02-01 16:06:17 -05:00
Mike McQuaid
6114f48d5d Unhide readall and update-reset from manpage.
These are both tools that end-users can find useful on occasion so it
doesn't make sense to hide them.
2017-10-26 16:14:14 +01:00
Mike McQuaid
ed28ed78d1 Merge pull request #3304 from richiethomas/refactor_uses
In 'readall.rb', replaced multi-step 'each' loop with one-line method chain of Ruby enumerator methods
2017-10-20 18:10:31 +01:00
richiethomas
43cbf08018 Remove memoization from uses.rb, as it doesn't result in the expected time complexity savings 2017-10-20 09:42:30 -04:00
richiethomas
b135a70c57 Fix brew style warnings 2017-10-18 20:21:49 -04:00
richiethomas
e5e84eec7d PR feedback- replace '#{HOMEBREW_LIBRARY}/Homebrew/**/*.rb' with '#{HOMEBREW_LIBRARY_PATH}/**/*.rb' 2017-10-18 18:20:44 -04:00
richiethomas
99bccaae13 Remove /cask/ from readall file filter 2017-10-18 17:44:09 -04:00
Maxim Belkin
ad3886b462
readall: update documentation 2017-10-18 14:50:44 -05:00
Richie Thomas
9ef82ae1e2 In 'readall.rb', replaced multi-step 'each' loop with one-line method chain of Ruby enumerator methods 2017-10-12 17:38:02 -04:00
Maxim Belkin
4c0e623bd4
readall: allow readall-ing multiple taps at once 2017-10-10 17:54:42 -05:00
EricFromCanada
afc539f86e Update brew's man page formatting and grammar
Also update command specifications to match descriptions.
2017-02-25 17:37:57 -05:00
Markus Reiter
0ab750bf24 Use module_function for commands. 2016-10-02 00:24:47 +02:00
Mike McQuaid
3982950e61 rubocop --auto-correct all hash-rocket usage. 2016-09-17 16:14:13 +01:00
Mike McQuaid
ebdb879fe4 Add --help to all developer commands.
Also, flag those that we never want to be in a manpage.
2016-09-08 09:05:00 +01:00
Mike McQuaid
135ecd1295 Prepare for Homebrew Cask to be imported.
- ignore Cask's files in `readall` (for now, there's an intentional
  syntax error that will need fixed)
- run Cask's tests if they exist
- don't check Cask's files in coverage reports (for now)
2016-08-17 09:11:11 +01:00
Xu Cheng
a8566c9848 various: eliminate the usage of any? (#638)
`any?` is not the opposite of `empty?`. Besides the case that
`[false, nil].any?` will return false, `any?`(O(n)) has much worse
performance than `empty?`(O(1)).
2016-08-05 22:01:32 +08:00
Mike McQuaid
4da990587f tap: run readall when tapping. (#396)
* readall: move readall logic to new class.

* tap: run readall when tapping.

This will prevent tapping an tap with syntax errors from causing issues
for users.

Fixes #58.
2016-07-09 13:51:19 +01:00
Martin Afanasjew
b5c27bb7e5 readall: also check 'brew.rb' for issues
Closes #119.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-04-22 00:47:43 +02:00
Martin Afanasjew
30c0d97e5c readall: stop using no longer needed 'nostdout'
Since switching from `system` to `Utils.popen_read` we no longer need to
suppress Ruby's output of `Syntax OK` to `$stdout`.
2016-04-22 00:47:43 +02:00
Martin Afanasjew
a61829da46 readall: fail on Ruby syntax warnings
Previously, syntax warnings were printed, but didn't cause `readall` to
exit with a non-zero exit code. Now they do, making it easier to catch
accidentally introduced syntax warnings in the test bot.
2016-04-22 00:47:43 +02:00
Xu Cheng
a5cfc011e0 various: Homebrew/core is the core tap
Also make `Homebrew/homebrew` as an alias of this tap to keep
backward compatibility.
2016-04-02 21:51:36 +08:00
Xu Cheng
28f3dae8cd rename CoreFormulaRepository to CoreTap
Core tap will be separated from core code in the near future.
It makes sense to rename it to CoreTap.
2016-03-07 19:43:46 +08:00
Xu Cheng
0f84b976ba move CoreFormulaRepository into separate file
For users whose local brew is at around 2015-06-11 to 2015-08-06,
running `brew update` will emit following error:

  Error: uninitialized constant Formulary::CoreFormulaRepository

This is caused by the same bug described in Homebrew/homebrew#42553.

This commit workarounds this issue and restores `brew update` compatibility
for users mentioned above.

Also cleanup legacy `require "cmd/tap"`.
2015-12-19 22:05:30 +08:00
Xu Cheng
f72d4f1722 readall: use Tap object to locate alias directory
Let's hide implementation detail on where to find alias directory.
This will benefit future core code and formulae separation.

Also let `brew readall` check aliases for all taps.
2015-12-19 22:05:30 +08:00
Xu Cheng
430cfbb557 readall: allow interrupt 2015-12-19 22:05:30 +08:00
Xu Cheng
2c25303949 remove unnecessary tap_args
It's now handled by Tap.fetch
2015-12-09 16:56:59 +08:00
Xu Cheng
3b520cf195 cache taps
There are plenty of IO operations inside Tap object, and it will be more
when implementing formula alias reverse look up(e.g. list all of alias
names for a formula). So let's cache them.

Some benchmark:

$ time brew info $(brew ruby -e 'puts Formula.tap_names') > /dev/null
Before: 6.40s user 2.42s system 96% cpu 9.134 total
After: 4.75s user 0.77s system 97% cpu 5.637 total

Closes Homebrew/homebrew#44377.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-09-30 16:25:30 +08:00