Mike McQuaid
a7fe0ed847
cmd: use more and cleanup new args APIs.
2020-03-05 09:40:15 +00:00
Gautham Goli
685a6b4da6
ARGV: Replace usages of ARGV.named with Homebrew.args.named
2019-12-18 20:38:21 +05:30
Mike McQuaid
4f732a0170
cmd/info: fix --json argument handling.
...
`--all` and `--installed` do not require formulae arguments.
Fixes https://github.com/Homebrew/brew/issues/6842
2019-12-16 11:23:55 +00:00
EricFromCanada
90e830c19e
cmd: add raises for invalid input
2019-12-15 00:04:45 -05:00
EricFromCanada
2f7c3afeb8
cmd: improve wording of messages, spacing
2019-12-15 00:04:45 -05:00
Gautham Goli
22e25dd593
argv: move formulae to cli/args
2019-12-11 16:36:23 +05:30
Mike McQuaid
3a9f585ebb
Move more code to utils/analytics.
2019-11-22 09:10:29 +00:00
Issy Long
727f9671c7
info: show Linux formulae details and analytics
...
- This makes use of the new /api/formula-linux and /api/analytics-linux
endpoints in formulae.brew.sh to give Linux users up to date formula and
analytics info for their installed core formulae.
Before, on Linux, the macOS stats for the `ack` formula:
```
$ brew info ack
[...]
==> Analytics
install: 12,422 (30 days), 32,742 (90 days), 97,788 (365 days)
install_on_request: 10,778 (30 days), 28,339 (90 days), 85,202 (365 days)
build_error: 0 (30 days)
```
Now, on Linux, the Linux stats for the `ack` formula:
```
$ brew info ack
[...]
==> Analytics
install: 95 (30 days), 242 (90 days), 737 (365 days)
install_on_request: 94 (30 days), 241 (90 days), 734 (365 days)
build_error: 0 (30 days)
```
2019-11-22 09:10:29 +00:00
EricFromCanada
7ae87373ed
info: raise on invalid category for formula analytics
2019-11-21 11:45:50 -05:00
EricFromCanada
4cd2775d4f
info: use hyphenated category names for formula analytics
2019-11-20 20:47:05 -05:00
hyuraku
1ab86acb0f
move methods to analytics_table function
2019-11-15 01:25:54 +09:00
hyuraku
af59951c0e
fix style
2019-11-13 23:00:32 +09:00
hyuraku
1afd271a13
check whether args is valid
...
whether args days is in valid_days and args category is in valid_categories
2019-11-13 22:51:57 +09:00
hyuraku
8244a869f6
add empty line after guard clause
2019-11-09 13:11:55 +09:00
hyuraku
ff94e64ee6
info --analytics handle days and category args
2019-11-09 13:08:28 +09:00
Markus Reiter
b1d0c61fea
Update Gems.
2019-10-03 09:22:44 +02: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
EricFromCanada
a3e0647797
manpages: whitespace fixes
2019-08-20 08:24:20 -04:00
Mike McQuaid
c4f72312ce
Fixup brew style
failures.
2019-04-30 09:19:18 +01:00
Mike McQuaid
70b07a914f
cmd/info: fix frozen pathname usage.
...
Fixes #6055 .
2019-04-24 14:17:04 -07: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
cf4511f72a
Merge pull request #5538 from zachauten/brew-info-display-casks
...
Make brew info output cask if no formula exists
2019-03-25 16:54:03 +00:00
Zach Auten
999c4743d0
Added flag for cask_reason to output cask info or just message with cask name
2019-03-24 15:28:34 -04:00
Zach Auten
517083474a
Removed cask_reason from missing_formula.reason
...
- It won't output anything during a failed 'brew install'
- There's a seperate call to MissingFormula.cask_reason
when 'brew info' is executed on a cask.
2019-03-21 17:35:38 -04:00
EricFromCanada
be040f9c66
info: update help text
2019-03-13 22:36:39 -04:00
EricFromCanada
705f03ef9f
info: support analytics for cask-install
2019-03-13 22:36:12 -04:00
EricFromCanada
fbb28175d8
info: use UsageError, extend timeout
2019-03-13 22:35:51 -04:00
Mike McQuaid
e095da4d01
rubocop: enable Layout/EmptyLineAfterGuardClause.
2019-02-21 12:55:49 +00:00
Mike McQuaid
d64429a736
rubocop: enable Style/IfUnlessModifier.
2019-02-21 12:55:49 +00:00
Mike McQuaid
6cb7a00f2d
cmd: remove --help headers and tweak docs.
2019-01-30 21:39:28 +00:00
Mike McQuaid
867b155479
Add missing conflicts to command options.
2019-01-29 19:39:41 +00:00
Mike McQuaid
a24197bcc9
Fix some bottling logic
...
- We've never supported `devel` bottles so don't bother outputting their
status to `brew info`
- Don't `brew upgrade` or `brew reinstall` bottles if they were
previously built as a bottle unless there's no bottles defined at all
(rather than there was no compatible bottles). Fixes #5532 .
2019-01-14 16:47:07 +00:00
Shaun Jackman
d5b2415c87
info: Fix style: Use a guard clause
...
Fix the style error:
Library/Homebrew/cmd/info.rb:88:7: C:
Use a guard clause instead of wrapping the code inside a conditional expression.
2019-01-04 09:43:51 -08:00
Mike McQuaid
e3a178add2
info: make --json a valid argument.
...
This is already accepted so let's handle this in the logic instead.
2019-01-04 13:26:16 +00:00
Gautham Goli
3b808c43cc
info: Use CLI::Parser to parse args
2018-12-10 23:22:13 +05:30
Mike McQuaid
ab99b55108
info: tweak analytics behaviour.
...
- Make `--verbose` and `--analytics` behave differently.
- Allow `--analytics` to return results for formulae that don't exist
(but are in the top 10,000 installed formulae).
2018-10-21 13:07:08 +01:00
Mike McQuaid
0617dc1c1d
info: make verbose analytics use tabular output.
...
This copies (and slightly improves) the current `brew formula-analytics`
output so `brew formula-analytics` can be adjusted to just output JSON.
2018-10-20 12:06:25 +01:00
Markus Reiter
16618d0fc7
Use ActiveSupport’s #pluralize
and #to_sentence
.
2018-10-07 23:10:56 +02:00
EricFromCanada
b2b8f632bb
docs: distinguish <code> and <var> in HTML output
...
Replace <var> tags with markup for italicized monospaced text in Markdown.
This requires the source to not combine bracketed and backticked text.
2018-10-06 00:51:13 -04:00
Markus Reiter
e9b9ea49a1
Update to RuboCop 0.59.1.
2018-09-17 03:45:59 +02:00
Mike McQuaid
be983cfcdf
info: also make verbose output readable.
2018-09-13 09:07:43 +01:00
Z. Grace Moreau
0aadc1e4e6
use 'number_readable' when displaying analytics
2018-09-12 14:47:40 -06:00
Mike McQuaid
c60fe60377
cmd/info: display analytics data.
...
When users don't have `HOMEBREW_NO_ANALYTICS` or
`HOMEBREW_NO_GITHUB_API` set let's display some analytics data in
`brew info`. This should be useful for both maintainers and for users of
Homebrew.
Note this by default combines all installs across options for a single
number; for formulae with lots of options it's a bit overwhelming to
print the installs per-option. However, for `HOMEBREW_DEVELOPER`s print
the full output.
Sample non-developer output:
```console
$ brew info wget
wget: stable 1.19.5 (bottled), HEAD
Internet file retriever
https://www.gnu.org/software/wget/
/usr/local/Cellar/wget/1.19.5 (49 files, 3.7MB) *
Built from source on 2018-09-03 at 20:46:32
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/wget.rb
==> Dependencies
Build: pkg-config ✔
Required: libidn2 ✔, openssl ✔
Optional: pcre ✔, libmetalink ✘, gpgme ✘
==> Options
--with-debug
Build with debug support
--with-gpgme
Build with gpgme support
--with-libmetalink
Build with libmetalink support
--with-pcre
Build with pcre support
--HEAD
Install HEAD version
==> Analytics
install: 84638 (30d), 353800 (90d), 1372775 (365d)
install_on_request: 77926 (30d), 291305 (90d), 1044898 (365d)
build_error: 11 (30d)
```
Sample developer output:
```console
$ brew info wget
wget: stable 1.19.5 (bottled), HEAD
Internet file retriever
https://www.gnu.org/software/wget/
/usr/local/Cellar/wget/1.19.5 (49 files, 3.7MB) *
Built from source on 2018-09-03 at 20:46:32
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/wget.rb
==> Dependencies
Build: pkg-config ✔
Required: libidn2 ✔, openssl ✔
Optional: pcre ✔, libmetalink ✘, gpgme ✘
==> Options
--with-debug
Build with debug support
--with-gpgme
Build with gpgme support
--with-libmetalink
Build with libmetalink support
--with-pcre
Build with pcre support
--HEAD
Install HEAD version
==> Analytics
==> install (30d)
wget: 84516
wget --with-debug: 51
wget --with-libressl: 16
wget --with-pcre: 14
wget --with-pcre --with-libmetalink --with-gpgme: 12
wget --with-debug --with-pcre --with-libmetalink --with-gpgme: 8
wget --HEAD: 3
wget --HEAD --with-debug --with-libmetalink --with-gpgme: 3
wget --with-gpgme: 3
wget --with-libmetalink: 3
wget --with-pcre --with-libmetalink: 3
wget --with-debug --with-pcre: 2
wget --with-libmetalink --with-gpgme: 2
wget --with-pcre --with-gpgme: 2
==> install (90d)
wget: 353131
wget --with-debug: 188
wget --with-pcre: 138
wget --with-pcre --with-libmetalink --with-gpgme: 118
wget --with-libressl: 81
wget --with-debug --with-pcre --with-libmetalink --with-gpgme: 47
wget --with-pcre --with-libmetalink: 31
wget --HEAD: 13
wget --with-pcre --with-gpgme: 12
wget --with-gpgme: 11
wget --with-debug --with-pcre: 10
wget --with-libmetalink: 8
wget --HEAD --with-pcre --with-libmetalink --with-gpgme: 4
wget --with-debug --with-pcre --with-libmetalink: 4
wget --with-libmetalink --with-gpgme: 4
==> install (365d)
wget: 1369530
wget --with-pcre: 810
wget --with-debug: 649
wget --with-pcre --with-libmetalink --with-gpgme: 554
wget --with-libressl: 479
wget --with-debug --with-pcre --with-libmetalink --with-gpgme: 235
wget --with-pcre --with-libmetalink: 184
wget --with-gpgme: 67
wget --with-pcre --with-gpgme: 67
wget --with-debug --with-pcre: 65
wget --HEAD: 54
wget --with-libmetalink: 30
wget --with-libmetalink --with-gpgme: 27
wget --with-debug --with-pcre --with-libmetalink: 24
==> install_on_request (30d)
wget: 77827
wget --with-debug: 48
wget --with-pcre: 12
wget --with-pcre --with-libmetalink --with-gpgme: 11
wget --with-debug --with-pcre --with-libmetalink --with-gpgme: 8
wget --HEAD: 3
wget --HEAD --with-debug --with-libmetalink --with-gpgme: 3
wget --with-gpgme: 3
wget --with-libmetalink: 3
wget --with-debug --with-pcre: 2
wget --with-libmetalink --with-gpgme: 2
wget --with-pcre --with-gpgme: 2
wget --with-pcre --with-libmetalink: 2
==> install_on_request (90d)
wget: 290818
wget --with-debug: 157
wget --with-pcre --with-libmetalink --with-gpgme: 101
wget --with-pcre: 100
wget --with-debug --with-pcre --with-libmetalink --with-gpgme: 42
wget --with-pcre --with-libmetalink: 30
wget --HEAD: 13
wget --with-pcre --with-gpgme: 11
wget --with-gpgme: 10
wget --with-debug --with-pcre: 8
wget --with-libmetalink: 7
wget --HEAD --with-pcre --with-libmetalink --with-gpgme: 4
wget --with-debug --with-pcre --with-libmetalink: 4
==> install_on_request (365d)
wget: 1042845
wget --with-pcre: 504
wget --with-debug: 458
wget --with-pcre --with-libmetalink --with-gpgme: 432
wget --with-debug --with-pcre --with-libmetalink --with-gpgme: 201
wget --with-pcre --with-libmetalink: 158
wget --with-gpgme: 61
wget --HEAD: 54
wget --with-pcre --with-gpgme: 49
wget --with-debug --with-pcre: 47
wget --with-debug --with-pcre --with-libmetalink: 24
wget --with-libressl: 23
wget --with-libmetalink: 22
wget --with-libmetalink --with-gpgme: 20
==> build_error (30d)
wget: 9
wget --HEAD: 1
wget --with-debug: 1
```
2018-09-06 14:18:30 +01:00
Mike McQuaid
80d75bc0d8
Homebrew/.rubocop: tweak rules.
...
Adjust the rules based on the current codebase. Remove various enable,
disables and default values that are unnecessary. Add more comments
explaining why. Make minor changes needed to enable a few more rules.
2018-09-02 20:15:09 +01:00
Markus Reiter
16fb563d49
Refactor MissingFormula
spec.
2018-04-20 19:11:22 +02:00
Mike McQuaid
ba4ac75543
Merge pull request #3836 from alyssais/info_sort
...
info: sort HEAD keys by install date
2018-03-06 08:35:00 +00:00
Alyssa Ross
adb8c252b0
info: sort HEAD keys by install date
...
This makes a lot more sense than sorting alphabetically by commit hash,
the previous behaviour.
2018-02-26 09:21:38 +00:00
Mike McQuaid
f2ce6489b2
Use more docs.brew.sh short links
...
These are nicer on the eyes.
2018-02-22 19:46:58 +00:00
EricFromCanada
1d2b4ed321
docs: add more missing option descriptions
...
and improve wording or formatting where necessary.
2018-02-01 16:06:17 -05:00