diff options
| author | Jack Nagel | 2014-08-09 16:26:59 -0500 | 
|---|---|---|
| committer | Jack Nagel | 2014-08-09 16:27:57 -0500 | 
| commit | 9d4434d74591d400aac787f14fc521d3679ba1ca (patch) | |
| tree | d65402bf85f24d4c7fdaf31d5ffc0bd13d62b5a6 | |
| parent | 94070288157d76092e85ff1d03ef7a154dcb4783 (diff) | |
| download | homebrew-9d4434d74591d400aac787f14fc521d3679ba1ca.tar.bz2 | |
Stop exposing combined options from the tab
| -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  | 
