chockstone 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/chockstone.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{chockstone}
3
- s.version = %q{0.3.0}
3
+ s.version = %q{0.3.1}
4
4
  s.summary = ""
5
5
  s.description = "Wrapper for Chockstone API requests"
6
6
  s.authors = ["Thomas Mulloy"]
@@ -147,7 +147,7 @@ module Chockstone
147
147
  }
148
148
 
149
149
  formatted_response.merge!({ :alert => alert }) unless alert[:name].nil? and alert[:type].nil?
150
- formatted_response.merge!({ :data => data }) unless data.blank?
150
+ formatted_response.merge!({ :data => key_to_sym(data) }) unless data.blank?
151
151
 
152
152
  formatted_response
153
153
 
@@ -187,6 +187,12 @@ module Chockstone
187
187
  }
188
188
 
189
189
  end
190
+
191
+ def key_to_sym hash
192
+ return hash unless hash.is_a?(Hash)
193
+ hash = hash.inject({}){|memo,(k,v)| memo[k.to_sym] = s_key_to_sym(v); memo}
194
+ hash
195
+ end
190
196
  end
191
197
 
192
198
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chockstone
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: