api-model 2.5.0 → 2.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/api-model.gemspec +1 -1
- data/lib/api_model/response.rb +5 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d7d95d480605f33ce43a9218cbe26cef96f73e7
|
4
|
+
data.tar.gz: 49eb448b3c170f71b93d0f987012df51250071f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b3e9784c55ba0d165b23b40f3d8ff5afa4be9861d09cee0ff2698c5442eccc7a910e15d1ec3c2d55fc17ad470476d36793dfcce35b2747ae0904ab6b9471721
|
7
|
+
data.tar.gz: c64ca14dbde963cf0e949b3ff75235119cf83a43c82e0efd6ffd2bf5f1e042bcf035344246398f172591d4acd230885cc24ab0f241c164af5ad9beb5757e98ed
|
data/Gemfile.lock
CHANGED
data/api-model.gemspec
CHANGED
@@ -2,7 +2,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "api-model"
|
5
|
-
s.version = "2.5.
|
5
|
+
s.version = "2.5.1"
|
6
6
|
s.authors = ["Damien Timewell", "Erik Rothoff Andersson"]
|
7
7
|
s.email = ["mail@damientimewell.com", "erik.rothoff@gmail.com"]
|
8
8
|
s.licenses = ['MIT']
|
data/lib/api_model/response.rb
CHANGED
@@ -87,7 +87,11 @@ module ApiModel
|
|
87
87
|
# Then calling ++fetch_from_body("foo.bar.baz")++ would return "Hello world"
|
88
88
|
def fetch_from_body(key_reference)
|
89
89
|
key_reference.split(".").inject(response_body) do |hash,key|
|
90
|
-
|
90
|
+
begin
|
91
|
+
hash.fetch(key, nil)
|
92
|
+
rescue NoMethodError
|
93
|
+
Log.error "Could not set #{key_reference} on #{hash}"
|
94
|
+
end
|
91
95
|
end
|
92
96
|
end
|
93
97
|
|