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 +1 -1
- data/lib/eshq/client.rb +2 -3
- data/lib/eshq/version.rb +1 -1
- metadata +3 -3
data/eshq.gemspec
CHANGED
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 "
|
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
|
-
|
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
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.
|
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-
|
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:
|
63
|
+
name: multi_json
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
65
65
|
none: false
|
66
66
|
requirements:
|