aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/version.rb
AgeCommit message (Collapse)Author
2014-10-06Compare patchlevels numerically rather than lexicallyJack Nagel
Fixes #32960.
2014-07-01Always use class.name to build inspect stringsJack Nagel
2014-05-27Remove support for version "schemes", just pass version objects directlyJack Nagel
I'm not sure why I thought reinventing object instantiation was a good idea.
2014-04-03Build the version scanner regexp onceJack Nagel
2014-01-11Fix tokenizing openssl style versionsJack Nagel
Fixes #25736.
2013-12-09Implement hash equality for VersionJack Nagel
2013-11-14version: match Jenkins LTS releases.Mike McQuaid
2013-10-25Disallow initializing Versions with non-stringsJack Nagel
Closes #23553.
2013-08-03versions: remove perforce bottle detection.Mike McQuaid
2013-07-24Adjust logic to properly sort erlang versionsJack Nagel
Fixes #21417.
2013-06-28Detect versions in tag specsJack Nagel
Closes #18300. Closes #20891.
2013-06-28Simplify custom version scheme handlingJack Nagel
2013-06-20perforce: add version detection regex.Mike McQuaid
2013-06-14Remove Version#to_a aliasJack Nagel
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-11Fix version misdetection from fa582cb9ac65Jack Nagel
2013-06-05Define to_s for Version::TokenJack Nagel
2013-06-05Improve tokenization of version stringsJack Nagel
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-03make erlang versions case-insensitive for bottles.Mike McQuaid
2013-05-19Version: dup @version in #to_sJack Nagel
2013-05-06Avoid extra array allocationsJack Nagel
2013-04-27Avoid capturing groups when unnusedJack Nagel
2013-04-27Combine GitHub version regexesJack Nagel
2013-04-16VersionElement: attempt most likely match firstJack Nagel
2013-04-16Only call Pathname#to_s once per Version objectJack Nagel
2013-04-15Optimize Version#<=>Jack Nagel
2013-02-07MacOSVersion -> MacOS::VersionJack Nagel
2013-02-06Version: remove pointless private callJack Nagel
2013-02-06Version: kill silly class methodJack Nagel
Overriding <=> directly is much simpler.
2013-01-30jpeg: support version format.Mike McQuaid
2013-01-15version: mark some methods as protectedJack Nagel
2013-01-07version: mark some implementation details as protectedJack Nagel
2013-01-01Add Apache version style.Cyril Scetbon
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2012-12-16Add another Erlang version format.Mike McQuaid
2012-10-16Add Jenkins version matching (and test).Mike McQuaid
2012-08-25erlang: fix version detection and bottles.Mike McQuaid
2012-08-23Version: make MacOSVersion comparison more robustJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18Version: build-in devel version comparisonsJack Nagel
The heuristic used by the default version comparison is simple. A version string is scanned for strings of digits, split into an array of these strings, and then an element-wise comparison is done. This fails when presented with something like Version.new("1.0.0beta7") <=> Version.new("1.0.0") because the first three digits match, and the fourth digit of the receiver (7) is greater than the assumed fourth digit of the parameter (0). Fix this by defining an element-wise comparator on a new VersionElement class. This allows us to correctly compare "alpha", "beta", and "rc" style version strings, and keeps the logic out of the main version comparison. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18Add custom comparator for MacOS.versionJack Nagel
This will allow us to do comparisons like if MacOS.version >= :lion and hopefully deprecate the MacOS.<name>? family of methods, which are counterinitutive.
2012-08-18Add small DSL for defining comparatorsJack Nagel
2012-08-18Add support for custom version schemesJack Nagel
A version scheme is a class that inherits from Version and reimplements Version#<=>. This will allow formulae to specify a custom comparison method that will be used instead of the default, for cases where the default is insufficient.
2012-08-18Add Version#detected_from_url?Jack Nagel
2012-08-18Move version detection to Version classJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18Initial version comparison implementationJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18Add Version classJack Nagel