aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/bottles.rb4
-rw-r--r--Library/Homebrew/macos.rb10
-rw-r--r--Library/Homebrew/os/mac/xcode.rb10
-rw-r--r--Library/Homebrew/test/test_bottle_tag.rb14
-rw-r--r--Library/Homebrew/test/test_dependency_collector.rb8
-rw-r--r--Library/Homebrew/test/test_version_subclasses.rb10
6 files changed, 28 insertions, 28 deletions
diff --git a/Library/Homebrew/bottles.rb b/Library/Homebrew/bottles.rb
index 7d9545f38..e043df2b0 100644
--- a/Library/Homebrew/bottles.rb
+++ b/Library/Homebrew/bottles.rb
@@ -81,9 +81,9 @@ end
def bottle_tag
case MacOS.version
- when 10.8, 10.7, 10.5
+ when "10.8", "10.7", "10.5"
MacOS.cat
- when 10.6
+ when "10.6"
Hardware::CPU.is_64_bit? ? :snow_leopard : :snow_leopard_32
else
Hardware::CPU.type == :ppc ? Hardware::CPU.family : MacOS.cat
diff --git a/Library/Homebrew/macos.rb b/Library/Homebrew/macos.rb
index 91c2050e8..54cf43487 100644
--- a/Library/Homebrew/macos.rb
+++ b/Library/Homebrew/macos.rb
@@ -11,11 +11,11 @@ module MacOS extend self
def cat
case MacOS.version
- when 10.8 then :mountain_lion
- when 10.7 then :lion
- when 10.6 then :snow_leopard
- when 10.5 then :leopard
- when 10.4 then :tiger
+ when "10.8" then :mountain_lion
+ when "10.7" then :lion
+ when "10.6" then :snow_leopard
+ when "10.5" then :leopard
+ when "10.4" then :tiger
end
end
diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb
index eaae6fbf8..3fdd90463 100644
--- a/Library/Homebrew/os/mac/xcode.rb
+++ b/Library/Homebrew/os/mac/xcode.rb
@@ -19,11 +19,11 @@ module MacOS::Xcode extend self
def latest_version
case MacOS.version
- when 10.4 then "2.5"
- when 10.5 then "3.1.4"
- when 10.6 then "3.2.6"
- when 10.7, 10.8 then "4.6.3"
- when 10.9 then "5.0"
+ when "10.4" then "2.5"
+ when "10.5" then "3.1.4"
+ when "10.6" then "3.2.6"
+ when "10.7", "10.8" then "4.6.3"
+ when "10.9" then "5.0"
else
# Default to newest known version of Xcode for unreleased OSX versions.
if MacOS.version > 10.9
diff --git a/Library/Homebrew/test/test_bottle_tag.rb b/Library/Homebrew/test/test_bottle_tag.rb
index 2b039a29f..3dc51943a 100644
--- a/Library/Homebrew/test/test_bottle_tag.rb
+++ b/Library/Homebrew/test/test_bottle_tag.rb
@@ -3,42 +3,42 @@ require 'bottles'
class BottleTagTests < Test::Unit::TestCase
def test_cat_tiger_ppc
- MacOS.stubs(:version).returns(MacOS::Version.new(10.4))
+ MacOS.stubs(:version).returns(MacOS::Version.new("10.4"))
Hardware::CPU.stubs(:type).returns(:ppc)
Hardware::CPU.stubs(:family).returns(:foo)
assert_equal :foo, bottle_tag
end
def test_cat_tiger_intel
- MacOS.stubs(:version).returns(MacOS::Version.new(10.4))
+ MacOS.stubs(:version).returns(MacOS::Version.new("10.4"))
Hardware::CPU.stubs(:type).returns(:intel)
assert_equal :tiger, bottle_tag
end
def test_cat_leopard
- MacOS.stubs(:version).returns(MacOS::Version.new(10.5))
+ MacOS.stubs(:version).returns(MacOS::Version.new("10.5"))
assert_equal :leopard, bottle_tag
end
def test_cat_snow_leopard_32
- MacOS.stubs(:version).returns(MacOS::Version.new(10.6))
+ MacOS.stubs(:version).returns(MacOS::Version.new("10.6"))
Hardware::CPU.stubs(:is_64_bit?).returns(false)
assert_equal :snow_leopard_32, bottle_tag
end
def test_cat_snow_leopard_64
- MacOS.stubs(:version).returns(MacOS::Version.new(10.6))
+ MacOS.stubs(:version).returns(MacOS::Version.new("10.6"))
Hardware::CPU.stubs(:is_64_bit?).returns(true)
assert_equal :snow_leopard, bottle_tag
end
def test_cat_lion
- MacOS.stubs(:version).returns(MacOS::Version.new(10.7))
+ MacOS.stubs(:version).returns(MacOS::Version.new("10.7"))
assert_equal :lion, bottle_tag
end
def test_cat_mountain_lion
- MacOS.stubs(:version).returns(MacOS::Version.new(10.8))
+ MacOS.stubs(:version).returns(MacOS::Version.new("10.8"))
assert_equal :mountain_lion, bottle_tag
end
end
diff --git a/Library/Homebrew/test/test_dependency_collector.rb b/Library/Homebrew/test/test_dependency_collector.rb
index 0b4c19ebf..dafc83da0 100644
--- a/Library/Homebrew/test/test_dependency_collector.rb
+++ b/Library/Homebrew/test/test_dependency_collector.rb
@@ -102,22 +102,22 @@ class DependencyCollectorTests < Test::Unit::TestCase
end
def test_x11_proxy_dep_mountain_lion
- MacOS.stubs(:version).returns(MacOS::Version.new(10.8))
+ MacOS.stubs(:version).returns(MacOS::Version.new("10.8"))
assert_equal Dependency.new("libpng"), @d.build(:libpng)
end
def test_x11_proxy_dep_lion_or_older
- MacOS.stubs(:version).returns(MacOS::Version.new(10.7))
+ MacOS.stubs(:version).returns(MacOS::Version.new("10.7"))
assert_equal X11Dependency::Proxy.new(:libpng), @d.build(:libpng)
end
def test_ld64_dep_pre_leopard
- MacOS.stubs(:version).returns(MacOS::Version.new(10.4))
+ MacOS.stubs(:version).returns(MacOS::Version.new("10.4"))
assert_equal LD64Dependency.new, @d.build(:ld64)
end
def test_ld64_dep_leopard_or_newer
- MacOS.stubs(:version).returns(MacOS::Version.new(10.5))
+ MacOS.stubs(:version).returns(MacOS::Version.new("10.5"))
assert_nil @d.build(:ld64)
end
diff --git a/Library/Homebrew/test/test_version_subclasses.rb b/Library/Homebrew/test/test_version_subclasses.rb
index 6b18246ba..546fcadaa 100644
--- a/Library/Homebrew/test/test_version_subclasses.rb
+++ b/Library/Homebrew/test/test_version_subclasses.rb
@@ -4,7 +4,7 @@ require 'os/mac/version'
class MacOSVersionTests < Test::Unit::TestCase
def setup
- @v = MacOS::Version.new(10.7)
+ @v = MacOS::Version.new("10.7")
end
def test_compare_with_symbol
@@ -34,9 +34,9 @@ class MacOSVersionTests < Test::Unit::TestCase
end
def test_compare_with_version
- assert_operator @v, :>, Version.new(10.6)
- assert_operator @v, :==, Version.new(10.7)
- assert_operator @v, :===, Version.new(10.7)
- assert_operator @v, :<, Version.new(10.8)
+ assert_operator @v, :>, Version.new("10.6")
+ assert_operator @v, :==, Version.new("10.7")
+ assert_operator @v, :===, Version.new("10.7")
+ assert_operator @v, :<, Version.new("10.8")
end
end