diff options
author | tyler-ball <tyleraball@gmail.com> | 2014-09-26 16:18:48 -0700 |
---|---|---|
committer | tyler-ball <tyleraball@gmail.com> | 2014-09-26 16:18:48 -0700 |
commit | e3f2e8471cd97340c28b7541ffb0fa7143a33ca4 (patch) | |
tree | 0b6451871dc704ab7988c19ed5f53e5318a7bd5f /lib/chef_zero/endpoints/sandbox_endpoint.rb | |
parent | 15f4a3e533eefa59412e81c0252af3166541ede0 (diff) | |
download | chef-zero-e3f2e8471cd97340c28b7541ffb0fa7143a33ca4.tar.gz |
Removing 'json' gem dependency, replacing with 'ffi-yajl'tball/chef-zero-yajl-replace-json
Diffstat (limited to 'lib/chef_zero/endpoints/sandbox_endpoint.rb')
-rw-r--r-- | lib/chef_zero/endpoints/sandbox_endpoint.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef_zero/endpoints/sandbox_endpoint.rb b/lib/chef_zero/endpoints/sandbox_endpoint.rb index 3a8e139..c6a3508 100644 --- a/lib/chef_zero/endpoints/sandbox_endpoint.rb +++ b/lib/chef_zero/endpoints/sandbox_endpoint.rb @@ -1,13 +1,13 @@ require 'chef_zero/rest_base' require 'chef_zero/rest_error_response' -require 'json' +require 'ffi_yajl' module ChefZero module Endpoints # /sandboxes/ID class SandboxEndpoint < RestBase def put(request) - existing_sandbox = JSON.parse(get_data(request), :create_additions => false) + 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]) raise RestErrorResponse.new(503, "Checksum not uploaded: #{checksum}") |