jsonapi_actions 0.2.1 → 0.2.2

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: 5565cb462ad2ab745d869fca29361b1c89a44971f113798018daa83e57968d85
4
- data.tar.gz: 48f0986b798c14456211e08414ceb620f56bde53011247c3409230057964c3d9
3
+ metadata.gz: f0dedf88001c8743a4bd4d5d5c13e1fc84e26319aaced7b3a576e25bf53e332c
4
+ data.tar.gz: f06b791532a7b35c8a6fccc087ab7de236ed23216fa0531c1995fe5ddd1a69b0
5
5
  SHA512:
6
- metadata.gz: b0d2a68fd3c6ba77c676cf5cb3093b1c27e4fe908d224923409a4100afe1a7734a21d3412050c51dc0d52337df456a77bc00c0cf68c1df8c0b7e723246037b4e
7
- data.tar.gz: a76ef4cebec31d45817efc50cf227cc5a685d1bca87c3876212042e23b68cc56fa9933211dc011b0f59ae05a2eb3664978c7594e25bf54b6b24bfe33a0691db6
6
+ metadata.gz: ff480d6310f2655ae77581439c57802ac656098cc06aca53ba5cff97bea12e7abfee06fca1806c02e67f1c18daa997dc8ff6e12c76798df00af3a9e4c3ce7acf
7
+ data.tar.gz: b619ac3fd0beca298f4dfc353b4697adf42e1ec8361aa477ab487acec2518a2cf31b2c43f180bf75002974b2d3f88829d239e3c0c2b198e0256b87d0d5e62103
data/CHANGELOG.md ADDED
@@ -0,0 +1,9 @@
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [0.2.2] - 2020-05-18
8
+ ### Fixed
9
+ - JsonapiActions#json_response uses `defined?` to check for serializer library
@@ -1,3 +1,3 @@
1
1
  module JsonapiActions
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
@@ -174,7 +174,7 @@ module JsonapiActions
174
174
  end
175
175
 
176
176
  def json_response(data, options = {})
177
- if Gem::Specification.find_by_name('fast_jsonapi')
177
+ if defined?(FastJsonapi)
178
178
  {
179
179
  json: serializer(data).new(data, options.deep_merge(
180
180
  include: include_param,
@@ -185,7 +185,7 @@ module JsonapiActions
185
185
  )
186
186
  }
187
187
 
188
- elsif Gem::Specification.find_by_name('active_model_serializers')
188
+ elsif defined?(ActiveModel::Serializer)
189
189
  { json: data }.merge(meta: metadata, include: include_param).merge(options)
190
190
 
191
191
  else
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsonapi_actions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Pheasey
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-29 00:00:00.000000000 Z
11
+ date: 2020-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -104,6 +104,7 @@ files:
104
104
  - ".rspec"
105
105
  - ".ruby-gemset"
106
106
  - ".ruby-version"
107
+ - CHANGELOG.md
107
108
  - CODE_OF_CONDUCT.md
108
109
  - Gemfile
109
110
  - Gemfile.lock