19 Commits

Author SHA1 Message Date
Dominyk Tiller
5a9dad0bf0
mac/version: add High Sierra symbol 2017-06-05 19:40:33 +01:00
Mike McQuaid
3982950e61 rubocop --auto-correct all hash-rocket usage. 2016-09-17 16:14:13 +01:00
Mike McQuaid
00f5aa81f2 os/mac/version: fix Rubocop warnings. 2016-09-11 17:49:27 +01:00
Mike McQuaid
1c46db9a73 os/mac/version: add macOS Sierra. (#353) 2016-06-13 19:20:00 +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
Dominyk Tiller
90c8b82d38 os: initial El Capitan support 2015-06-14 18:38:55 +01:00
Jack Nagel
596f3ba0a0 Raise ArgumentError when a symbol can't be mapped to a version
The fact that this is implemented as a hash lookup is an implementation
detail, so don't let the KeyError bubble up.
2014-07-16 21:11:48 -05:00
Andy Blyler
6bbe82062e Add yosemite to mac versions
Closes Homebrew/homebrew#29823.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-06-03 15:06:46 -05:00
Jack Nagel
d3e19b1504 Simplify MacOS.version.to_sym 2014-06-03 11:32:26 -05:00
Jack Nagel
f1808cd66d Don't coerce value to string unnecessarily 2014-06-03 11:32:26 -05:00
Jack Nagel
c13311ca09 Cache MacOS.version comparison results
MacOS.version#<=> is called many, many times during formula loading with
the same half dozen or so arguments. A typical call to this method
involves:

 * a hash lookup to convert a symbol argument to a string
 * creation of a throw-away Version object wrapping the argument
 * the actual version comparison, which is not cheap

This makes it a prime candidate to be memoized.
2014-04-02 20:29:20 -05:00
Jack Nagel
8887fe7606 Move MacOS modules under OS::Mac namespace
Closes Homebrew/homebrew#23138.
2013-10-18 13:38:07 -05:00
Jack Nagel
49c9097b07 Push MacOS.cat logic down into MacOS::Version 2013-06-15 19:40:42 -05:00
Jack Nagel
3cd1a0e696 Add MacOS::Version.from_symbol 2013-06-15 19:39:27 -05:00
Jack Nagel
e59456515d Pass these as strings, they get converted anyway 2013-06-14 19:10:14 -05:00
Adam Vandenberg
ca10e5005a Fix pretty names 2013-06-14 14:47:16 -07:00
Adam Vandenberg
8739eeab7d Move pretty_name into MacOS::Version
Closes Homebrew/homebrew#20507.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-06-14 13:36:20 -07:00
Misty De Meo
5d48f46178 MacOS::Version: add :tiger 2013-05-20 18:41:49 -05:00
Shaun Jackman
258d70028f Portability fixes to run Homebrew on Linux systems
Closes Homebrew/homebrew#16344.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-03-11 18:26:25 +00:00