hotdogprincess 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e7c35fd12cdfc18cf8f3184c216dc0431aa5b129
4
- data.tar.gz: 1df368952003b482dd2f857a921964c9e4728b31
3
+ metadata.gz: 9e16815c51bd2ee038e11ae01a25c532c2a772a2
4
+ data.tar.gz: f8fd57fe68720a67246e591b3ea96bab98d4444b
5
5
  SHA512:
6
- metadata.gz: 98743b6e01e4ecf64d5cdc3eec8f7df3bff6815ad9e3667a42b24b0db0e7d6756ea435ce6dcd6d1d1167f50adb9f57df02e52406b9b7b2915ef90a166ad8d27c
7
- data.tar.gz: b9e01d4b3a3401a45b254f048866e5d5610212341e833859d9b3390419f262105c9384de412cc0a9d4a88b15a02557815ad020c86655f1fca79321b43797c3f9
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
- # "\xEF", "\xBB", "\xBF"
101
- if response[0].ord == 239 and response[1].ord == 187 and response[2].ord == 191
102
- response_hash = JSON.parse response[3..-1]
103
- else
104
- response_hash = JSON.parse response
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['entities']['Status'])
119
+ status_hash = schema_parse(status['Entities']['Status'])
116
120
 
117
121
  JSON.generate(status_hash)
118
122
  end
@@ -1,3 +1,3 @@
1
1
  module HotDogPrincess
2
- VERSION = "0.1.1".freeze
2
+ VERSION = "0.1.2".freeze
3
3
  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.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-21 00:00:00.000000000 Z
11
+ date: 2014-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler