Skip to content
Snippets Groups Projects
Commit c5aecf3d authored by Julio Capote's avatar Julio Capote
Browse files

Merge pull request #9 from computology/fix_json_require

use multi_json instead of a json parser directly
parents b70283f4 c04fc700
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -3,4 +3,3 @@ rvm:
- 1.8.7
- 1.9.3
- 2.1.0
sudo: false
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