google_rest 1.0.1 → 1.0.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.
- data/lib/google_rest.rb +6 -4
- metadata +4 -4
data/lib/google_rest.rb
CHANGED
@@ -214,10 +214,12 @@ module GoogleRest
|
|
214
214
|
|
215
215
|
# A utility method for unescaping recursively HTML entities in JSON array or hash.
|
216
216
|
def json_recursive_unescape(data)
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
217
|
+
if data.is_a?(String)
|
218
|
+
json_unescape(data)
|
219
|
+
elsif data.is_a?(Hash)
|
220
|
+
data.inject({}) { |hsh, (k,v)| hsh[k] = json_recursive_unescape(v);hsh }
|
221
|
+
elsif data.is_a?(Array)
|
222
|
+
data.collect { |v| json_recursive_unescape(v) }
|
221
223
|
end
|
222
224
|
end
|
223
225
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google_rest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 2
|
10
|
+
version: 1.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Olivier Ruffin
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-11-13 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|