diff options
author | Ivan Larionov <ivan.larionov@skype.net> | 2014-01-21 13:41:51 +0400 |
---|---|---|
committer | Ivan Larionov <ivan.larionov@skype.net> | 2014-05-31 03:21:59 +0400 |
commit | ab216f0ee10022b2d9c2a65b6c13c9e75d456ad4 (patch) | |
tree | f9e302dbfbe59c62971918a4be2eb0d67c7cea5a /lib/chef/data_bag.rb | |
parent | 42bbac859fe520f1c6fe2626ca109ea4edd322a2 (diff) | |
download | chef-ab216f0ee10022b2d9c2a65b6c13c9e75d456ad4.tar.gz |
[CHEF-3399] Use first seen data bag (do not overwrite). Tests.
Diffstat (limited to 'lib/chef/data_bag.rb')
-rw-r--r-- | lib/chef/data_bag.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/data_bag.rb b/lib/chef/data_bag.rb index e940e6452b..91c0fb6869 100644 --- a/lib/chef/data_bag.rb +++ b/lib/chef/data_bag.rb @@ -118,10 +118,10 @@ class Chef data = Dir.glob(File.join(path, name.to_s, "*.json")).inject({}) do |bag, f| item = Chef::JSONCompat.from_json(IO.read(f)) - bag[item['id']] = item + bag[item["id"]] = item bag end - data_bag.merge! data + data_bag = data.merge(data_bag) end return data_bag else |