snfoil-rails 0.4.3 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/sn_foil/jsonapi_deserializer.rb +4 -4
- data/lib/sn_foil/rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cbabacb778a70d87face8ff2953666e66b509f575ab91c7010b3c7bf71a050a2
|
|
4
|
+
data.tar.gz: 1dfea0059c61d63532022c2537482456942ca05c33991f64a2b725b452ef1c0a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5bdc25d574bcc9e1a95f5783beadcdfd7d44d87384d105f5ce7534b51c1ea4e5837365d0758c4152c9940293445ecdc484d781df1ada201148d01d24bdff1e31
|
|
7
|
+
data.tar.gz: 7d80030755877131ec54644096f696b051c3930de228c56d767eb035c6288b0c1f06d610dbabf8b646283e05812d95af607084ac277c937efabd24eaebf826ca
|
|
@@ -77,8 +77,8 @@ module SnFoil
|
|
|
77
77
|
def data_id(attributes, data)
|
|
78
78
|
if data[:id]
|
|
79
79
|
attributes[:id] = data[:id]
|
|
80
|
-
elsif object[:data][:
|
|
81
|
-
attributes[:lid] = data[:
|
|
80
|
+
elsif object[:data][:'local:id']
|
|
81
|
+
attributes[:lid] = data[:'local:id']
|
|
82
82
|
end
|
|
83
83
|
attributes
|
|
84
84
|
end
|
|
@@ -136,14 +136,14 @@ module SnFoil
|
|
|
136
136
|
end
|
|
137
137
|
|
|
138
138
|
def lookup_relationship(type:, id: nil, lid: nil, **_opts)
|
|
139
|
-
raise ::
|
|
139
|
+
raise ::ArgumentError, 'missing keyword: id or lid' unless id || lid
|
|
140
140
|
|
|
141
141
|
included&.find do |x|
|
|
142
142
|
x[:type].eql?(type) &&
|
|
143
143
|
if id
|
|
144
144
|
x[:id].eql?(id)
|
|
145
145
|
elsif lid
|
|
146
|
-
x[:
|
|
146
|
+
x[:'local:id'].eql?(lid)
|
|
147
147
|
end
|
|
148
148
|
end
|
|
149
149
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: snfoil-rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Matthew Howes
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2020-03-
|
|
12
|
+
date: 2020-03-15 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: activesupport
|