Mike McQuaid
737b84b54b
brew style --fix
fixes.
2018-11-02 17:29:23 +00:00
Markus Reiter
c4d418e126
Use ActiveSupport’s #second
.
2018-10-07 23:10:56 +02:00
Viktor Szakats
a0d971a0d0
secure/fix URLs
2018-10-03 21:21:05 +00:00
Markus Reiter
e9b9ea49a1
Update to RuboCop 0.59.1.
2018-09-17 03:45:59 +02:00
Mike McQuaid
5e6c40e28f
Make versioned formulae regex more consistent.
...
Share the regex where possible and otherwise ensure they are identical.
2018-06-18 14:36:51 +01:00
Alyssa Ross
472d1a22c5
Fix comparison with Version::NULL on RHS
...
This was accounted for in Version::NULL.<=>, but not in Version#<=>,
so these could only be compared if Version::NULL was the left hand
side.
The check had to go above the check that `other` is a version because
`Version::NULL`'s anonymous class does not inherit from `Version`.
(The type check feels like it's probably a smell, but out of scope).
2018-05-26 14:45:53 +02:00
Mike McQuaid
77e3e7e4d9
version: support to_i.
...
This is needed for existing MacOS::Xcode.version calls that relied on
this returning a string. It mirrors similar behaviour for to_f.
2017-11-05 15:39:43 +00:00
Markus Reiter
175ca909ee
Clean up code style and remove .rubocop_todo.yml
.
2017-10-08 16:10:37 +02:00
Kevin Abel
9d36096d68
Add version detection support for php URL
...
Pulls a semver from anywhere in the URL (not just stem).
2017-10-03 23:29:33 -05:00
JCount
1502e5b897
version: improve devel spec version parsing
...
term this 'devel spec version style';
also improve dash version style parsing
2017-07-22 19:28:19 -04:00
JCount
0a5052141d
Merge pull request #2827 from JCount/version-improve-url-only-version-parsing
...
version: improve url-only version parsing
2017-06-30 11:37:28 -04:00
JCount
f87fadd4ee
version: improve parsing of url-only, non-filename versions
...
add support for styles prefixed with a r,v,V and an optional _ ,
and styles with four groups of digits, seperated by periods;
combinations of the two are also supported
2017-06-30 10:53:24 -04:00
Ed Flanagan ed@flanagan.xyz
700b5e2738
Add PreToken composite
2017-06-27 03:17:23 -07:00
Mike McQuaid
7a38bab333
Fixup all RuboCop warnings.
2017-05-29 18:43:18 +01:00
Markus Reiter
5828eefd01
Remove to_s
from some Pathname
s.
2017-05-08 13:37:28 +02:00
Reto Kromer
cb5316fc17
move before GitHub tarballs
2017-05-01 22:42:57 +02:00
Reto Kromer
3585dfd9bd
remove inner group
2017-04-23 20:59:02 +02:00
Reto Kromer
17aa90a2c5
remove inner uncaptured group
2017-04-23 20:52:40 +02:00
Reto Kromer
1e1ae204c2
move before lame-398-1
2017-04-18 11:11:37 +02:00
Reto Kromer
49c568a862
add date-based versioning
2017-04-14 11:04:18 +02:00
Viktor Szakats
cc8f029f22
secure urls + remove -k from in-doc curl command
2017-03-14 17:27:11 +00:00
Alyssa Ross
9e97eadccb
rubocop: trailing comma in multiline method calls
...
Discussed in
https://github.com/Homebrew/brew/pull/1987/files#r100693581 .
This was originally ommitted because it wasn't compatible with Ruby 1.8.
(See https://github.com/Homebrew/legacy-homebrew/pull/48144#r49928971 ).
2017-02-12 15:11:38 +00:00
Misty De Meo
d32a1c4c7d
Version: add #to_f
...
This is used by things which used to compare against raw strings,
for example Xcode.uncached_version
2016-11-10 15:09:36 -08:00
Misty De Meo
16529a4de5
Version: allow coercing non-versions in comparisons
...
These are needed due to the raw string and fixnum comparisons which
exist for legacy reasons, for instance compiler version and build
comparisons.
2016-11-10 15:08:36 -08:00
Misty De Meo
b6acb9cb47
Version: allow comparing against nil
2016-11-10 15:08:36 -08:00
Misty De Meo
fbcf500a48
Version.parse: return Version::NULL for unparseable strings
2016-11-10 15:08:36 -08:00
Misty De Meo
9bac107b31
Add Version::NULL singleton
2016-11-10 15:08:36 -08:00
Mike McQuaid
5b4b7b24e6
version: don't let a/b imply alpha/beta.
...
This is assumption is broken for at least OpenSSL which makes it a
bad general rule.
As discussed in #1102 .
2016-09-24 17:40:37 +01:00
Markus Reiter
e2c7509065
Merge pull request #1113 from reitermarkus/rubocop-guardclause
...
RuboCop: Fix Style/GuardClause.
2016-09-24 17:38:49 +02:00
Markus Reiter
58e36c7319
Fix Style/GuardClause.
2016-09-24 12:24:35 +02:00
Zhiming Wang
687f0fcf72
Merge pull request #1102 from zmwangx/alpha-rc-detection
...
version: improve alpha and rc detection (elasticsearch)
2016-09-24 05:53:17 -04:00
Markus Reiter
e851c9bf6c
Style/Alias: Prefer alias
.
2016-09-23 18:19:53 +02:00
Markus Reiter
b5f8de8bf4
Fix Style/RegexpLiteral.
2016-09-23 15:30:07 +02:00
Markus Reiter
52ff988530
Fix RuboCop CaseEquality.
2016-09-23 15:30:06 +02:00
Zhiming Wang
58a2ef9b58
version: improve alpha and rc detection
2016-09-23 06:23:36 -04:00
Mike McQuaid
6693915399
rubocop --auto-correct all remaining files.
...
But remove some manual `.freeze`s on constants that shouldn't be
constants.
2016-09-17 16:14:13 +01:00
ilovezfs
a5a1b2969f
version: fix parsing of URLs ending with version
...
https://github.com/lihaoyi/Ammonite/releases/download/0.7.4/0.7.4
was parsing as "0.7" not "0.7.4" since ".4" was being treated as a
legitimate file extension. At minimum, let's insist that a valid file
extension include at least one letter to avoid lopping off part of the
correct version string.
2016-08-18 06:51:02 -07:00
Vlad Shablinsky
80489dcb49
version: introduce HeadVersion
2016-07-16 20:39:13 +08:00
Xu Cheng
de1049f1f1
various: proper escape dot in regex
2016-07-13 19:11:46 +08:00
Andrew Janke
798c342f4e
brew pull: cross-platform bottle verification, concise output ( #132 )
...
Do the bottle check using any platform's bottle, so `brew pull` works
on bottled formulae which don't include a bottle for the current system.
Make output more concise and informative
* Remove expected download error messages when waiting for Bintray publishing
* Replace patch download progress bars with patch file name
* Silence git output about switching to and from bottle-pulling branch
* Include formula name and patch type in some progress messages
2016-05-03 08:22:28 -04:00
Alex Dunn
f15532452e
version: correctly parse codeload URLs
...
Needed for Homebrew/homebrew#49346 .
Closes Homebrew/homebrew#49354 .
Signed-off-by: Alex Dunn <dunn.alex@gmail.com>
2016-02-19 17:36:42 -08:00
Baptiste Fontaine
4c5aee7a56
version: fix GitHub releases URLs parsing
...
The current code doesn't work with releases that have more than one
digit in the third group, i.e.:
.../releases/download/1.2.3/... works
.../releases/download/1.2.34/... doesn't work
Closes Homebrew/homebrew#49255 .
Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-02-17 13:23:26 +01:00
Xiyue Deng
e1dfafa54c
Improve dash separated version detection.
...
* Also with test case.
Closes Homebrew/homebrew#47584 .
Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-01-02 20:06:17 +01:00
Stefano Pigozzi
e865cee3d3
Fix version parsing on URLs with no extensions
2015-12-26 21:47:14 +00:00
Baptiste Fontaine
cc7a047edc
version: parse opam archives
...
Closes Homebrew/homebrew#44544 .
Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-10-04 10:31:46 +02:00
Xu Cheng
b121e5fd7b
more core file style updated by rubocop
2015-08-06 17:23:56 +08: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
Jack Nagel
9b75afcf4a
Make Version#<=> allocation-free
2015-03-27 20:07:50 -04:00
Jack Nagel
38a8c54898
Return early for the == case in Version#<=>
2015-03-17 21:37:03 -04:00
Jack Nagel
68c7e1e30c
Add protected reader for version value
2015-03-17 21:37:03 -04:00