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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b29d92d816be2e803d052dede7a70e3ffaf783d2
4
- data.tar.gz: 6a27ad42fdff0c5be3a051214e6576dcacf8abf5
3
+ metadata.gz: 3d7d95d480605f33ce43a9218cbe26cef96f73e7
4
+ data.tar.gz: 49eb448b3c170f71b93d0f987012df51250071f7
5
5
  SHA512:
6
- metadata.gz: 5efc89fd86415888ea6d9a9f34654a7a9cf9ad1c1ec9cd4a0676302fd7a675235580225a2309ff3f41df62c7e78aa283c51f292a2d1fa24fe754ed84572dd7f6
7
- data.tar.gz: c6286a69a64e01a2bf36874ebc11e3b3bea285d95e77ab1115db26169fee250b4eabb477ceab61494e49a777cd99e21ea06420a895b2c531aa0ac86dc89cab54
6
+ metadata.gz: 0b3e9784c55ba0d165b23b40f3d8ff5afa4be9861d09cee0ff2698c5442eccc7a910e15d1ec3c2d55fc17ad470476d36793dfcce35b2747ae0904ab6b9471721
7
+ data.tar.gz: c64ca14dbde963cf0e949b3ff75235119cf83a43c82e0efd6ffd2bf5f1e042bcf035344246398f172591d4acd230885cc24ab0f241c164af5ad9beb5757e98ed
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- api-model (2.5.0)
4
+ api-model (2.5.1)
5
5
  activemodel (~> 4.1)
6
6
  activesupport (~> 4.1)
7
7
  hash-pipe (~> 0.0)
@@ -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.0"
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']
@@ -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
- hash.fetch(key, nil)
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api-model
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0
4
+ version: 2.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Damien Timewell