jsonapi_actions 0.2.2 → 0.3.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: f0dedf88001c8743a4bd4d5d5c13e1fc84e26319aaced7b3a576e25bf53e332c
4
- data.tar.gz: f06b791532a7b35c8a6fccc087ab7de236ed23216fa0531c1995fe5ddd1a69b0
3
+ metadata.gz: dd75b7ea62934cf27cc351d4327cf302af2ab1f5aed66d6d6075575e974d90b6
4
+ data.tar.gz: 56008596f5f59e8eb0640b2d0be4b81eed49dd6fdc7e0f08af5d9f10fc683687
5
5
  SHA512:
6
- metadata.gz: ff480d6310f2655ae77581439c57802ac656098cc06aca53ba5cff97bea12e7abfee06fca1806c02e67f1c18daa997dc8ff6e12c76798df00af3a9e4c3ce7acf
7
- data.tar.gz: b619ac3fd0beca298f4dfc353b4697adf42e1ec8361aa477ab487acec2518a2cf31b2c43f180bf75002974b2d3f88829d239e3c0c2b198e0256b87d0d5e62103
6
+ metadata.gz: 709f2ae770a5efbfca5252997c866205a898eb85cc77dddc5517a936d99910e169f7767ecd1a677ec33b4aef30157236528260e9d629cb937578250fb489350b
7
+ data.tar.gz: 47e353f3fa687d0ee7a8463dfa412b110982bfcf10c2f294084603bce6f12d29ae937befb795549be5b3bc36f59ce2c9a2f85c4368a2c0a217a57c79159f93c5
data/README.md CHANGED
@@ -1,7 +1,8 @@
1
1
  # JsonapiActions
2
2
 
3
3
  Instantly create flexible API controllers that are compatible with [JSON:API](https://jsonapi.org/).
4
- Utilize your existing [FastJsonapi](https://github.com/fast-jsonapi/fast_jsonapi) or
4
+ Utilize your existing [JSONAPI::Serializer](https://github.com/jsonapi-serializer/jsonapi-serializer),
5
+ [FastJsonapi](https://github.com/Netflix/fast_jsonapi), or
5
6
  [ActiveModel::Serializer](https://github.com/rails-api/active_model_serializers) serialization library, or bring your
6
7
  own. Scope and authenticate with optional [Pundit](https://github.com/varvet/pundit) policies and/or Controller specific
7
8
  methods.
@@ -138,7 +139,7 @@ end
138
139
  ```
139
140
 
140
141
  ### #json_response
141
- Response data is formatted so that it can be rendered with `FastJsonapi` or `ActiveModel::Serializer`.
142
+ Response data is formatted so that it can be rendered with `JSONAPI::Serializer`, `FastJsonapi`, or `ActiveModel::Serializer`.
142
143
  If you are using a different serializer, or would like to further change the response. Then you will need to override
143
144
  `#response`, which defines the arguments for `render`.
144
145
 
@@ -9,8 +9,8 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Kevin Pheasey"]
10
10
  spec.email = ["kevin@kpsoftware.io"]
11
11
 
12
- spec.summary = "Rails JSONAPI Controller Actions"
13
- spec.description = "Implement Rails JSONAPI compliant controller actions."
12
+ spec.summary = "Rails JSON:API Controller Actions"
13
+ spec.description = "Implement Rails JSON:API compliant controller actions."
14
14
  spec.homepage = "https://github.com/kp-software/jsonapi_actions"
15
15
  spec.license = "MIT"
16
16
 
@@ -174,7 +174,7 @@ module JsonapiActions
174
174
  end
175
175
 
176
176
  def json_response(data, options = {})
177
- if defined?(FastJsonapi)
177
+ if defined?(JSONAPI::Serializer) || defined?(FastJsonapi)
178
178
  {
179
179
  json: serializer(data).new(data, options.deep_merge(
180
180
  include: include_param,
@@ -1,3 +1,3 @@
1
1
  module JsonapiActions
2
- VERSION = "0.2.2"
2
+ VERSION = "0.3.0"
3
3
  end
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.2
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Pheasey
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-18 00:00:00.000000000 Z
11
+ date: 2020-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -92,7 +92,7 @@ dependencies:
92
92
  - - "<"
93
93
  - !ruby/object:Gem::Version
94
94
  version: '2.0'
95
- description: Implement Rails JSONAPI compliant controller actions.
95
+ description: Implement Rails JSON:API compliant controller actions.
96
96
  email:
97
97
  - kevin@kpsoftware.io
98
98
  executables: []
@@ -124,7 +124,7 @@ homepage: https://github.com/kp-software/jsonapi_actions
124
124
  licenses:
125
125
  - MIT
126
126
  metadata: {}
127
- post_install_message:
127
+ post_install_message:
128
128
  rdoc_options: []
129
129
  require_paths:
130
130
  - lib
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
140
  version: '0'
141
141
  requirements: []
142
142
  rubygems_version: 3.0.8
143
- signing_key:
143
+ signing_key:
144
144
  specification_version: 4
145
- summary: Rails JSONAPI Controller Actions
145
+ summary: Rails JSON:API Controller Actions
146
146
  test_files: []