hotdogprincess 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/hotdogprincess/client.rb +10 -6
- data/lib/hotdogprincess/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9e16815c51bd2ee038e11ae01a25c532c2a772a2
|
|
4
|
+
data.tar.gz: f8fd57fe68720a67246e591b3ea96bab98d4444b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eb6f6033adf9ce5697ae0aeeb4828bb71e3386f2ec9600ddb8fb45743af10331efb1901150c535d4ed0de1829f31c873aa9ffeff1cf4f459f79fe90400ba7c2d
|
|
7
|
+
data.tar.gz: 46562d43b669e0fad4a24870f318854718325819ba27ccfde2b155f94da1576e0360d0339a295bd9665a1f658830fe4618cdb8df10f977d0da727c9d720dfef0
|
|
@@ -97,11 +97,15 @@ module HotDogPrincess
|
|
|
97
97
|
def clean_response(response)
|
|
98
98
|
return nil unless response and response.class == String
|
|
99
99
|
return nil unless response.length >= 3
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
100
|
+
begin
|
|
101
|
+
# "\xEF", "\xBB", "\xBF"
|
|
102
|
+
if response[0].ord == 239 and response[1].ord == 187 and response[2].ord == 191
|
|
103
|
+
response_hash = JSON.parse response[3..-1]
|
|
104
|
+
else
|
|
105
|
+
response_hash = JSON.parse response
|
|
106
|
+
end
|
|
107
|
+
rescue
|
|
108
|
+
response_hash = nil
|
|
105
109
|
end
|
|
106
110
|
response_hash
|
|
107
111
|
end
|
|
@@ -112,7 +116,7 @@ module HotDogPrincess
|
|
|
112
116
|
|
|
113
117
|
def status_json(object)
|
|
114
118
|
status = status(object)
|
|
115
|
-
status_hash = schema_parse(status['
|
|
119
|
+
status_hash = schema_parse(status['Entities']['Status'])
|
|
116
120
|
|
|
117
121
|
JSON.generate(status_hash)
|
|
118
122
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: hotdogprincess
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Matthew Callis
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-08-
|
|
11
|
+
date: 2014-08-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|