json_api_client 1.20.0 → 1.21.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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f67e7946b46b9e5f0a0cf9d445d366f990926da3c758a9b86a9d554cdf599e9d
|
4
|
+
data.tar.gz: b331bebea3994b2e3a342eab136d6ac4494b6021f3ba030a6813374179f51489
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: babc0059c16c3386935942264968cccd309b7268b130a2170dd2e78669861659c5844c080750cf54e1314357c9c88798a75a63df32f3e29af8400670a4dba43e
|
7
|
+
data.tar.gz: 4b9e3b6cbaae50653a896d4fdb02364eb9c34456e721ff8dd1b83e9106c11b502d138721f249b334317b015be791b8102dbb867303855bd54304bec229f01a5e
|
@@ -46,11 +46,18 @@ module JsonApiClient
|
|
46
46
|
|
47
47
|
class NotFound < ClientError
|
48
48
|
attr_reader :uri
|
49
|
-
def initialize(
|
50
|
-
|
49
|
+
def initialize(env_or_uri, msg = nil)
|
50
|
+
env = nil
|
51
|
+
|
52
|
+
if env_or_uri.kind_of?(Faraday::Env)
|
53
|
+
env = env_or_uri
|
54
|
+
@uri = env[:url]
|
55
|
+
else
|
56
|
+
@uri = env_or_uri
|
57
|
+
end
|
51
58
|
|
52
|
-
msg
|
53
|
-
super
|
59
|
+
msg ||= "Resource not found: #{uri.to_s}"
|
60
|
+
super env, msg
|
54
61
|
end
|
55
62
|
end
|
56
63
|
|
@@ -24,7 +24,7 @@ module JsonApiClient
|
|
24
24
|
end
|
25
25
|
|
26
26
|
grouped_included_set.each do |type, resources|
|
27
|
-
grouped_included_set[type] = resources.index_by
|
27
|
+
grouped_included_set[type] = resources.index_by { |resource| resource.attributes[:id] }
|
28
28
|
end
|
29
29
|
|
30
30
|
@data = grouped_included_set
|
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.
|
4
|
+
version: 1.21.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:
|
11
|
+
date: 2023-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -33,7 +33,7 @@ dependencies:
|
|
33
33
|
version: 0.15.2
|
34
34
|
- - "<"
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version:
|
36
|
+
version: '2.0'
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: 0.15.2
|
44
44
|
- - "<"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version:
|
46
|
+
version: '2.0'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: faraday_middleware
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
version: 0.9.0
|
54
54
|
- - "<"
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version:
|
56
|
+
version: '2.0'
|
57
57
|
type: :runtime
|
58
58
|
prerelease: false
|
59
59
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -63,7 +63,7 @@ dependencies:
|
|
63
63
|
version: 0.9.0
|
64
64
|
- - "<"
|
65
65
|
- !ruby/object:Gem::Version
|
66
|
-
version:
|
66
|
+
version: '2.0'
|
67
67
|
- !ruby/object:Gem::Dependency
|
68
68
|
name: addressable
|
69
69
|
requirement: !ruby/object:Gem::Requirement
|
@@ -205,7 +205,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
205
205
|
- !ruby/object:Gem::Version
|
206
206
|
version: '0'
|
207
207
|
requirements: []
|
208
|
-
rubygems_version: 3.
|
208
|
+
rubygems_version: 3.3.7
|
209
209
|
signing_key:
|
210
210
|
specification_version: 4
|
211
211
|
summary: Build client libraries compliant with specification defined by jsonapi.org
|