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 +5 -5
- data/lib/json_api_client/included_data.rb +3 -4
- data/lib/json_api_client/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b3cabb055324f7f141ea20203dfc7204239c9c7e293310d53ac3b484e7a33d28
|
4
|
+
data.tar.gz: 18a958aab13cfef3ed8f199109ce0650ee0d56a1018fc6312052468c7b4c72fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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"]]
|
54
|
+
record = data[link_def["type"]]
|
55
|
+
record[link_def["id"]] if record
|
57
56
|
end
|
58
57
|
end
|
59
58
|
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.
|
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-
|
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
|
-
|
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
|