json_api_client 1.21.1 → 1.22.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f67e7946b46b9e5f0a0cf9d445d366f990926da3c758a9b86a9d554cdf599e9d
4
- data.tar.gz: b331bebea3994b2e3a342eab136d6ac4494b6021f3ba030a6813374179f51489
3
+ metadata.gz: 50ee381b7fb9cdebf8538c162a5dab717e8e2e23fffdc293ef7738728f45f9c3
4
+ data.tar.gz: 1be6e62baf09fc3bc78c7c65a5a7b567b0c4a875d1e6bbe06411774ee34d059a
5
5
  SHA512:
6
- metadata.gz: babc0059c16c3386935942264968cccd309b7268b130a2170dd2e78669861659c5844c080750cf54e1314357c9c88798a75a63df32f3e29af8400670a4dba43e
7
- data.tar.gz: 4b9e3b6cbaae50653a896d4fdb02364eb9c34456e721ff8dd1b83e9106c11b502d138721f249b334317b015be791b8102dbb867303855bd54304bec229f01a5e
6
+ metadata.gz: 60b1b657a5b30630f03e461bc4d29f5c0127417c53d63da146059d7a4bfef97e294d48d3bea842811dc72366e18cca7b1ddb1f68a573d42f1571a30dc199a9f6
7
+ data.tar.gz: a99ff29dd85edb6e036538c61d9ae84359a62bd8464e4f9839c09e2d8c1859d30ee58182a962503b00134fcb20c473520157bbe52b0dba5819dfc70402054d4b
@@ -136,7 +136,7 @@ module JsonApiClient
136
136
  primary_key: opts.fetch( :primary_key, @primary_key ),
137
137
  pagination_params: @pagination_params.merge( opts.fetch( :pagination_params, {} ) ),
138
138
  path_params: @path_params.merge( opts.fetch( :path_params, {} ) ),
139
- additional_params: @additional_params.merge( opts.fetch( :additional_params, {} ) ),
139
+ additional_params: @additional_params.deep_merge( opts.fetch( :additional_params, {} ) ),
140
140
  filters: @filters.merge( opts.fetch( :filters, {} ) ),
141
141
  includes: @includes + opts.fetch( :includes, [] ),
142
142
  orders: @orders + opts.fetch( :orders, [] ),
@@ -7,6 +7,11 @@ module JsonApiClient
7
7
  # the type_name is an absolute reference.
8
8
  return type_name.constantize if type_name.match(/^::/)
9
9
 
10
+ # Check the klass association definitions
11
+ association_klass_match = klass.associations.find { |a| a.attr_name.to_s.singularize == type_name.underscore }
12
+ association_klass = association_klass_match.options[:class] if association_klass_match
13
+ return association_klass if association_klass
14
+
10
15
  # Build a list of candidates to search for
11
16
  candidates = []
12
17
  klass.name.scan(/::|$/) { candidates.unshift "#{$`}::#{type_name}" }
@@ -1,3 +1,3 @@
1
1
  module JsonApiClient
2
- VERSION = "1.21.1"
2
+ VERSION = "1.22.0"
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.21.1
4
+ version: 1.22.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Ching
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-05 00:00:00.000000000 Z
11
+ date: 2023-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -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.3.7
208
+ rubygems_version: 3.0.3.1
209
209
  signing_key:
210
210
  specification_version: 4
211
211
  summary: Build client libraries compliant with specification defined by jsonapi.org