jsonapi_actions 0.2.2 → 0.4.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: 36ec7e18ffd84c14377409471e3f3dd911d956e0e1d3960dc52113cd51f20923
4
+ data.tar.gz: 1d9034c3807d27a04923332af04f1008bd1b9d1af7fa05ced37f5a279f7d26a5
5
5
  SHA512:
6
- metadata.gz: ff480d6310f2655ae77581439c57802ac656098cc06aca53ba5cff97bea12e7abfee06fca1806c02e67f1c18daa997dc8ff6e12c76798df00af3a9e4c3ce7acf
7
- data.tar.gz: b619ac3fd0beca298f4dfc353b4697adf42e1ec8361aa477ab487acec2518a2cf31b2c43f180bf75002974b2d3f88829d239e3c0c2b198e0256b87d0d5e62103
6
+ metadata.gz: 4454b8e91c724d5178e80be964bb85e4d214ee5bfcfbb92b67c6522d5f970ec034a2a238f3ab19618cd8073c7856fb9a6d60cfe150d3387e28850f29f9995628
7
+ data.tar.gz: 57e35c3a97f5ad2418767ad556f17e1a46d7499b9a6cc0f20a8fa52a190342547a249aad7ee17ce20e617bce7f4cf0ad642b88a7dffbfaf8367bcbad1f04874b
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-2.5.3
1
+ ruby-2.7.1
data/Gemfile.lock CHANGED
@@ -1,133 +1,149 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jsonapi_actions (0.1.2)
4
+ jsonapi_actions (0.4.0)
5
5
  kaminari (>= 1.0, < 2.0)
6
- rails (>= 4.0, < 7.0)
6
+ rails (>= 4.0, < 7.1)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actioncable (6.0.2.2)
12
- actionpack (= 6.0.2.2)
11
+ actioncable (7.0.4)
12
+ actionpack (= 7.0.4)
13
+ activesupport (= 7.0.4)
13
14
  nio4r (~> 2.0)
14
15
  websocket-driver (>= 0.6.1)
15
- actionmailbox (6.0.2.2)
16
- actionpack (= 6.0.2.2)
17
- activejob (= 6.0.2.2)
18
- activerecord (= 6.0.2.2)
19
- activestorage (= 6.0.2.2)
20
- activesupport (= 6.0.2.2)
16
+ actionmailbox (7.0.4)
17
+ actionpack (= 7.0.4)
18
+ activejob (= 7.0.4)
19
+ activerecord (= 7.0.4)
20
+ activestorage (= 7.0.4)
21
+ activesupport (= 7.0.4)
21
22
  mail (>= 2.7.1)
22
- actionmailer (6.0.2.2)
23
- actionpack (= 6.0.2.2)
24
- actionview (= 6.0.2.2)
25
- activejob (= 6.0.2.2)
23
+ net-imap
24
+ net-pop
25
+ net-smtp
26
+ actionmailer (7.0.4)
27
+ actionpack (= 7.0.4)
28
+ actionview (= 7.0.4)
29
+ activejob (= 7.0.4)
30
+ activesupport (= 7.0.4)
26
31
  mail (~> 2.5, >= 2.5.4)
32
+ net-imap
33
+ net-pop
34
+ net-smtp
27
35
  rails-dom-testing (~> 2.0)
28
- actionpack (6.0.2.2)
29
- actionview (= 6.0.2.2)
30
- activesupport (= 6.0.2.2)
31
- rack (~> 2.0, >= 2.0.8)
36
+ actionpack (7.0.4)
37
+ actionview (= 7.0.4)
38
+ activesupport (= 7.0.4)
39
+ rack (~> 2.0, >= 2.2.0)
32
40
  rack-test (>= 0.6.3)
33
41
  rails-dom-testing (~> 2.0)
34
42
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
35
- actiontext (6.0.2.2)
36
- actionpack (= 6.0.2.2)
37
- activerecord (= 6.0.2.2)
38
- activestorage (= 6.0.2.2)
39
- activesupport (= 6.0.2.2)
43
+ actiontext (7.0.4)
44
+ actionpack (= 7.0.4)
45
+ activerecord (= 7.0.4)
46
+ activestorage (= 7.0.4)
47
+ activesupport (= 7.0.4)
48
+ globalid (>= 0.6.0)
40
49
  nokogiri (>= 1.8.5)
41
- actionview (6.0.2.2)
42
- activesupport (= 6.0.2.2)
50
+ actionview (7.0.4)
51
+ activesupport (= 7.0.4)
43
52
  builder (~> 3.1)
44
53
  erubi (~> 1.4)
45
54
  rails-dom-testing (~> 2.0)
46
55
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
47
- activejob (6.0.2.2)
48
- activesupport (= 6.0.2.2)
56
+ activejob (7.0.4)
57
+ activesupport (= 7.0.4)
49
58
  globalid (>= 0.3.6)
50
- activemodel (6.0.2.2)
51
- activesupport (= 6.0.2.2)
52
- activerecord (6.0.2.2)
53
- activemodel (= 6.0.2.2)
54
- activesupport (= 6.0.2.2)
55
- activestorage (6.0.2.2)
56
- actionpack (= 6.0.2.2)
57
- activejob (= 6.0.2.2)
58
- activerecord (= 6.0.2.2)
59
- marcel (~> 0.3.1)
60
- activesupport (6.0.2.2)
59
+ activemodel (7.0.4)
60
+ activesupport (= 7.0.4)
61
+ activerecord (7.0.4)
62
+ activemodel (= 7.0.4)
63
+ activesupport (= 7.0.4)
64
+ activestorage (7.0.4)
65
+ actionpack (= 7.0.4)
66
+ activejob (= 7.0.4)
67
+ activerecord (= 7.0.4)
68
+ activesupport (= 7.0.4)
69
+ marcel (~> 1.0)
70
+ mini_mime (>= 1.1.0)
71
+ activesupport (7.0.4)
61
72
  concurrent-ruby (~> 1.0, >= 1.0.2)
62
- i18n (>= 0.7, < 2)
63
- minitest (~> 5.1)
64
- tzinfo (~> 1.1)
65
- zeitwerk (~> 2.2)
73
+ i18n (>= 1.6, < 2)
74
+ minitest (>= 5.1)
75
+ tzinfo (~> 2.0)
66
76
  builder (3.2.4)
67
- concurrent-ruby (1.1.6)
77
+ concurrent-ruby (1.1.10)
68
78
  crass (1.0.6)
69
79
  diff-lcs (1.3)
70
- erubi (1.9.0)
71
- globalid (0.4.2)
72
- activesupport (>= 4.2.0)
73
- i18n (1.8.2)
80
+ erubi (1.11.0)
81
+ globalid (1.0.0)
82
+ activesupport (>= 5.0)
83
+ i18n (1.12.0)
74
84
  concurrent-ruby (~> 1.0)
75
- kaminari (1.2.0)
85
+ kaminari (1.2.2)
76
86
  activesupport (>= 4.1.0)
77
- kaminari-actionview (= 1.2.0)
78
- kaminari-activerecord (= 1.2.0)
79
- kaminari-core (= 1.2.0)
80
- kaminari-actionview (1.2.0)
87
+ kaminari-actionview (= 1.2.2)
88
+ kaminari-activerecord (= 1.2.2)
89
+ kaminari-core (= 1.2.2)
90
+ kaminari-actionview (1.2.2)
81
91
  actionview
82
- kaminari-core (= 1.2.0)
83
- kaminari-activerecord (1.2.0)
92
+ kaminari-core (= 1.2.2)
93
+ kaminari-activerecord (1.2.2)
84
94
  activerecord
85
- kaminari-core (= 1.2.0)
86
- kaminari-core (1.2.0)
87
- loofah (2.4.0)
95
+ kaminari-core (= 1.2.2)
96
+ kaminari-core (1.2.2)
97
+ loofah (2.19.0)
88
98
  crass (~> 1.0.2)
89
99
  nokogiri (>= 1.5.9)
90
100
  mail (2.7.1)
91
101
  mini_mime (>= 0.1.1)
92
- marcel (0.3.3)
93
- mimemagic (~> 0.3.2)
102
+ marcel (1.0.2)
94
103
  method_source (1.0.0)
95
- mimemagic (0.3.4)
96
- mini_mime (1.0.2)
97
- mini_portile2 (2.4.0)
98
- minitest (5.14.0)
99
- nio4r (2.5.2)
100
- nokogiri (1.10.9)
101
- mini_portile2 (~> 2.4.0)
102
- rack (2.2.2)
103
- rack-test (1.1.0)
104
- rack (>= 1.0, < 3)
105
- rails (6.0.2.2)
106
- actioncable (= 6.0.2.2)
107
- actionmailbox (= 6.0.2.2)
108
- actionmailer (= 6.0.2.2)
109
- actionpack (= 6.0.2.2)
110
- actiontext (= 6.0.2.2)
111
- actionview (= 6.0.2.2)
112
- activejob (= 6.0.2.2)
113
- activemodel (= 6.0.2.2)
114
- activerecord (= 6.0.2.2)
115
- activestorage (= 6.0.2.2)
116
- activesupport (= 6.0.2.2)
117
- bundler (>= 1.3.0)
118
- railties (= 6.0.2.2)
119
- sprockets-rails (>= 2.0.0)
104
+ mini_mime (1.1.2)
105
+ minitest (5.16.3)
106
+ net-imap (0.3.1)
107
+ net-protocol
108
+ net-pop (0.1.2)
109
+ net-protocol
110
+ net-protocol (0.1.3)
111
+ timeout
112
+ net-smtp (0.3.3)
113
+ net-protocol
114
+ nio4r (2.5.8)
115
+ nokogiri (1.13.9-x86_64-darwin)
116
+ racc (~> 1.4)
117
+ racc (1.6.0)
118
+ rack (2.2.4)
119
+ rack-test (2.0.2)
120
+ rack (>= 1.3)
121
+ rails (7.0.4)
122
+ actioncable (= 7.0.4)
123
+ actionmailbox (= 7.0.4)
124
+ actionmailer (= 7.0.4)
125
+ actionpack (= 7.0.4)
126
+ actiontext (= 7.0.4)
127
+ actionview (= 7.0.4)
128
+ activejob (= 7.0.4)
129
+ activemodel (= 7.0.4)
130
+ activerecord (= 7.0.4)
131
+ activestorage (= 7.0.4)
132
+ activesupport (= 7.0.4)
133
+ bundler (>= 1.15.0)
134
+ railties (= 7.0.4)
120
135
  rails-dom-testing (2.0.3)
121
136
  activesupport (>= 4.2.0)
122
137
  nokogiri (>= 1.6)
123
- rails-html-sanitizer (1.3.0)
138
+ rails-html-sanitizer (1.4.3)
124
139
  loofah (~> 2.3)
125
- railties (6.0.2.2)
126
- actionpack (= 6.0.2.2)
127
- activesupport (= 6.0.2.2)
140
+ railties (7.0.4)
141
+ actionpack (= 7.0.4)
142
+ activesupport (= 7.0.4)
128
143
  method_source
129
- rake (>= 0.8.7)
130
- thor (>= 0.20.3, < 2.0)
144
+ rake (>= 12.2)
145
+ thor (~> 1.0)
146
+ zeitwerk (~> 2.5)
131
147
  rake (13.0.1)
132
148
  rspec (3.8.0)
133
149
  rspec-core (~> 3.8.0)
@@ -142,24 +158,18 @@ GEM
142
158
  diff-lcs (>= 1.2.0, < 2.0)
143
159
  rspec-support (~> 3.8.0)
144
160
  rspec-support (3.8.0)
145
- sprockets (4.0.0)
161
+ thor (1.2.1)
162
+ timeout (0.3.0)
163
+ tzinfo (2.0.5)
146
164
  concurrent-ruby (~> 1.0)
147
- rack (> 1, < 3)
148
- sprockets-rails (3.2.1)
149
- actionpack (>= 4.0)
150
- activesupport (>= 4.0)
151
- sprockets (>= 3.0.0)
152
- thor (1.0.1)
153
- thread_safe (0.3.6)
154
- tzinfo (1.2.6)
155
- thread_safe (~> 0.1)
156
- websocket-driver (0.7.1)
165
+ websocket-driver (0.7.5)
157
166
  websocket-extensions (>= 0.1.0)
158
- websocket-extensions (0.1.4)
159
- zeitwerk (2.3.0)
167
+ websocket-extensions (0.1.5)
168
+ zeitwerk (2.6.6)
160
169
 
161
170
  PLATFORMS
162
171
  ruby
172
+ x86_64-darwin-20
163
173
 
164
174
  DEPENDENCIES
165
175
  bundler (~> 2.0)
@@ -168,4 +178,4 @@ DEPENDENCIES
168
178
  rspec (~> 3.0)
169
179
 
170
180
  BUNDLED WITH
171
- 2.0.1
181
+ 2.2.2
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
 
@@ -27,6 +27,6 @@ Gem::Specification.new do |spec|
27
27
  spec.add_development_dependency "rake", "~> 13.0"
28
28
  spec.add_development_dependency "rspec", "~> 3.0"
29
29
 
30
- spec.add_dependency 'rails', '>= 4.0', '< 7.0'
30
+ spec.add_dependency 'rails', '>= 4.0', '< 7.1'
31
31
  spec.add_dependency 'kaminari', '>= 1.0', '< 2.0'
32
32
  end
@@ -1,3 +1,3 @@
1
1
  module JsonapiActions
2
- VERSION = "0.2.2"
2
+ VERSION = "0.4.0"
3
3
  end
@@ -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,
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.4.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: 2022-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -61,7 +61,7 @@ dependencies:
61
61
  version: '4.0'
62
62
  - - "<"
63
63
  - !ruby/object:Gem::Version
64
- version: '7.0'
64
+ version: '7.1'
65
65
  type: :runtime
66
66
  prerelease: false
67
67
  version_requirements: !ruby/object:Gem::Requirement
@@ -71,7 +71,7 @@ dependencies:
71
71
  version: '4.0'
72
72
  - - "<"
73
73
  - !ruby/object:Gem::Version
74
- version: '7.0'
74
+ version: '7.1'
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: kaminari
77
77
  requirement: !ruby/object:Gem::Requirement
@@ -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
@@ -139,8 +139,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
139
139
  - !ruby/object:Gem::Version
140
140
  version: '0'
141
141
  requirements: []
142
- rubygems_version: 3.0.8
143
- signing_key:
142
+ rubygems_version: 3.1.2
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: []