Skip to content

Commit

Permalink
Merge pull request #171 from chef/lcg/chef-version-support
Browse files Browse the repository at this point in the history
add patch to support chef_version
  • Loading branch information
thommay authored Jul 19, 2016
2 parents dc9d105 + 8e86b95 commit 9d235fd
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/chef_zero/chef_data/cookbook_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,15 @@ def cookbook_arg(key, cookbook, version_constraints)
self[key][cookbook] = version_constraints.first || ">= 0.0.0"
end

def method_missing(key, value = nil)
if value.nil?
def method_missing(key, *values)
if values.nil?
self[key.to_sym]
else
store key.to_sym, value
if values.length > 1
store key.to_sym, values
else
store key.to_sym, values.first
end
end
end
end
Expand Down

0 comments on commit 9d235fd

Please sign in to comment.