From ca3c72726786673140fadfcad52a2e450219ad6e Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sat, 9 Aug 2014 16:26:59 -0500 Subject: [PATCH] Stop exposing combined options from the tab --- Library/Homebrew/tab.rb | 12 +----------- Library/Homebrew/test/test_tab.rb | 6 ------ 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/Library/Homebrew/tab.rb b/Library/Homebrew/tab.rb index 93ee8fd374..5dedc4d3c1 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 4e0cd03f26..599fb89de8 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