jsonapi_actions 0.1.0 → 0.1.1
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 +4 -4
- data/Gemfile.lock +73 -57
- data/README.md +3 -5
- data/jsonapi_actions.gemspec +1 -1
- data/lib/jsonapi_actions/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b421e4b480c17d1e61acf863cab6da6a8ac8080a069d1c321e8288206d63a52e
|
|
4
|
+
data.tar.gz: 60bd7c29ef8576b15607e0f72d6aa1f1391d9c1caa83fff0bc77f402d99064c7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5a2a641de70c22d7ac26840a355356317ed586a2b5a49dac3725d63918023eb6fd8ddca327d39d37a89d863f83d72af8938d7825f1d789f8d21aa51235527526
|
|
7
|
+
data.tar.gz: 26960b0ae92aff0f3560d426bf3dceac29eedee4b1cfea15743b9ee541412723b861fb8da8ae61f39a750574f3b662af5a41509fe1e9441d16eccbe21ea53df7
|
data/Gemfile.lock
CHANGED
|
@@ -1,63 +1,76 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
jsonapi_actions (0.1.
|
|
4
|
+
jsonapi_actions (0.1.1)
|
|
5
5
|
kaminari (>= 1.0, < 2.0)
|
|
6
|
-
rails (>= 4.0, <
|
|
6
|
+
rails (>= 4.0, < 7.0)
|
|
7
7
|
|
|
8
8
|
GEM
|
|
9
9
|
remote: https://rubygems.org/
|
|
10
10
|
specs:
|
|
11
|
-
actioncable (
|
|
12
|
-
actionpack (=
|
|
11
|
+
actioncable (6.0.1)
|
|
12
|
+
actionpack (= 6.0.1)
|
|
13
13
|
nio4r (~> 2.0)
|
|
14
14
|
websocket-driver (>= 0.6.1)
|
|
15
|
-
|
|
16
|
-
actionpack (=
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
actionmailbox (6.0.1)
|
|
16
|
+
actionpack (= 6.0.1)
|
|
17
|
+
activejob (= 6.0.1)
|
|
18
|
+
activerecord (= 6.0.1)
|
|
19
|
+
activestorage (= 6.0.1)
|
|
20
|
+
activesupport (= 6.0.1)
|
|
21
|
+
mail (>= 2.7.1)
|
|
22
|
+
actionmailer (6.0.1)
|
|
23
|
+
actionpack (= 6.0.1)
|
|
24
|
+
actionview (= 6.0.1)
|
|
25
|
+
activejob (= 6.0.1)
|
|
19
26
|
mail (~> 2.5, >= 2.5.4)
|
|
20
27
|
rails-dom-testing (~> 2.0)
|
|
21
|
-
actionpack (
|
|
22
|
-
actionview (=
|
|
23
|
-
activesupport (=
|
|
28
|
+
actionpack (6.0.1)
|
|
29
|
+
actionview (= 6.0.1)
|
|
30
|
+
activesupport (= 6.0.1)
|
|
24
31
|
rack (~> 2.0)
|
|
25
32
|
rack-test (>= 0.6.3)
|
|
26
33
|
rails-dom-testing (~> 2.0)
|
|
27
|
-
rails-html-sanitizer (~> 1.0, >= 1.0
|
|
28
|
-
|
|
29
|
-
|
|
34
|
+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
|
35
|
+
actiontext (6.0.1)
|
|
36
|
+
actionpack (= 6.0.1)
|
|
37
|
+
activerecord (= 6.0.1)
|
|
38
|
+
activestorage (= 6.0.1)
|
|
39
|
+
activesupport (= 6.0.1)
|
|
40
|
+
nokogiri (>= 1.8.5)
|
|
41
|
+
actionview (6.0.1)
|
|
42
|
+
activesupport (= 6.0.1)
|
|
30
43
|
builder (~> 3.1)
|
|
31
44
|
erubi (~> 1.4)
|
|
32
45
|
rails-dom-testing (~> 2.0)
|
|
33
|
-
rails-html-sanitizer (~> 1.
|
|
34
|
-
activejob (
|
|
35
|
-
activesupport (=
|
|
46
|
+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
|
47
|
+
activejob (6.0.1)
|
|
48
|
+
activesupport (= 6.0.1)
|
|
36
49
|
globalid (>= 0.3.6)
|
|
37
|
-
activemodel (
|
|
38
|
-
activesupport (=
|
|
39
|
-
activerecord (
|
|
40
|
-
activemodel (=
|
|
41
|
-
activesupport (=
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
activerecord (=
|
|
50
|
+
activemodel (6.0.1)
|
|
51
|
+
activesupport (= 6.0.1)
|
|
52
|
+
activerecord (6.0.1)
|
|
53
|
+
activemodel (= 6.0.1)
|
|
54
|
+
activesupport (= 6.0.1)
|
|
55
|
+
activestorage (6.0.1)
|
|
56
|
+
actionpack (= 6.0.1)
|
|
57
|
+
activejob (= 6.0.1)
|
|
58
|
+
activerecord (= 6.0.1)
|
|
46
59
|
marcel (~> 0.3.1)
|
|
47
|
-
activesupport (
|
|
60
|
+
activesupport (6.0.1)
|
|
48
61
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
49
62
|
i18n (>= 0.7, < 2)
|
|
50
63
|
minitest (~> 5.1)
|
|
51
64
|
tzinfo (~> 1.1)
|
|
52
|
-
|
|
65
|
+
zeitwerk (~> 2.2)
|
|
53
66
|
builder (3.2.3)
|
|
54
67
|
concurrent-ruby (1.1.5)
|
|
55
|
-
crass (1.0.
|
|
68
|
+
crass (1.0.5)
|
|
56
69
|
diff-lcs (1.3)
|
|
57
|
-
erubi (1.
|
|
70
|
+
erubi (1.9.0)
|
|
58
71
|
globalid (0.4.2)
|
|
59
72
|
activesupport (>= 4.2.0)
|
|
60
|
-
i18n (1.
|
|
73
|
+
i18n (1.7.0)
|
|
61
74
|
concurrent-ruby (~> 1.0)
|
|
62
75
|
kaminari (1.1.1)
|
|
63
76
|
activesupport (>= 4.1.0)
|
|
@@ -71,7 +84,7 @@ GEM
|
|
|
71
84
|
activerecord
|
|
72
85
|
kaminari-core (= 1.1.1)
|
|
73
86
|
kaminari-core (1.1.1)
|
|
74
|
-
loofah (2.
|
|
87
|
+
loofah (2.3.1)
|
|
75
88
|
crass (~> 1.0.2)
|
|
76
89
|
nokogiri (>= 1.5.9)
|
|
77
90
|
mail (2.7.1)
|
|
@@ -80,39 +93,41 @@ GEM
|
|
|
80
93
|
mimemagic (~> 0.3.2)
|
|
81
94
|
method_source (0.9.2)
|
|
82
95
|
mimemagic (0.3.3)
|
|
83
|
-
mini_mime (1.0.
|
|
96
|
+
mini_mime (1.0.2)
|
|
84
97
|
mini_portile2 (2.4.0)
|
|
85
|
-
minitest (5.
|
|
86
|
-
nio4r (2.
|
|
87
|
-
nokogiri (1.10.
|
|
98
|
+
minitest (5.13.0)
|
|
99
|
+
nio4r (2.5.2)
|
|
100
|
+
nokogiri (1.10.5)
|
|
88
101
|
mini_portile2 (~> 2.4.0)
|
|
89
|
-
rack (2.0.
|
|
102
|
+
rack (2.0.7)
|
|
90
103
|
rack-test (1.1.0)
|
|
91
104
|
rack (>= 1.0, < 3)
|
|
92
|
-
rails (
|
|
93
|
-
actioncable (=
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
105
|
+
rails (6.0.1)
|
|
106
|
+
actioncable (= 6.0.1)
|
|
107
|
+
actionmailbox (= 6.0.1)
|
|
108
|
+
actionmailer (= 6.0.1)
|
|
109
|
+
actionpack (= 6.0.1)
|
|
110
|
+
actiontext (= 6.0.1)
|
|
111
|
+
actionview (= 6.0.1)
|
|
112
|
+
activejob (= 6.0.1)
|
|
113
|
+
activemodel (= 6.0.1)
|
|
114
|
+
activerecord (= 6.0.1)
|
|
115
|
+
activestorage (= 6.0.1)
|
|
116
|
+
activesupport (= 6.0.1)
|
|
102
117
|
bundler (>= 1.3.0)
|
|
103
|
-
railties (=
|
|
118
|
+
railties (= 6.0.1)
|
|
104
119
|
sprockets-rails (>= 2.0.0)
|
|
105
120
|
rails-dom-testing (2.0.3)
|
|
106
121
|
activesupport (>= 4.2.0)
|
|
107
122
|
nokogiri (>= 1.6)
|
|
108
|
-
rails-html-sanitizer (1.0
|
|
109
|
-
loofah (~> 2.
|
|
110
|
-
railties (
|
|
111
|
-
actionpack (=
|
|
112
|
-
activesupport (=
|
|
123
|
+
rails-html-sanitizer (1.3.0)
|
|
124
|
+
loofah (~> 2.3)
|
|
125
|
+
railties (6.0.1)
|
|
126
|
+
actionpack (= 6.0.1)
|
|
127
|
+
activesupport (= 6.0.1)
|
|
113
128
|
method_source
|
|
114
129
|
rake (>= 0.8.7)
|
|
115
|
-
thor (>= 0.
|
|
130
|
+
thor (>= 0.20.3, < 2.0)
|
|
116
131
|
rake (10.5.0)
|
|
117
132
|
rspec (3.8.0)
|
|
118
133
|
rspec-core (~> 3.8.0)
|
|
@@ -127,7 +142,7 @@ GEM
|
|
|
127
142
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
128
143
|
rspec-support (~> 3.8.0)
|
|
129
144
|
rspec-support (3.8.0)
|
|
130
|
-
sprockets (
|
|
145
|
+
sprockets (4.0.0)
|
|
131
146
|
concurrent-ruby (~> 1.0)
|
|
132
147
|
rack (> 1, < 3)
|
|
133
148
|
sprockets-rails (3.2.1)
|
|
@@ -138,9 +153,10 @@ GEM
|
|
|
138
153
|
thread_safe (0.3.6)
|
|
139
154
|
tzinfo (1.2.5)
|
|
140
155
|
thread_safe (~> 0.1)
|
|
141
|
-
websocket-driver (0.7.
|
|
156
|
+
websocket-driver (0.7.1)
|
|
142
157
|
websocket-extensions (>= 0.1.0)
|
|
143
|
-
websocket-extensions (0.1.
|
|
158
|
+
websocket-extensions (0.1.4)
|
|
159
|
+
zeitwerk (2.2.1)
|
|
144
160
|
|
|
145
161
|
PLATFORMS
|
|
146
162
|
ruby
|
data/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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/
|
|
4
|
+
Utilize your existing [FastJsonapi](https://github.com/fast-jsonapi/fast_jsonapi) or
|
|
5
5
|
[ActiveModel::Serializer](https://github.com/rails-api/active_model_serializers) serialization library, or bring your
|
|
6
6
|
own. Scope and authenticate with optional [Pundit](https://github.com/varvet/pundit) policies and/or Controller specific
|
|
7
7
|
methods.
|
|
@@ -24,8 +24,7 @@ $ bundle install
|
|
|
24
24
|
|
|
25
25
|
### Basic Setup
|
|
26
26
|
|
|
27
|
-
Include
|
|
28
|
-
your base controller.
|
|
27
|
+
Include `JsonapiActions` in your base controller.
|
|
29
28
|
|
|
30
29
|
```ruby
|
|
31
30
|
# app/controllers/api/v1/base_controller.rb
|
|
@@ -60,7 +59,6 @@ Rails.application.routes.draw do
|
|
|
60
59
|
end
|
|
61
60
|
end
|
|
62
61
|
end
|
|
63
|
-
|
|
64
62
|
```
|
|
65
63
|
|
|
66
64
|
### parent_scope
|
|
@@ -163,7 +161,7 @@ end
|
|
|
163
161
|
|
|
164
162
|
## Pundit
|
|
165
163
|
|
|
166
|
-
JsonapiActions
|
|
164
|
+
JsonapiActions is built to use Pundit for authorization. We utilize action authorization, policy scope,
|
|
167
165
|
and permitted params.
|
|
168
166
|
|
|
169
167
|
```ruby
|
data/jsonapi_actions.gemspec
CHANGED
|
@@ -27,6 +27,6 @@ Gem::Specification.new do |spec|
|
|
|
27
27
|
spec.add_development_dependency "rake", "~> 10.0"
|
|
28
28
|
spec.add_development_dependency "rspec", "~> 3.0"
|
|
29
29
|
|
|
30
|
-
spec.add_dependency 'rails', '>= 4.0', '<
|
|
30
|
+
spec.add_dependency 'rails', '>= 4.0', '< 7.0'
|
|
31
31
|
spec.add_dependency 'kaminari', '>= 1.0', '< 2.0'
|
|
32
32
|
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.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kevin Pheasey
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-
|
|
11
|
+
date: 2019-11-05 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: '
|
|
64
|
+
version: '7.0'
|
|
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: '
|
|
74
|
+
version: '7.0'
|
|
75
75
|
- !ruby/object:Gem::Dependency
|
|
76
76
|
name: kaminari
|
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|