lib/putio/client.rb in putio-cli-0.0.2 vs lib/putio/client.rb in putio-cli-0.0.3

- old
+ new

@@ -1,11 +1,10 @@ ## ## Let's include our dependencies. ## require 'curb' require 'rubygems' -require 'crack/json' require 'hashie' require 'json' require 'uri' require 'cgi' @@ -479,14 +478,10 @@ else response = Curl.get(url) { |req| req.headers['Accept'] = 'application/json' } end # Use Crack to parse the JSON - begin - response = Crack::JSON.parse(response.body_str) - rescue Psych::SyntaxError - response = JSON::parse(response.body_str) - end + response = JSON::parse(response.body_str) # And use Hashie to present it. response = Hashie::Mash.new(response) end