eshq 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/eshq.gemspec CHANGED
@@ -23,5 +23,5 @@ Gem::Specification.new do |s|
23
23
  s.add_development_dependency "timecop"
24
24
  s.add_development_dependency "fakeweb"
25
25
 
26
- s.add_runtime_dependency "json"
26
+ s.add_runtime_dependency "multi_json"
27
27
  end
data/lib/eshq/client.rb CHANGED
@@ -1,14 +1,13 @@
1
1
  require "digest/sha1"
2
2
  require "net/http"
3
3
  require "uri"
4
- require "json"
4
+ require "multi_json"
5
5
 
6
6
  module ESHQ
7
7
  class Client
8
8
  attr_reader :url, :key, :secret
9
9
 
10
10
  def initialize(url, api_key, api_secret)
11
- puts "NEW"
12
11
  @url = url
13
12
  @key = api_key
14
13
  @secret = api_secret
@@ -26,7 +25,7 @@ module ESHQ
26
25
 
27
26
  response = http.request(request)
28
27
  if response.code == "200"
29
- response.content_type == "application/json" ? JSON.parse(response.body) : true
28
+ response.content_type == "application/json" ? MultiJson.load(response.body) : true
30
29
  else
31
30
  raise "Error #{response.body}"
32
31
  end
data/lib/eshq/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module ESHQ
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eshq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-09 00:00:00.000000000 Z
12
+ date: 2012-09-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mocha
@@ -60,7 +60,7 @@ dependencies:
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  - !ruby/object:Gem::Dependency
63
- name: json
63
+ name: multi_json
64
64
  requirement: !ruby/object:Gem::Requirement
65
65
  none: false
66
66
  requirements: