diff options
author | John Keiser <john@johnkeiser.com> | 2015-04-30 17:01:36 -0700 |
---|---|---|
committer | John Keiser <john@johnkeiser.com> | 2015-05-13 13:43:13 -0700 |
commit | 3eebfe4b433761b079fad0c543c1a93b555f546b (patch) | |
tree | c744e59efc757e79da0bcdc5eff066b3f42e784f | |
parent | 763f1c5c425ecf178929caf4cdcb7d855cf65a55 (diff) | |
download | chef-3eebfe4b433761b079fad0c543c1a93b555f546b.tar.gz |
Remove provides_nothing
-rw-r--r-- | lib/chef/mixin/provides.rb | 4 | ||||
-rw-r--r-- | lib/chef/resource.rb | 11 | ||||
-rw-r--r-- | lib/chef/resource/lwrp_base.rb | 3 | ||||
-rw-r--r-- | spec/integration/recipes/recipe_dsl_spec.rb | 16 |
4 files changed, 0 insertions, 34 deletions
diff --git a/lib/chef/mixin/provides.rb b/lib/chef/mixin/provides.rb index 5062ef24dd..d71097ca4b 100644 --- a/lib/chef/mixin/provides.rb +++ b/lib/chef/mixin/provides.rb @@ -23,10 +23,6 @@ class Chef node_map.set(short_name, true, opts, &block) end - def provides_nothing - node_map.clear - end - # Check whether this resource provides the resource_name DSL for the given # node def provides?(node, resource_name) diff --git a/lib/chef/resource.rb b/lib/chef/resource.rb index c7d9f9549d..ee940c98d4 100644 --- a/lib/chef/resource.rb +++ b/lib/chef/resource.rb @@ -978,17 +978,6 @@ class Chef Chef::DSL::Resources.add_resource_dsl(name) end - def self.provides_nothing - unprovided_names = super - - unprovided_names.each do |name| - resource = resource_matching_short_name(name) - if !resource || resource == self - Chef::DSL::Resources.remove_resource_dsl(name) - end - end - end - # Helper for #notifies def validate_resource_spec!(resource_spec) run_context.resource_collection.validate_lookup_spec!(resource_spec) diff --git a/lib/chef/resource/lwrp_base.rb b/lib/chef/resource/lwrp_base.rb index c7a5f9d02e..f702db5c96 100644 --- a/lib/chef/resource/lwrp_base.rb +++ b/lib/chef/resource/lwrp_base.rb @@ -28,9 +28,6 @@ class Chef # so attributes, default action, etc. can be defined with pleasing syntax. class LWRPBase < Resource - # Don't create DSL for l_w_r_p_base - provides_nothing - NULL_ARG = Object.new extend Chef::Mixin::ConvertToClassName diff --git a/spec/integration/recipes/recipe_dsl_spec.rb b/spec/integration/recipes/recipe_dsl_spec.rb index 0b4ea80112..99b32eb3f1 100644 --- a/spec/integration/recipes/recipe_dsl_spec.rb +++ b/spec/integration/recipes/recipe_dsl_spec.rb @@ -208,22 +208,6 @@ describe "Recipe DSL methods" do end end - context "When Thingy6 uses provides_nothing" do - before(:context) { - - class Foo::Thingy6 < Chef::Resource - provides_nothing - end - - } - - it "thingy6 does not work in a recipe" do - expect_converge { - thingy6 'blah' do; end - }.to raise_error(NoMethodError) - end - end - context "With platform-specific resources 'my_super_thingy_foo' and 'my_super_thingy_bar'" do before(:context) { class MySuperThingyFoo < BaseThingy |