summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Keiser <jkeiser@opscode.com>2014-08-27 14:28:53 -0700
committerJohn Keiser <jkeiser@opscode.com>2014-08-27 17:10:44 -0700
commit395534b88d54e6ec57eadfaab81c736c688e7938 (patch)
tree57d8ce8aab0c25ee79593c64cf8df9a20bd53f50
parenta2c8256a6d699f254b24de61e2a7e1a20bbb2c3d (diff)
downloadchef-jk/remove_deprecated_ivars.tar.gz
Remove deprecated @node ivarsjk/remove_deprecated_ivars
-rw-r--r--lib/chef/recipe.rb1
-rw-r--r--lib/chef/resource.rb8
-rw-r--r--spec/unit/resource_spec.rb4
3 files changed, 3 insertions, 10 deletions
diff --git a/lib/chef/recipe.rb b/lib/chef/recipe.rb
index 5b95d80590..32578da5ab 100644
--- a/lib/chef/recipe.rb
+++ b/lib/chef/recipe.rb
@@ -69,7 +69,6 @@ class Chef
@run_context = run_context
# TODO: 5/19/2010 cw/tim: determine whether this can be removed
@params = Hash.new
- @node = deprecated_ivar(run_context.node, :node, :warn)
end
# Used in DSL mixins
diff --git a/lib/chef/resource.rb b/lib/chef/resource.rb
index 84d6a2fca6..70abfbcdb0 100644
--- a/lib/chef/resource.rb
+++ b/lib/chef/resource.rb
@@ -23,7 +23,7 @@ require 'chef/dsl/data_query'
require 'chef/dsl/registry_helper'
require 'chef/dsl/reboot_pending'
require 'chef/mixin/convert_to_class_name'
-require 'chef//guard_interpreter/resource_guard_interpreter'
+require 'chef/guard_interpreter/resource_guard_interpreter'
require 'chef/resource/conditional'
require 'chef/resource/conditional_action_not_nothing'
require 'chef/resource_collection'
@@ -121,8 +121,8 @@ F
end
- FORBIDDEN_IVARS = [:@run_context, :@node, :@not_if, :@only_if, :@enclosing_provider]
- HIDDEN_IVARS = [:@allowed_actions, :@resource_name, :@source_line, :@run_context, :@name, :@node, :@not_if, :@only_if, :@elapsed_time, :@enclosing_provider]
+ FORBIDDEN_IVARS = [:@run_context, :@not_if, :@only_if, :@enclosing_provider]
+ HIDDEN_IVARS = [:@allowed_actions, :@resource_name, :@source_line, :@run_context, :@name, :@not_if, :@only_if, :@elapsed_time, :@enclosing_provider]
include Chef::DSL::DataQuery
include Chef::Mixin::ParamsValidate
@@ -253,8 +253,6 @@ F
@guard_interpreter = :default
@elapsed_time = 0
@sensitive = false
-
- @node = run_context ? deprecated_ivar(run_context.node, :node, :warn) : nil
end
# Returns a Hash of attribute => value for the state attributes declared in
diff --git a/spec/unit/resource_spec.rb b/spec/unit/resource_spec.rb
index 70941e4e82..7a88c7ff09 100644
--- a/spec/unit/resource_spec.rb
+++ b/spec/unit/resource_spec.rb
@@ -421,10 +421,6 @@ describe Chef::Resource do
end
- it "supports accessing the node via the @node instance variable [DEPRECATED]" do
- @resource.instance_variable_get(:@node).inspect.should == @node.inspect
- end
-
it "runs an action by finding its provider, loading the current resource and then running the action" do
pending
end