json_api_client 1.14.0 → 1.14.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
- SHA1:
3
- metadata.gz: 773e22610a90abf268c451e50ada8927f36b4f2f
4
- data.tar.gz: c4368d2ba6de322219b0bba049c8f0bfff6b1344
2
+ SHA256:
3
+ metadata.gz: b3cabb055324f7f141ea20203dfc7204239c9c7e293310d53ac3b484e7a33d28
4
+ data.tar.gz: 18a958aab13cfef3ed8f199109ce0650ee0d56a1018fc6312052468c7b4c72fd
5
5
  SHA512:
6
- metadata.gz: ae9da8c252d702468da498869c2ef9e0fe0e43731d2fb9f334c519e316081963595f733ad9d2dd070d840a09f0f26afa0eaf68550c8d98b643b5c22a3b42a45c
7
- data.tar.gz: f152f2d5d903527f3744e47268e826499f5395e6941bcd421760416f3d78c862a2e845b7cbab599b6ccf3ceb31dfdd6e419a8c1d2706d8c55b04fffe9b209448
6
+ metadata.gz: 8d43ff4ac90ceab7b7e60bc32a160e09193931f5a69c0bc238db77db2309c2bc8423a13a055c9134c92d9ce947869a52c943d751771259b39aa6d8c266094c23
7
+ data.tar.gz: 5e2df37ed5bb8181007d48304db2f514912a77d407b0b54e7f8ff0dce447fc1db4095134a04449d5c9e8962e300d945232e5c67263dc762512eb948c2ef2b7b5
@@ -36,9 +36,7 @@ module JsonApiClient
36
36
 
37
37
  if data.is_a?(Array)
38
38
  # has_many link
39
- data.map do |link_def|
40
- record_for(link_def)
41
- end
39
+ data.map(&method(:record_for)).compact
42
40
  else
43
41
  # has_one link
44
42
  record_for(data)
@@ -53,7 +51,8 @@ module JsonApiClient
53
51
 
54
52
  # should return a resource record of some type for this linked document
55
53
  def record_for(link_def)
56
- data[link_def["type"]][link_def["id"]]
54
+ record = data[link_def["type"]]
55
+ record[link_def["id"]] if record
57
56
  end
58
57
  end
59
58
  end
@@ -1,3 +1,3 @@
1
1
  module JsonApiClient
2
- VERSION = "1.14.0"
2
+ VERSION = "1.14.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json_api_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.14.0
4
+ version: 1.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Ching
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-03 00:00:00.000000000 Z
11
+ date: 2019-07-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -199,8 +199,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
199
199
  - !ruby/object:Gem::Version
200
200
  version: '0'
201
201
  requirements: []
202
- rubyforge_project:
203
- rubygems_version: 2.6.14
202
+ rubygems_version: 3.0.1
204
203
  signing_key:
205
204
  specification_version: 4
206
205
  summary: Build client libraries compliant with specification defined by jsonapi.org