Commit 636ac12b authored by Adam Edwards's avatar Adam Edwards
Browse files

Refactor to move inheritance to script and derived resources

parent 7519f346
......@@ -121,7 +121,7 @@ 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, :@guard_inherited_attributes, :@elapsed_time, :@enclosing_provider]
HIDDEN_IVARS = [:@allowed_actions, :@resource_name, :@source_line, :@run_context, :@name, :@node, :@not_if, :@only_if, :@elapsed_time, :@enclosing_provider]
include Chef::DSL::DataQuery
include Chef::Mixin::ParamsValidate
......@@ -251,7 +251,6 @@ F
@not_if = []
@only_if = []
@guard_interpreter = :default
@guard_inherited_attributes = []
@source_line = nil
@elapsed_time = 0
......@@ -819,11 +818,6 @@ F
resource = resource_for_platform(short_name, platform, version)
resource
end
protected
def append_guard_inherited_attributes(inherited_attributes)
@guard_inherited_attributes.concat(inherited_attributes)
end
private
......
......@@ -41,15 +41,6 @@ class Chef
@user = nil
@allowed_actions.push(:run)
@umask = nil
append_guard_inherited_attributes(
[
:cwd,
:environment,
:group,
:path,
:user,
:umask
])
end
def umask(arg=nil)
......@@ -134,7 +125,11 @@ class Chef
)
end
protected
def append_guard_inherited_attributes(inherited_attributes)
@guard_inherited_attributes.concat(inherited_attributes)
end
end
end
......
......@@ -32,6 +32,16 @@ class Chef
@code = nil
@interpreter = nil
@flags = nil
@guard_inherited_attributes = []
append_guard_inherited_attributes(
[
:cwd,
:environment,
:group,
:path,
:user,
:umask
])
end
def code(arg=nil)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment