52 Commits

Author SHA1 Message Date
Douglas F Shearer
c808424499 Adjust alignment of select and sort. 2018-05-16 13:41:40 +01: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
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
566d3cb58b Document all short flags. 2017-04-02 10:14:58 +01: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
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
William Woodruff
d07b9ed7f2
Replace Utils::JSON with corelib JSON calls. 2016-11-20 20:06:25 -05:00
Uladzislau Shablinski
e3f3cb11a6 cmd/outdated: group specs of same formulae
Suppose you have devel and stable versions of `foo` installed.
Their versions should be grouped together regardless their specs.

Output before the change:
  foo (2.4), foo (3.28-01) < 5.1

Output after the change:
  foo (2.4, 3.28-01) < 5.1
2016-10-20 01:08:28 +03:00
Markus Reiter
0ab750bf24 Use module_function for commands. 2016-10-02 00:24:47 +02:00
Mike McQuaid
c9d9e54de6 Fix brew style from #971. 2016-09-19 16:04:32 +01:00
Mike McQuaid
8bae49941c outdated: prefer .join over *. 2016-09-18 19:58:12 +01:00
Alyssa Ross
d3788c58ef brew outdated: use full name in verbose 2016-09-18 19:58:12 +01:00
Alyssa Ross
2a683f2569 upgrade, outdated: follow alias changes 2016-09-18 19:58:09 +01:00
Mike McQuaid
3982950e61 rubocop --auto-correct all hash-rocket usage. 2016-09-17 16:14:13 +01:00
Vlad Shablinsky
7fa9c0e977 Update --fetch-HEAD documentation 2016-08-11 09:30:59 +02:00
Uladzislau Shablinski
b8ce1fe1b2 Update upgrade/outdated documentation (#650) 2016-08-06 22:08:35 +08:00
Vlad Shablinsky
9754dbada8
Update upgrade/outdated methods for head versions
Introduce `--fetch-HEAD` option. Without this option upgrade and
outdated never fetch latest upstream commit to detect if HEAD is
outdated -- tabs are used instead. However, if option is passed,
we fetch commit from upstream, which is more time consuming,
but we can be sure that version is up-to-date or outdated.
2016-08-06 21:25:56 +08: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
Max Nordlund
fa1fd70a37 Add all the top level comments 2016-04-10 22:59:25 +02:00
Andrew Thorburn
4c3a6c6022 formula: add missing require.
Closes Homebrew/homebrew#46433.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-11-27 18:48:38 +00:00
Mike McQuaid
6054666fa6 formula: refactor outdated handling, add to hash. 2015-11-27 16:52:54 +00:00
Xu Cheng
1ae44d4429 use directory? to check rack existence 2015-10-09 19:06:08 +08:00
Xu Cheng
b38498d9dc outdated: fix syntax warning
Library/Homebrew/cmd/outdated.rb:27: warning: shadowing outer local variable - dir
2015-09-06 20:15:38 +08:00
Vlad Shablinsky
fc445d97d3 outdated: update error for different taps
Closes Homebrew/homebrew#43269.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-27 13:51:05 +01:00
Xu Cheng
0bf2f92f46 outdated: remove unnecessary nested if 2015-08-15 16:18:17 +08:00
Mike McQuaid
49dce3e7ae outdated: check if formula needs to be migrated.
Closes Homebrew/homebrew#42938.
2015-08-14 15:18:45 +01:00
BrewTestBot
13d544e11e Core files style updates.
Closes Homebrew/homebrew#42354.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-03 13:22:35 +01:00
Xu Cheng
c07f4ad737 outdated: output full name
Closes Homebrew/homebrew#41099.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-06-26 16:56:22 +08:00
Xu Cheng
e04f115f8d outdated: inline method 2015-06-26 16:56:22 +08:00
Jack Nagel
2bc40ff385 Pull complex condition out of loop 2015-06-25 19:33:47 -04:00
Colin Dean
e12295849d Adds JSON output to outdated command
After some musing on brunophilipe/Cakebrew#71, I thought it would
be useful to let Cakebrew and other tools grab the outdated formulae
version information using a method more elegant than regex.

Closes Homebrew/homebrew#30693.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2015-06-25 19:32:23 -04:00
Xu Cheng
9382557a08 outdated: use Formula#full_name
Closes Homebrew/homebrew#40265.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-06-01 20:01:49 +08:00
Xu Cheng
ebbeda850a outdated: use ARGV.resolved_formulae 2015-05-27 13:53:41 +08:00
Jack Nagel
a4ff45e5ee Use pkg_version when comparing against keg versions 2015-04-01 21:15:18 -04:00
Jack Nagel
abb0cb3aa0 Switch to a more useful serialization of tap info
Closes Homebrew/homebrew#37383.
2015-03-14 21:14:37 -04:00
Mike McQuaid
d57d63ad62 outdated: further fix tap version handling.
Closes Homebrew/homebrew#37317.

Closes Homebrew/homebrew#37480.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-03-07 16:26:29 +00:00
Mike McQuaid
e34d9a7b37 outdated: handle HEAD, URL and path installation.
Handles edge cases missed in Homebrew/homebrew#36699.

Closes Homebrew/homebrew#36741.

Closes Homebrew/homebrew#36760.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-02-13 10:58:43 +00:00
Mike McQuaid
988ec8de98 outdated: handle fully qualified tapped formulae.
Previously if I did `brew install boxen/brews/imagemagick` and then `brew
upgrade boxen/brews/imagemagick` and the version of `imagemagick` in
`boxen/brews` was older than the version in `Homebrew/homebrew` then it would
install the correct version from the `boxen/brews` tap and then try to
immediately upgrade it to the version from `Homebrew/homebrew`. I'd argue
fairly strongly that this behaviour is pretty unintuitive; when you fully
specify a formula from a tap then it should be prioritised by `brew upgrade`
and `brew outdated.

This commit makes `brew upgrade boxen/brews/imagemagick` only upgrade the
version of `imagemagick` if the version in the `boxen/brews` tap is newer.
Similarly `brew outdated imagemagick` and `brew outdated
boxen/brews/imagemagick` will show different results if the newer version
differs between `boxen/brews` and `Homebrew/homebrew`.

Closes Homebrew/homebrew#36699.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-02-11 14:22:48 +00:00
Jack Nagel
9db8580414 Explicitly pass formulae to outdated_brews 2015-01-04 00:41:24 -05:00
Jack Nagel
43aa00227a Get rid of mixed operator styles 2015-01-03 17:54:07 -05:00
Mike McQuaid
426737eb9e outdated: allow passing formulae as arguments.
If formulae names are passed as arguments check if just they are outdated. Additionally, return a failed code if they are outdated.

This will hopefully be able to stop people complaining about the outdated error code as they can now just run e.g.:
`brew outdated git && brew upgrade git`

Closes Homebrew/homebrew#31242.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-08-01 17:46:05 +02:00
Jack Nagel
10a1952d2c Only "extend self" once on the Homebrew module 2014-06-19 13:10:36 -05:00
Adam Vandenberg
579c0e898f outdated: allow forcing verbose output
Closes Homebrew/homebrew#27813.
2014-04-30 21:10:47 -07:00
Jack Nagel
17032a600c Teach commands to work with revisions 2014-03-05 20:12:51 -06:00
Jack Nagel
dd9346ada2 outdated: yield version list rather than recreate it 2013-05-24 11:13:27 -05:00
Jack Nagel
8b763acc2a outdated: always do comparisons with a Formula as the receiver
It is possible for the object returned by Formula#version to be a
subclass of Version with special behavior, so we want to use that for
the comparison.
2013-05-14 20:11:48 -05:00
Mislav Marohnić
aa7864c5ca proper version sort in outdated command
c.f. Homebrew/homebrew#16382.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-12-04 21:10:03 -06:00
Jack Nagel
20fdc5cd2f Simplify brew outdated even further
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-30 20:39:46 -05:00
Jack Nagel
93baea7e47 outdated: use new version comparison machinery 2012-08-18 11:12:10 -05:00