diff options
author | Thom May <thom@may.lt> | 2016-01-28 16:53:41 +0000 |
---|---|---|
committer | Thom May <thom@may.lt> | 2016-01-28 16:53:41 +0000 |
commit | 3e5d447388ec483522273cb53bcc2d6c0057ca53 (patch) | |
tree | 0be02daac9b3db8c6c09d6aacd94756b0fab94f9 | |
parent | f0a0b3cdd1674dbf138e71fd1fb64939bad057df (diff) | |
parent | c79c3cb5a80c5260452e585e58bf71597a028774 (diff) | |
download | chef-3e5d447388ec483522273cb53bcc2d6c0057ca53.tar.gz |
Merge pull request #4479 from chef/fix-cookbook-artifact-normalization
Remove incorrect cookbook artifact normalization
-rw-r--r-- | lib/chef/chef_fs/chef_fs_data_store.rb | 6 | ||||
-rw-r--r-- | lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_artifact_dir.rb | 2 |
2 files changed, 1 insertions, 7 deletions
diff --git a/lib/chef/chef_fs/chef_fs_data_store.rb b/lib/chef/chef_fs/chef_fs_data_store.rb index 59c2699cca..729b01fdcc 100644 --- a/lib/chef/chef_fs/chef_fs_data_store.rb +++ b/lib/chef/chef_fs/chef_fs_data_store.rb @@ -333,13 +333,7 @@ class Chef end end - # Cookbook artifacts act as if certain things aren't set if they are empty - # (e.g. "definitions" and "libraries" are not set if they are empty, but - # "recipes" is) if cookbook_type == "cookbook_artifacts" - result.delete_if do |key,value| - (value == [] && key != "recipes") - end result["metadata"] = result["metadata"].to_hash result["metadata"].delete_if do |key,value| value == [] || diff --git a/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_artifact_dir.rb b/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_artifact_dir.rb index dbff973f17..0aab6382be 100644 --- a/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_artifact_dir.rb +++ b/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_artifact_dir.rb @@ -26,7 +26,7 @@ class Chef # Override from parent def cookbook_version loader = Chef::Cookbook::CookbookVersionLoader.new(file_path, parent.chefignore) - cookbook_name, dash, identifier = name.rpartition("-") + cookbook_name, _dash, identifier = name.rpartition("-") # KLUDGE: We shouldn't have to use instance_variable_set loader.instance_variable_set(:@cookbook_name, cookbook_name) loader.load_cookbooks |