diff options
Diffstat (limited to 'lib/chef_zero/endpoints/sandbox_endpoint.rb')
-rw-r--r-- | lib/chef_zero/endpoints/sandbox_endpoint.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/chef_zero/endpoints/sandbox_endpoint.rb b/lib/chef_zero/endpoints/sandbox_endpoint.rb index c6a3508..b83a4ca 100644 --- a/lib/chef_zero/endpoints/sandbox_endpoint.rb +++ b/lib/chef_zero/endpoints/sandbox_endpoint.rb @@ -1,6 +1,6 @@ -require 'chef_zero/rest_base' -require 'chef_zero/rest_error_response' -require 'ffi_yajl' +require "chef_zero/rest_base" +require "chef_zero/rest_error_response" +require "ffi_yajl" module ChefZero module Endpoints @@ -8,8 +8,8 @@ module ChefZero class SandboxEndpoint < RestBase def put(request) existing_sandbox = FFI_Yajl::Parser.parse(get_data(request), :create_additions => false) - existing_sandbox['checksums'].each do |checksum| - if !exists_data?(request, request.rest_path[0..1] + ['file_store', 'checksums', checksum]) + existing_sandbox["checksums"].each do |checksum| + if !exists_data?(request, request.rest_path[0..1] + ["file_store", "checksums", checksum]) raise RestErrorResponse.new(503, "Checksum not uploaded: #{checksum}") end end @@ -17,9 +17,9 @@ module ChefZero json_response(200, { :guid => request.rest_path[3], :name => request.rest_path[3], - :checksums => existing_sandbox['checksums'], - :create_time => existing_sandbox['create_time'], - :is_completed => true + :checksums => existing_sandbox["checksums"], + :create_time => existing_sandbox["create_time"], + :is_completed => true, }) end end |