summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2015-04-30 17:01:36 -0700
committerJohn Keiser <john@johnkeiser.com>2015-05-07 17:02:12 -0700
commit5575d46d9854ec59de7a8897d6326309d04fbc2a (patch)
tree524f1f88028e13f9bbab7f12aa2d695a84c3c6d4
parent9e3803c4305ed738dc25afe392694c551a5d25de (diff)
downloadchef-5575d46d9854ec59de7a8897d6326309d04fbc2a.tar.gz
Remove provides_nothing
-rw-r--r--lib/chef/mixin/provides.rb4
-rw-r--r--lib/chef/resource.rb11
-rw-r--r--lib/chef/resource/lwrp_base.rb3
-rw-r--r--spec/integration/recipes/recipe_dsl_spec.rb16
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