diff options
| author | Jack Nagel | 2014-08-09 16:26:59 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-08-09 16:27:57 -0500 |
| commit | ca3c72726786673140fadfcad52a2e450219ad6e (patch) | |
| tree | dc2dab89d3503e93cc28688f6075a10be496e4d1 /Library | |
| parent | e0f86a1a86ec3c42e53fa4b6d29753925aaf2e09 (diff) | |
| download | brew-ca3c72726786673140fadfcad52a2e450219ad6e.tar.bz2 | |
Stop exposing combined options from the tab
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/tab.rb | 12 | ||||
| -rw-r--r-- | Library/Homebrew/test/test_tab.rb | 6 |
2 files changed, 1 insertions, 17 deletions
diff --git a/Library/Homebrew/tab.rb b/Library/Homebrew/tab.rb index 93ee8fd37..5dedc4d3c 100644 --- a/Library/Homebrew/tab.rb +++ b/Library/Homebrew/tab.rb @@ -82,13 +82,7 @@ class Tab < OpenStruct end def with? name - if options.include? "with-#{name}" - include? "with-#{name}" - elsif options.include? "without-#{name}" - not include? "without-#{name}" - else - false - end + include?("with-#{name}") || unused_options.include?("without-#{name}") end def without? name @@ -119,10 +113,6 @@ class Tab < OpenStruct Options.coerce(super) end - def options - used_options + unused_options - end - def cxxstdlib # Older tabs won't have these values, so provide sensible defaults lib = stdlib.to_sym if stdlib diff --git a/Library/Homebrew/test/test_tab.rb b/Library/Homebrew/test/test_tab.rb index 4e0cd03f2..599fb89de 100644 --- a/Library/Homebrew/test/test_tab.rb +++ b/Library/Homebrew/test/test_tab.rb @@ -25,7 +25,6 @@ class TabTests < Homebrew::TestCase tab = Tab.dummy_tab assert_empty tab.unused_options assert_empty tab.used_options - assert_empty tab.options refute_predicate tab, :built_as_bottle refute_predicate tab, :poured_from_bottle assert_empty tab.tapped_from @@ -52,10 +51,6 @@ class TabTests < Homebrew::TestCase assert_predicate tab, :universal? end - def test_options - assert_equal (@used + @unused).sort, @tab.options.sort - end - def test_cxxstdlib assert_equal :clang, @tab.cxxstdlib.compiler assert_equal :libcxx, @tab.cxxstdlib.type @@ -75,7 +70,6 @@ class TabTests < Homebrew::TestCase assert_equal @used.sort, tab.used_options.sort assert_equal @unused.sort, tab.unused_options.sort - assert_equal (@used + @unused).sort, tab.options.sort refute_predicate tab, :built_as_bottle assert_predicate tab, :poured_from_bottle assert_equal "Homebrew/homebrew", tab.tapped_from |
