active_record_api-request 0.1.6 → 0.1.7
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00cca855c966207369c76d9bb3fa647aa61bf5039a5eec0f5e26926d2f8b7641
|
4
|
+
data.tar.gz: f2653333bd6cddbef98d66a39faf66bed25e7701c410cf95f461c7654c527408
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cda7a029dd4aabba9a66dde51096497f2191f21ba276e5a4e33fcc17cafaaaf3c32ac5dfaaf6752fd0262aa47aaf23fdd4237de4494ae17b098b4c0aa447e40f
|
7
|
+
data.tar.gz: 9efc9c43ed5d73b32f7d1e3ba5e665bb9631f22c0ad6001b7ffb6bfbea5521bf15865f0ed1711495b5342216fbccfd2911dfa64297bb0e85611e4f4eed16fb33
|
@@ -45,14 +45,18 @@ module ActiveRecordApi
|
|
45
45
|
|
46
46
|
def symbolize_response(response)
|
47
47
|
return response if response.is_a? String
|
48
|
-
if response.is_a?
|
49
|
-
|
50
|
-
response.map!(&:deep_symbolize_keys!)
|
48
|
+
if response.is_a?(Array)
|
49
|
+
symbolize_array_response(response)
|
51
50
|
else
|
52
51
|
response.try(:deep_symbolize_keys!)
|
53
52
|
end
|
54
53
|
end
|
55
54
|
|
55
|
+
def symbolize_array_response(response)
|
56
|
+
return response unless response.first.is_a? Hash
|
57
|
+
response.map!(&:deep_symbolize_keys!)
|
58
|
+
end
|
59
|
+
|
56
60
|
def http_cache_options
|
57
61
|
http_cache_options = { shared_cache: false, store: cache_store }
|
58
62
|
http_cache_options[:logger] = Rails.logger if debug
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_record_api-request
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Full Measure Education
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_attr
|