jsonapi-realizer 6.2.3 → 6.2.4

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: bdbcdbae0d050e594266eeb3a84ee99ac64ca19febc7ba1d86d823479e832f0d
4
- data.tar.gz: 6c5bafdb777e5f5722c0ce14cd2e6978bd727409b9a09ea1e68c5ecc07671434
3
+ metadata.gz: 33ccbc88f14ef738c2dbb2e5c2045bd3a74109d699bd3e0d9706455d2fa71f31
4
+ data.tar.gz: 39822d29321c8f54440c5be6f4f140a3fb13e13e24ae4a3a90d3f07a04402371
5
5
  SHA512:
6
- metadata.gz: 1b3c4810879476f7d3d748a16a8538c599f3e288cb7aa55d83bacb7727eb9abc135e12afd9140b6650cd062e8629b6cbf307f655c3fcecaa20bbd71db3299e9b
7
- data.tar.gz: 40eeabceb511afea21c0baab9c840c9963ba05a6b3c286b2464a80391e8d3ebe71e700e78ca7b0ecc99fe1105eab090f970983a601e61bf17444414e0366dd0c
6
+ metadata.gz: 177c312e93401ba515e396516e0cc41d883f4fed36858ff6a30d23ee4bdef157fe750e3aa079f0523b6a64578c4d10fc13a9403149740d7bb2f12c8b3b81400d
7
+ data.tar.gz: b7c225733a3cb9f11f97443b1f18e25458f24789e4c64526cdd9cf6f38be2aeab1d8748174aaed2ccdaaadf9e9de91cfe9d47d38985c4ac123c50acbb9d2a46a
@@ -123,7 +123,7 @@ module JSONAPI
123
123
 
124
124
  private def attributes
125
125
  return unless data
126
- return {} unless data["attributes"].kind_of?(Hash)
126
+ return {} unless data["attributes"].is_a?(Hash)
127
127
 
128
128
  data
129
129
  .fetch("attributes")
@@ -133,7 +133,7 @@ module JSONAPI
133
133
 
134
134
  private def relationships
135
135
  return unless data
136
- return {} unless data["relationships"].kind_of?(Hash)
136
+ return {} unless data["relationships"].is_a?(Hash)
137
137
 
138
138
  data
139
139
  .fetch("relationships")
@@ -126,7 +126,7 @@ module JSONAPI
126
126
  end
127
127
 
128
128
  def include?
129
- parameters.key?("include") && parameters.fetch("include").respond_to?(:split)
129
+ parameters.key?("include") && parameters.fetch("include").respond_to?(:split) && parameters.fetch("include").split(/\s*,\s*/).any?
130
130
  end
131
131
 
132
132
  def includes
@@ -321,7 +321,7 @@ module JSONAPI
321
321
 
322
322
  relation_configuration = relation(name).realizer_class.configuration
323
323
 
324
- if data.kind_of?(Array)
324
+ if data.is_a?(Array)
325
325
  [name, relation_configuration.adapter.find_many(relation_configuration.model_class, { id: data.map { |value| value.fetch("id") } })]
326
326
  else
327
327
  [name, relation_configuration.adapter.find_one(relation_configuration.model_class, data.fetch("id"))]
@@ -2,6 +2,6 @@
2
2
 
3
3
  module JSONAPI
4
4
  module Realizer
5
- VERSION = "6.2.3"
5
+ VERSION = "6.2.4"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsonapi-realizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.2.3
4
+ version: 6.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kurtis Rainbolt-Greene
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-20 00:00:00.000000000 Z
11
+ date: 2023-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport