diff options
author | Tim Smith <tsmith84@gmail.com> | 2019-12-29 18:00:24 -0800 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2019-12-29 18:00:24 -0800 |
commit | ecad8fee4a946b337e60a4274de2b2c872c9e81b (patch) | |
tree | bbf7fc8b3feae42007f7b9d7fe53648d315c410a /lib/chef_zero/endpoints/cookbook_version_endpoint.rb | |
parent | a8206d6c6f03de1fde15c49f6fe9ddb1d0071b7a (diff) | |
download | chef-zero-ecad8fee4a946b337e60a4274de2b2c872c9e81b.tar.gz |
Apply Chefstyle
Autocorrect with the latest chefstyle
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef_zero/endpoints/cookbook_version_endpoint.rb')
-rw-r--r-- | lib/chef_zero/endpoints/cookbook_version_endpoint.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/chef_zero/endpoints/cookbook_version_endpoint.rb b/lib/chef_zero/endpoints/cookbook_version_endpoint.rb index 0ee5be7..5ec1aa4 100644 --- a/lib/chef_zero/endpoints/cookbook_version_endpoint.rb +++ b/lib/chef_zero/endpoints/cookbook_version_endpoint.rb @@ -27,9 +27,10 @@ module ChefZero if request.query_params["force"] != "true" raise RestErrorResponse.new(409, "The cookbook #{name} at version #{version} is frozen. Use the 'force' option to override.") end + # For some reason, you are forever unable to modify "frozen?" on a frozen cookbook. request_body = FFI_Yajl::Parser.parse(request.body) - if !request_body["frozen?"] + unless request_body["frozen?"] request_body["frozen?"] = true request.body = FFI_Yajl::Encoder.encode(request_body, pretty: true) end @@ -92,6 +93,7 @@ module ChefZero rescue ChefZero::DataStore::DataNotFoundError # Not all chef versions support cookbook_artifacts raise unless cookbook_type == "cookbook_artifacts" + cookbooks = [] end cookbooks.each do |cookbook_name| |