consent 2.4.0 → 2.5.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.
data/lib/consent/view.rb CHANGED
@@ -22,5 +22,12 @@ module Consent
22
22
 
23
23
  @instance.curry[*args]
24
24
  end
25
+
26
+ def to_permission_payload
27
+ {
28
+ view: key,
29
+ label: label,
30
+ }
31
+ end
25
32
  end
26
33
  end
data/lib/consent.rb CHANGED
@@ -3,6 +3,7 @@
3
3
  require "cancancan"
4
4
 
5
5
  require "consent/ability"
6
+ require "consent/permission_definition_payload"
6
7
  require "consent/action"
7
8
  require "consent/dsl"
8
9
  require "consent/model_additions"
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: consent
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carlos Palhares
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2026-02-04 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: cancancan
@@ -184,14 +183,14 @@ dependencies:
184
183
  requirements:
185
184
  - - "~>"
186
185
  - !ruby/object:Gem::Version
187
- version: 1.7.3
186
+ version: '2.9'
188
187
  type: :development
189
188
  prerelease: false
190
189
  version_requirements: !ruby/object:Gem::Requirement
191
190
  requirements:
192
191
  - - "~>"
193
192
  - !ruby/object:Gem::Version
194
- version: 1.7.3
193
+ version: '2.9'
195
194
  description: Consent permission based authorization
196
195
  email:
197
196
  - chjunior@gmail.com
@@ -220,10 +219,6 @@ files:
220
219
  - docs/CHANGELOG.md
221
220
  - docs/README.md
222
221
  - gemfiles/.bundle/config
223
- - gemfiles/rails_6_1.gemfile
224
- - gemfiles/rails_6_1.gemfile.lock
225
- - gemfiles/rails_7_0.gemfile
226
- - gemfiles/rails_7_0.gemfile.lock
227
222
  - gemfiles/rails_7_1.gemfile
228
223
  - gemfiles/rails_7_1.gemfile.lock
229
224
  - gemfiles/rails_7_2.gemfile
@@ -234,6 +229,7 @@ files:
234
229
  - lib/consent/dsl.rb
235
230
  - lib/consent/engine.rb
236
231
  - lib/consent/model_additions.rb
232
+ - lib/consent/permission_definition_payload.rb
237
233
  - lib/consent/permission_migration.rb
238
234
  - lib/consent/reloader.rb
239
235
  - lib/consent/rspec.rb
@@ -254,7 +250,6 @@ licenses:
254
250
  - MIT
255
251
  metadata:
256
252
  rubygems_mfa_required: 'true'
257
- post_install_message:
258
253
  rdoc_options: []
259
254
  require_paths:
260
255
  - lib
@@ -262,15 +257,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
262
257
  requirements:
263
258
  - - ">="
264
259
  - !ruby/object:Gem::Version
265
- version: '3.0'
260
+ version: '3.2'
266
261
  required_rubygems_version: !ruby/object:Gem::Requirement
267
262
  requirements:
268
263
  - - ">="
269
264
  - !ruby/object:Gem::Version
270
265
  version: '0'
271
266
  requirements: []
272
- rubygems_version: 3.5.22
273
- signing_key:
267
+ rubygems_version: 3.6.9
274
268
  specification_version: 4
275
269
  summary: Consent permission based authorization
276
270
  test_files: []
@@ -1,21 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # This file was generated by Appraisal
4
-
5
- source "https://rubygems.org"
6
-
7
- gem "base64", "~> 0.3.0"
8
- gem "bigdecimal", "~> 3.2.0", "< 3.2.3"
9
- gem "connection_pool", "~> 2.4.1"
10
- gem "erb", "~> 4.0.4"
11
- gem "logger", "~> 1.7.0"
12
- gem "minitest", "~> 5.25.5"
13
- gem "mutex_m", "~> 0.3.0"
14
- gem "net-imap", "< 0.5.0"
15
- gem "nokogiri", "~> 1.17.0", "< 1.18"
16
- gem "rails", "6.1.7.7"
17
- gem "rubocop-powerhome", path: "../../rubocop-powerhome"
18
- gem "securerandom", "< 0.4"
19
- gem "zeitwerk", "< 2.7.0"
20
-
21
- gemspec path: "../"
@@ -1,308 +0,0 @@
1
- PATH
2
- remote: ../../rubocop-powerhome
3
- specs:
4
- rubocop-powerhome (0.6.0)
5
- rubocop (= 1.82.1)
6
- rubocop-performance
7
- rubocop-rails
8
- rubocop-rake
9
- rubocop-rspec
10
-
11
- PATH
12
- remote: ..
13
- specs:
14
- consent (2.4.0)
15
- cancancan (= 3.2.1)
16
-
17
- GEM
18
- remote: https://rubygems.org/
19
- specs:
20
- actioncable (6.1.7.7)
21
- actionpack (= 6.1.7.7)
22
- activesupport (= 6.1.7.7)
23
- nio4r (~> 2.0)
24
- websocket-driver (>= 0.6.1)
25
- actionmailbox (6.1.7.7)
26
- actionpack (= 6.1.7.7)
27
- activejob (= 6.1.7.7)
28
- activerecord (= 6.1.7.7)
29
- activestorage (= 6.1.7.7)
30
- activesupport (= 6.1.7.7)
31
- mail (>= 2.7.1)
32
- actionmailer (6.1.7.7)
33
- actionpack (= 6.1.7.7)
34
- actionview (= 6.1.7.7)
35
- activejob (= 6.1.7.7)
36
- activesupport (= 6.1.7.7)
37
- mail (~> 2.5, >= 2.5.4)
38
- rails-dom-testing (~> 2.0)
39
- actionpack (6.1.7.7)
40
- actionview (= 6.1.7.7)
41
- activesupport (= 6.1.7.7)
42
- rack (~> 2.0, >= 2.0.9)
43
- rack-test (>= 0.6.3)
44
- rails-dom-testing (~> 2.0)
45
- rails-html-sanitizer (~> 1.0, >= 1.2.0)
46
- actiontext (6.1.7.7)
47
- actionpack (= 6.1.7.7)
48
- activerecord (= 6.1.7.7)
49
- activestorage (= 6.1.7.7)
50
- activesupport (= 6.1.7.7)
51
- nokogiri (>= 1.8.5)
52
- actionview (6.1.7.7)
53
- activesupport (= 6.1.7.7)
54
- builder (~> 3.1)
55
- erubi (~> 1.4)
56
- rails-dom-testing (~> 2.0)
57
- rails-html-sanitizer (~> 1.1, >= 1.2.0)
58
- activejob (6.1.7.7)
59
- activesupport (= 6.1.7.7)
60
- globalid (>= 0.3.6)
61
- activemodel (6.1.7.7)
62
- activesupport (= 6.1.7.7)
63
- activerecord (6.1.7.7)
64
- activemodel (= 6.1.7.7)
65
- activesupport (= 6.1.7.7)
66
- activestorage (6.1.7.7)
67
- actionpack (= 6.1.7.7)
68
- activejob (= 6.1.7.7)
69
- activerecord (= 6.1.7.7)
70
- activesupport (= 6.1.7.7)
71
- marcel (~> 1.0)
72
- mini_mime (>= 1.1.0)
73
- activesupport (6.1.7.7)
74
- concurrent-ruby (~> 1.0, >= 1.0.2)
75
- i18n (>= 1.6, < 2)
76
- minitest (>= 5.1)
77
- tzinfo (~> 2.0)
78
- zeitwerk (~> 2.3)
79
- appraisal (2.5.0)
80
- bundler
81
- rake
82
- thor (>= 0.14.0)
83
- ast (2.4.3)
84
- base64 (0.3.0)
85
- bigdecimal (3.2.2)
86
- builder (3.3.0)
87
- byebug (11.1.3)
88
- cancancan (3.2.1)
89
- cgi (0.5.1)
90
- coderay (1.1.3)
91
- combustion (1.5.0)
92
- activesupport (>= 3.0.0)
93
- railties (>= 3.0.0)
94
- thor (>= 0.14.6)
95
- concurrent-ruby (1.3.6)
96
- connection_pool (2.4.1)
97
- crass (1.0.6)
98
- csv (3.3.5)
99
- date (3.5.1)
100
- diff-lcs (1.6.2)
101
- erb (4.0.4)
102
- cgi (>= 0.3.3)
103
- erubi (1.13.1)
104
- globalid (1.3.0)
105
- activesupport (>= 6.1)
106
- i18n (1.14.8)
107
- concurrent-ruby (~> 1.0)
108
- json (2.18.1)
109
- language_server-protocol (3.17.0.5)
110
- license_finder (7.2.1)
111
- bundler
112
- csv (~> 3.2)
113
- rubyzip (>= 1, < 3)
114
- thor (~> 1.2)
115
- tomlrb (>= 1.3, < 2.1)
116
- with_env (= 1.1.0)
117
- xml-simple (~> 1.1.9)
118
- lint_roller (1.1.0)
119
- logger (1.7.0)
120
- loofah (2.25.0)
121
- crass (~> 1.0.2)
122
- nokogiri (>= 1.12.0)
123
- mail (2.9.0)
124
- logger
125
- mini_mime (>= 0.1.1)
126
- net-imap
127
- net-pop
128
- net-smtp
129
- marcel (1.1.0)
130
- method_source (1.1.0)
131
- mini_mime (1.1.5)
132
- minitest (5.25.5)
133
- mutex_m (0.3.0)
134
- net-imap (0.4.23)
135
- date
136
- net-protocol
137
- net-pop (0.1.2)
138
- net-protocol
139
- net-protocol (0.2.2)
140
- timeout
141
- net-smtp (0.5.1)
142
- net-protocol
143
- nio4r (2.7.5)
144
- nokogiri (1.17.2-arm64-darwin)
145
- racc (~> 1.4)
146
- nokogiri (1.17.2-x86_64-linux)
147
- racc (~> 1.4)
148
- parallel (1.27.0)
149
- parser (3.3.10.1)
150
- ast (~> 2.4.1)
151
- racc
152
- prism (1.9.0)
153
- pry (0.14.2)
154
- coderay (~> 1.1)
155
- method_source (~> 1.0)
156
- pry-byebug (3.10.1)
157
- byebug (~> 11.0)
158
- pry (>= 0.13, < 0.15)
159
- racc (1.8.1)
160
- rack (2.2.21)
161
- rack-test (2.2.0)
162
- rack (>= 1.3)
163
- rails (6.1.7.7)
164
- actioncable (= 6.1.7.7)
165
- actionmailbox (= 6.1.7.7)
166
- actionmailer (= 6.1.7.7)
167
- actionpack (= 6.1.7.7)
168
- actiontext (= 6.1.7.7)
169
- actionview (= 6.1.7.7)
170
- activejob (= 6.1.7.7)
171
- activemodel (= 6.1.7.7)
172
- activerecord (= 6.1.7.7)
173
- activestorage (= 6.1.7.7)
174
- activesupport (= 6.1.7.7)
175
- bundler (>= 1.15.0)
176
- railties (= 6.1.7.7)
177
- sprockets-rails (>= 2.0.0)
178
- rails-dom-testing (2.3.0)
179
- activesupport (>= 5.0.0)
180
- minitest
181
- nokogiri (>= 1.6)
182
- rails-html-sanitizer (1.6.2)
183
- loofah (~> 2.21)
184
- nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
185
- railties (6.1.7.7)
186
- actionpack (= 6.1.7.7)
187
- activesupport (= 6.1.7.7)
188
- method_source
189
- rake (>= 12.2)
190
- thor (~> 1.0)
191
- rainbow (3.1.1)
192
- rake (13.3.1)
193
- regexp_parser (2.11.3)
194
- rexml (3.4.4)
195
- rspec (3.13.2)
196
- rspec-core (~> 3.13.0)
197
- rspec-expectations (~> 3.13.0)
198
- rspec-mocks (~> 3.13.0)
199
- rspec-core (3.13.6)
200
- rspec-support (~> 3.13.0)
201
- rspec-expectations (3.13.5)
202
- diff-lcs (>= 1.2.0, < 2.0)
203
- rspec-support (~> 3.13.0)
204
- rspec-mocks (3.13.7)
205
- diff-lcs (>= 1.2.0, < 2.0)
206
- rspec-support (~> 3.13.0)
207
- rspec-rails (6.1.5)
208
- actionpack (>= 6.1)
209
- activesupport (>= 6.1)
210
- railties (>= 6.1)
211
- rspec-core (~> 3.13)
212
- rspec-expectations (~> 3.13)
213
- rspec-mocks (~> 3.13)
214
- rspec-support (~> 3.13)
215
- rspec-support (3.13.7)
216
- rubocop (1.82.1)
217
- json (~> 2.3)
218
- language_server-protocol (~> 3.17.0.2)
219
- lint_roller (~> 1.1.0)
220
- parallel (~> 1.10)
221
- parser (>= 3.3.0.2)
222
- rainbow (>= 2.2.2, < 4.0)
223
- regexp_parser (>= 2.9.3, < 3.0)
224
- rubocop-ast (>= 1.48.0, < 2.0)
225
- ruby-progressbar (~> 1.7)
226
- unicode-display_width (>= 2.4.0, < 4.0)
227
- rubocop-ast (1.49.0)
228
- parser (>= 3.3.7.2)
229
- prism (~> 1.7)
230
- rubocop-performance (1.26.1)
231
- lint_roller (~> 1.1)
232
- rubocop (>= 1.75.0, < 2.0)
233
- rubocop-ast (>= 1.47.1, < 2.0)
234
- rubocop-rails (2.34.3)
235
- activesupport (>= 4.2.0)
236
- lint_roller (~> 1.1)
237
- rack (>= 1.1)
238
- rubocop (>= 1.75.0, < 2.0)
239
- rubocop-ast (>= 1.44.0, < 2.0)
240
- rubocop-rake (0.7.1)
241
- lint_roller (~> 1.1)
242
- rubocop (>= 1.72.1)
243
- rubocop-rspec (3.9.0)
244
- lint_roller (~> 1.1)
245
- rubocop (~> 1.81)
246
- ruby-progressbar (1.13.0)
247
- rubyzip (2.4.1)
248
- securerandom (0.3.2)
249
- sprockets (4.2.2)
250
- concurrent-ruby (~> 1.0)
251
- logger
252
- rack (>= 2.2.4, < 4)
253
- sprockets-rails (3.5.2)
254
- actionpack (>= 6.1)
255
- activesupport (>= 6.1)
256
- sprockets (>= 3.0.0)
257
- sqlite3 (1.7.3-arm64-darwin)
258
- sqlite3 (1.7.3-x86_64-linux)
259
- thor (1.5.0)
260
- timeout (0.6.0)
261
- tomlrb (2.0.4)
262
- tzinfo (2.0.6)
263
- concurrent-ruby (~> 1.0)
264
- unicode-display_width (3.2.0)
265
- unicode-emoji (~> 4.1)
266
- unicode-emoji (4.2.0)
267
- websocket-driver (0.8.0)
268
- base64
269
- websocket-extensions (>= 0.1.0)
270
- websocket-extensions (0.1.5)
271
- with_env (1.1.0)
272
- xml-simple (1.1.9)
273
- rexml
274
- zeitwerk (2.6.18)
275
-
276
- PLATFORMS
277
- arm64-darwin
278
- x86_64-linux
279
-
280
- DEPENDENCIES
281
- activerecord (>= 5)
282
- appraisal (~> 2.5.0)
283
- base64 (~> 0.3.0)
284
- bigdecimal (~> 3.2.0, < 3.2.3)
285
- bundler (~> 2.1)
286
- combustion (~> 1.3)
287
- connection_pool (~> 2.4.1)
288
- consent!
289
- erb (~> 4.0.4)
290
- license_finder (>= 7.0)
291
- logger (~> 1.7.0)
292
- minitest (~> 5.25.5)
293
- mutex_m (~> 0.3.0)
294
- net-imap (< 0.5.0)
295
- nokogiri (~> 1.17.0, < 1.18)
296
- pry (>= 0.14.2)
297
- pry-byebug (= 3.10.1)
298
- rails (= 6.1.7.7)
299
- rake (~> 13)
300
- rspec (~> 3.0)
301
- rspec-rails (~> 6.1.5)
302
- rubocop-powerhome!
303
- securerandom (< 0.4)
304
- sqlite3 (~> 1.7.3)
305
- zeitwerk (< 2.7.0)
306
-
307
- BUNDLED WITH
308
- 2.5.23
@@ -1,21 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # This file was generated by Appraisal
4
-
5
- source "https://rubygems.org"
6
-
7
- gem "base64", "~> 0.3.0"
8
- gem "bigdecimal", "~> 3.2.0", "< 3.2.3"
9
- gem "connection_pool", "~> 2.4.1"
10
- gem "erb", "~> 4.0.4"
11
- gem "logger", "~> 1.7.0"
12
- gem "minitest", "~> 5.25.5"
13
- gem "mutex_m", "~> 0.3.0"
14
- gem "net-imap", "< 0.5.0"
15
- gem "nokogiri", "~> 1.17.0", "< 1.18"
16
- gem "rails", "7.0.8.7"
17
- gem "rubocop-powerhome", path: "../../rubocop-powerhome"
18
- gem "securerandom", "< 0.4"
19
- gem "zeitwerk", "< 2.7.0"
20
-
21
- gemspec path: "../"