summaryrefslogtreecommitdiff
path: root/spec/data
diff options
context:
space:
mode:
authorSeth Falcon <seth@opscode.com>2013-09-30 16:42:07 -0700
committerBryan McLellan <btm@opscode.com>2013-10-10 11:29:24 -0700
commit632999b8f25193e01f3851c0012c038164b51751 (patch)
treebbfc743f46d96f52912f67e0ec2227a2154f5731 /spec/data
parent8d9195e73573199317f8ec7534e4da2c93af430b (diff)
downloadchef-632999b8f25193e01f3851c0012c038164b51751.tar.gz
Prevent duplicate keys in cookbook version JSON
Reported in CHEF-4571. The recipes component of cookbook version metadata (cbv.metadata.recipes) serialized to JSON with duplicate keys if a metadata.rb was present that provided a recipe line matching the cookbook name (providing a description for the default recipe). The root cause is the behavior of the JSON serialized when called on a hash containing matching string and symbol keys. For example: chef > {"key1" => "sam", :key1 => "wat"}.to_json => "{\"key1\":\"sam\",\"key1\":\"wat\"}" So the specific fix is to prevent inserting a symbol key for the recipe name.
Diffstat (limited to 'spec/data')
-rw-r--r--spec/data/cookbooks/openldap/metadata.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/data/cookbooks/openldap/metadata.rb b/spec/data/cookbooks/openldap/metadata.rb
new file mode 100644
index 0000000000..ab0dface9d
--- /dev/null
+++ b/spec/data/cookbooks/openldap/metadata.rb
@@ -0,0 +1,8 @@
+name "openldap"
+maintainer "Opscode, Inc."
+maintainer_email "cookbooks@opscode.com"
+license "Apache 2.0"
+description "Installs and configures all aspects of openldap using Debian style symlinks with helper definitions"
+long_description "The long description for the openldap cookbook from metadata.rb"
+version "8.9.10"
+recipe "openldap", "Main Open LDAP configuration"