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
Jack Nagel
03b309cc76
Fix NullToken equality
2015-03-17 21:37:03 -04:00
Jack Nagel
0d4f241d48
Remove explicit type check
2015-03-17 21:37:03 -04:00
Jack Nagel
2356131e5f
Remove unnecessary default argument
...
This method is always called with two arguments.
2015-03-14 01:58:17 -04:00
Baptiste Fontaine
a9c4091de7
Fix more version misdetections for URLs with archs
...
Closes Homebrew/homebrew#36368 .
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-01-30 08:55:49 +00:00
Baptiste Fontaine
a9e8dfb996
Fix version misdetections for URLs with OS/archs
...
Closes Homebrew/homebrew#36308 .
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-01-28 14:19:21 +00:00
Jack Nagel
4bbefc12e3
Eliminate boolean argument to Version.new
2015-01-07 15:21:20 -05:00
Jack Nagel
35793f0e0c
Let Version.parse instantiate subclasses
2015-01-07 15:21:20 -05:00
Viktor Szakats
fc2818b7a5
Use more https in urls and updated some lost links
...
Closes Homebrew/homebrew#35531 .
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2015-01-04 02:13:16 -05:00
Jack Nagel
dfb7657557
Compare patchlevels numerically rather than lexically
...
Fixes Homebrew/homebrew#32960 .
2014-10-06 13:55:23 -05:00
Jack Nagel
fbefa76ce2
Always use class.name to build inspect strings
2014-07-01 18:39:15 -05:00
Jack Nagel
f446e95852
Remove support for version "schemes", just pass version objects directly
...
I'm not sure why I thought reinventing object instantiation was a good
idea.
2014-05-27 21:41:43 -05:00
Jack Nagel
33c99123f2
Build the version scanner regexp once
2014-04-03 11:19:57 -05:00
Jack Nagel
0f5a80a97b
Fix tokenizing openssl style versions
...
Fixes Homebrew/homebrew#25736 .
2014-01-11 20:00:34 -06:00
Jack Nagel
b6cbd08e93
Implement hash equality for Version
2013-12-09 19:43:07 -06:00
Mike McQuaid
8d256848d6
version: match Jenkins LTS releases.
2013-11-14 22:58:24 +00:00
Jack Nagel
383b321119
Disallow initializing Versions with non-strings
...
Closes Homebrew/homebrew#23553 .
2013-10-25 17:29:45 -05:00
Mike McQuaid
705a248719
versions: remove perforce bottle detection.
2013-08-03 22:27:42 -07:00
Jack Nagel
023aff10c7
Adjust logic to properly sort erlang versions
...
Fixes Homebrew/homebrew#21417 .
2013-07-24 19:48:21 -05:00
Jack Nagel
033ef09518
Detect versions in tag specs
...
Closes Homebrew/homebrew#18300 .
Closes Homebrew/homebrew#20891 .
2013-06-28 21:17:23 -05:00
Jack Nagel
74b60a561c
Simplify custom version scheme handling
2013-06-28 21:17:12 -05:00
Mike McQuaid
01e5e428eb
perforce: add version detection regex.
2013-06-20 13:07:59 +01:00
Jack Nagel
113125d394
Remove Version#to_a alias
...
Exposing this as "to_a" was a mistake, versions are not arrays and it
causes incorrect behavior when splatted or using Kernel#Array(). Use the
more correct name "tokens" instead.
2013-06-14 18:37:27 -05:00
Jack Nagel
5369199df3
Fix version misdetection from fa582cb9ac65
2013-06-11 17:34:21 -05:00
Jack Nagel
2fcc9bad42
Define to_s for Version::Token
2013-06-05 23:31:47 -05:00
Jack Nagel
28acfbba51
Improve tokenization of version strings
...
Tokens like "b4", "beta1", "p195", &c. are now treated as atoms rather
than being broken down even further. Additionally, we enable support for
padding in the middle of versions strings, so we can successfully
compare something like "2.1-p195" with "2.1.0-p194" by inferring that
"2.1" is really "2.1.0".
This fixes the comparison "9.9.3-P1" > "9.9.3" which previously has not
been handled correctly.
2013-06-05 22:03:58 -05:00
Mike McQuaid
eb7efb8dd5
make erlang versions case-insensitive for bottles.
2013-06-03 20:53:00 +01:00
Jack Nagel
bf935a1fa5
Version: dup @version in #to_s
2013-05-19 20:51:25 -05:00
Jack Nagel
5bf652ecdd
Avoid extra array allocations
2013-05-06 16:52:26 -05:00
Jack Nagel
c2889de323
Avoid capturing groups when unnused
2013-04-27 15:21:06 -05:00
Jack Nagel
364c5c3473
Combine GitHub version regexes
2013-04-27 15:21:05 -05:00
Jack Nagel
b7c0c53ffc
VersionElement: attempt most likely match first
2013-04-16 14:56:22 -05:00
Jack Nagel
42da1295ce
Only call Pathname#to_s once per Version object
2013-04-16 14:32:32 -05:00