Skip to content
Snippets Groups Projects
Commit af1e8473 authored by capotej's avatar capotej
Browse files

use multi_json instead of a json parser directly

parent b70283f4
No related branches found
No related tags found
No related merge requests found
require 'json/pure' unless JSON::Ext
require 'multi_json'
require 'mime'
require 'excon'
require 'packagecloud/result'
Loading
Loading
@@ -254,7 +254,7 @@ module Packagecloud
 
# returns the parsed body of a successful result
def parsed_json_result(response)
prepare_result(response) { |result| result.response = JSON.parse(response.data[:body]) }
prepare_result(response) { |result| result.response = MultiJson.load(response.data[:body]) }
end
 
def prepare_result(response)
Loading
Loading
module Packagecloud
MAJOR_VERSION = "0"
MINOR_VERSION = "2"
PATCH_VERSION = "22"
PATCH_VERSION = "23"
 
VERSION = [MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION].join(".")
end
Loading
Loading
@@ -18,6 +18,7 @@ Gem::Specification.new do |gem|
gem.require_paths = ['lib']
 
gem.add_runtime_dependency 'excon', '~> 0.40'
gem.add_runtime_dependency 'multi_json', '~> 1.0'
gem.add_runtime_dependency 'json_pure', '~> 1'
gem.add_runtime_dependency 'mime', '~> 0.4'
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment