consent 2.3.0 → 2.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: 48437aa7d5b453f8d1ed90f8525e10ee945181bd85dce3a9632ea026b59e356a
4
- data.tar.gz: dbf503bfb196a35a4675d6f856901d6d5abe202cef736aded8553c2c5a7b8d49
3
+ metadata.gz: 9b93a2b46698ef7ba24642972b3c255ece007f5a2184a51b540bf30d9008586a
4
+ data.tar.gz: 4133a6cfa57b200b5e9c238d979ec7e21c8e0d35a2991a1a0a4c0b7bef71a977
5
5
  SHA512:
6
- metadata.gz: fad64a2eb8d82d2f40ca9d0417c4e8207284008e11505b16c4b42d22be6d1d9e70079cf21fef8783c7416d602d213cdd2c80613e4a35502081ee8919de981869
7
- data.tar.gz: b14f196498e1332a23e542791e5aa3464268d430b9bd756e3d13248118ca3e9ce561823b3769640ea2cb2f932348d2af92abef9ef0a3cdbb83e862d2bbab7584
6
+ metadata.gz: a83602c37d57879260c1a13157bb65209c606826187e44ef4764a86497bee2a27ab0088d1b7c082de1fc95d34c225481a06967ec3d56f2344280edf6b248f777
7
+ data.tar.gz: 9267bfa0bcf4575dc7080bb275ca3f9515c5d2d55568244bdd66aa9fd21720e3fcdb44ce9ef1d11f08bde3f7c1bec4ca0a402b9d086784d553aa1acf12c4234e
data/.rubocop.yml CHANGED
@@ -6,13 +6,5 @@ require:
6
6
  AllCops:
7
7
  TargetRubyVersion: 3.0
8
8
 
9
- Style/FrozenStringLiteralComment:
10
- Exclude:
11
- - 'gemfiles/*'
12
-
13
- Bundler/OrderedGems:
14
- Exclude:
15
- - 'gemfiles/*'
16
-
17
9
  Rails:
18
10
  Enabled: false
data/Gemfile CHANGED
@@ -5,13 +5,15 @@ source "https://rubygems.org"
5
5
  # Specify your gem's dependencies in consent.gemspec
6
6
  gemspec
7
7
 
8
- gem "base64"
9
- gem "bigdecimal"
10
- gem "erb", "< 5.1" # Hold erb to support Ruby < 3.2
11
- gem "logger"
12
- gem "mutex_m"
8
+ gem "base64", "~> 0.3.0" # Hold base64 to support Ruby 3.0
9
+ gem "bigdecimal", "~> 3.2.0", "< 3.2.3" # Hold bigdecimal to support Ruby 3.0
10
+ gem "connection_pool", "~> 2.4.1" # Hold connection_pool to support Ruby 3.0 (2.5.3 requires Ruby 3.1+)
11
+ gem "erb", "~> 4.0.4" # Hold erb to support Ruby 3.0
12
+ gem "logger", "~> 1.7.0" # Hold logger to support Ruby 3.0
13
+ gem "minitest", "~> 5.25.5" # Hold minitest to support Ruby 3.0
14
+ gem "mutex_m", "~> 0.3.0" # Hold mutex_m to support Ruby 3.0
13
15
  gem "net-imap", "< 0.5.0"
14
- gem "nokogiri", "< 1.19"
16
+ gem "nokogiri", "~> 1.17.0", "< 1.18" # Hold nokogiri to support Ruby 3.0
15
17
  gem "rubocop-powerhome", path: "../rubocop-powerhome"
16
18
  gem "securerandom", "< 0.4" # Hold securerandom to support Ruby 3.0
17
19
  gem "zeitwerk", "< 2.7.0"
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: ../rubocop-powerhome
3
3
  specs:
4
- rubocop-powerhome (0.5.6)
5
- rubocop (= 1.75.0)
4
+ rubocop-powerhome (0.6.0)
5
+ rubocop (= 1.82.1)
6
6
  rubocop-performance
7
7
  rubocop-rails
8
8
  rubocop-rake
@@ -11,7 +11,7 @@ PATH
11
11
  PATH
12
12
  remote: .
13
13
  specs:
14
- consent (2.3.0)
14
+ consent (2.4.0)
15
15
  cancancan (= 3.2.1)
16
16
 
17
17
  GEM
@@ -63,19 +63,21 @@ GEM
63
63
  builder (3.3.0)
64
64
  byebug (11.1.3)
65
65
  cancancan (3.2.1)
66
+ cgi (0.5.1)
66
67
  coderay (1.1.3)
67
68
  combustion (1.5.0)
68
69
  activesupport (>= 3.0.0)
69
70
  railties (>= 3.0.0)
70
71
  thor (>= 0.14.6)
71
72
  concurrent-ruby (1.3.5)
72
- connection_pool (2.5.3)
73
+ connection_pool (2.4.1)
73
74
  crass (1.0.6)
74
75
  csv (3.3.5)
75
76
  date (3.4.1)
76
77
  diff-lcs (1.6.2)
77
78
  drb (2.2.3)
78
- erb (5.0.2)
79
+ erb (4.0.4)
80
+ cgi (>= 0.3.3)
79
81
  erubi (1.13.1)
80
82
  i18n (1.14.7)
81
83
  concurrent-ruby (~> 1.0)
@@ -108,12 +110,12 @@ GEM
108
110
  net-protocol
109
111
  net-protocol (0.2.2)
110
112
  timeout
111
- nokogiri (1.18.10)
113
+ nokogiri (1.17.2)
112
114
  mini_portile2 (~> 2.8.2)
113
115
  racc (~> 1.4)
114
- nokogiri (1.18.10-arm64-darwin)
116
+ nokogiri (1.17.2-arm64-darwin)
115
117
  racc (~> 1.4)
116
- nokogiri (1.18.10-x86_64-linux-gnu)
118
+ nokogiri (1.17.2-x86_64-linux)
117
119
  racc (~> 1.4)
118
120
  parallel (1.27.0)
119
121
  parser (3.3.9.0)
@@ -157,7 +159,7 @@ GEM
157
159
  thor (~> 1.0, >= 1.2.2)
158
160
  zeitwerk (~> 2.6)
159
161
  rainbow (3.1.1)
160
- rake (13.3.0)
162
+ rake (13.3.1)
161
163
  rdoc (6.14.2)
162
164
  erb
163
165
  psych (>= 4.0.0)
@@ -186,7 +188,7 @@ GEM
186
188
  rspec-mocks (~> 3.13)
187
189
  rspec-support (~> 3.13)
188
190
  rspec-support (3.13.4)
189
- rubocop (1.75.0)
191
+ rubocop (1.82.1)
190
192
  json (~> 2.3)
191
193
  language_server-protocol (~> 3.17.0.2)
192
194
  lint_roller (~> 1.1.0)
@@ -194,10 +196,10 @@ GEM
194
196
  parser (>= 3.3.0.2)
195
197
  rainbow (>= 2.2.2, < 4.0)
196
198
  regexp_parser (>= 2.9.3, < 3.0)
197
- rubocop-ast (>= 1.43.0, < 2.0)
199
+ rubocop-ast (>= 1.48.0, < 2.0)
198
200
  ruby-progressbar (~> 1.7)
199
201
  unicode-display_width (>= 2.4.0, < 4.0)
200
- rubocop-ast (1.46.0)
202
+ rubocop-ast (1.48.0)
201
203
  parser (>= 3.3.7.2)
202
204
  prism (~> 1.4)
203
205
  rubocop-performance (1.24.0)
@@ -224,7 +226,7 @@ GEM
224
226
  sqlite3 (1.7.3-arm64-darwin)
225
227
  sqlite3 (1.7.3-x86_64-linux)
226
228
  stringio (3.1.7)
227
- thor (1.4.0)
229
+ thor (1.5.0)
228
230
  timeout (0.4.3)
229
231
  tomlrb (2.0.3)
230
232
  tzinfo (2.0.6)
@@ -248,17 +250,19 @@ PLATFORMS
248
250
  DEPENDENCIES
249
251
  activerecord (>= 5)
250
252
  appraisal (~> 2.5.0)
251
- base64
252
- bigdecimal
253
+ base64 (~> 0.3.0)
254
+ bigdecimal (~> 3.2.0, < 3.2.3)
253
255
  bundler (~> 2.1)
254
256
  combustion (~> 1.3)
257
+ connection_pool (~> 2.4.1)
255
258
  consent!
256
- erb (< 5.1)
259
+ erb (~> 4.0.4)
257
260
  license_finder (>= 7.0)
258
- logger
259
- mutex_m
261
+ logger (~> 1.7.0)
262
+ minitest (~> 5.25.5)
263
+ mutex_m (~> 0.3.0)
260
264
  net-imap (< 0.5.0)
261
- nokogiri (< 1.19)
265
+ nokogiri (~> 1.17.0, < 1.18)
262
266
  pry (>= 0.14.2)
263
267
  pry-byebug (= 3.10.1)
264
268
  rake (~> 13)
data/docs/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ### [2.4.0] - 2026-02-04
4
+ - Adds ability to verify and synchronize permission definitions across environments using deterministic checksums [#387](https://github.com/powerhome/power-tools/pull/387)
5
+
3
6
  ## [2.3.0] - 2025-10-29
4
7
 
5
8
  - Standardize all libs to support ruby 3.0, ruby 3.3 x rails 6.1 through rails 7.2 [#359](https://github.com/powerhome/power-tools/pull/359)
data/docs/README.md CHANGED
@@ -133,6 +133,25 @@ department_id = 13, it will run a query similar to:
133
133
  "SELECT * FROM projects WHERE department_id = 1"
134
134
  ```
135
135
 
136
+ ### Verifying Permission Definitions
137
+
138
+ Consent provides methods to verify and synchronize permission definitions across environments:
139
+
140
+ ```ruby
141
+ # Get the concatenated contents of all permission files
142
+ content = Consent.subjects_content([Rails.root.join('app/permissions')])
143
+
144
+ # Calculate a deterministic checksum
145
+ checksum = Consent.subjects_checksum([Rails.root.join('app/permissions')])
146
+ ```
147
+
148
+ These methods are useful for:
149
+ - Verifying permission files are identical across environments
150
+ - Detecting when permission definitions have changed
151
+ - Synchronizing permissions between systems
152
+
153
+ The checksum is deterministic - the same permission file contents will always produce the same SHA256 hash.
154
+
136
155
  ### Subject
137
156
 
138
157
  The subject is the central point of a group of actions and views. It will typically
@@ -1,17 +1,21 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This file was generated by Appraisal
2
4
 
3
5
  source "https://rubygems.org"
4
6
 
5
- gem "base64"
6
- gem "bigdecimal"
7
- gem "erb", "< 5.1"
8
- gem "logger"
9
- gem "mutex_m"
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"
10
14
  gem "net-imap", "< 0.5.0"
11
- gem "nokogiri", "< 1.19"
15
+ gem "nokogiri", "~> 1.17.0", "< 1.18"
16
+ gem "rails", "6.1.7.7"
12
17
  gem "rubocop-powerhome", path: "../../rubocop-powerhome"
13
18
  gem "securerandom", "< 0.4"
14
19
  gem "zeitwerk", "< 2.7.0"
15
- gem "rails", "6.1.7.7"
16
20
 
17
21
  gemspec path: "../"
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: ../../rubocop-powerhome
3
3
  specs:
4
- rubocop-powerhome (0.5.6)
5
- rubocop (= 1.75.0)
4
+ rubocop-powerhome (0.6.0)
5
+ rubocop (= 1.82.1)
6
6
  rubocop-performance
7
7
  rubocop-rails
8
8
  rubocop-rake
@@ -11,7 +11,7 @@ PATH
11
11
  PATH
12
12
  remote: ..
13
13
  specs:
14
- consent (2.3.0)
14
+ consent (2.4.0)
15
15
  cancancan (= 3.2.1)
16
16
 
17
17
  GEM
@@ -86,25 +86,26 @@ GEM
86
86
  builder (3.3.0)
87
87
  byebug (11.1.3)
88
88
  cancancan (3.2.1)
89
- cgi (0.5.0)
89
+ cgi (0.5.1)
90
90
  coderay (1.1.3)
91
91
  combustion (1.5.0)
92
92
  activesupport (>= 3.0.0)
93
93
  railties (>= 3.0.0)
94
94
  thor (>= 0.14.6)
95
- concurrent-ruby (1.3.5)
95
+ concurrent-ruby (1.3.6)
96
+ connection_pool (2.4.1)
96
97
  crass (1.0.6)
97
98
  csv (3.3.5)
98
- date (3.4.1)
99
+ date (3.5.1)
99
100
  diff-lcs (1.6.2)
100
101
  erb (4.0.4)
101
102
  cgi (>= 0.3.3)
102
103
  erubi (1.13.1)
103
- globalid (1.2.1)
104
+ globalid (1.3.0)
104
105
  activesupport (>= 6.1)
105
- i18n (1.14.7)
106
+ i18n (1.14.8)
106
107
  concurrent-ruby (~> 1.0)
107
- json (2.13.2)
108
+ json (2.18.1)
108
109
  language_server-protocol (3.17.0.5)
109
110
  license_finder (7.2.1)
110
111
  bundler
@@ -116,20 +117,21 @@ GEM
116
117
  xml-simple (~> 1.1.9)
117
118
  lint_roller (1.1.0)
118
119
  logger (1.7.0)
119
- loofah (2.24.1)
120
+ loofah (2.25.0)
120
121
  crass (~> 1.0.2)
121
122
  nokogiri (>= 1.12.0)
122
- mail (2.8.1)
123
+ mail (2.9.0)
124
+ logger
123
125
  mini_mime (>= 0.1.1)
124
126
  net-imap
125
127
  net-pop
126
128
  net-smtp
127
- marcel (1.0.4)
129
+ marcel (1.1.0)
128
130
  method_source (1.1.0)
129
131
  mini_mime (1.1.5)
130
132
  minitest (5.25.5)
131
133
  mutex_m (0.3.0)
132
- net-imap (0.4.22)
134
+ net-imap (0.4.23)
133
135
  date
134
136
  net-protocol
135
137
  net-pop (0.1.2)
@@ -138,16 +140,16 @@ GEM
138
140
  timeout
139
141
  net-smtp (0.5.1)
140
142
  net-protocol
141
- nio4r (2.7.4)
143
+ nio4r (2.7.5)
142
144
  nokogiri (1.17.2-arm64-darwin)
143
145
  racc (~> 1.4)
144
146
  nokogiri (1.17.2-x86_64-linux)
145
147
  racc (~> 1.4)
146
148
  parallel (1.27.0)
147
- parser (3.3.9.0)
149
+ parser (3.3.10.1)
148
150
  ast (~> 2.4.1)
149
151
  racc
150
- prism (1.4.0)
152
+ prism (1.9.0)
151
153
  pry (0.14.2)
152
154
  coderay (~> 1.1)
153
155
  method_source (~> 1.0)
@@ -155,7 +157,7 @@ GEM
155
157
  byebug (~> 11.0)
156
158
  pry (>= 0.13, < 0.15)
157
159
  racc (1.8.1)
158
- rack (2.2.17)
160
+ rack (2.2.21)
159
161
  rack-test (2.2.0)
160
162
  rack (>= 1.3)
161
163
  rails (6.1.7.7)
@@ -187,19 +189,19 @@ GEM
187
189
  rake (>= 12.2)
188
190
  thor (~> 1.0)
189
191
  rainbow (3.1.1)
190
- rake (13.3.0)
191
- regexp_parser (2.11.0)
192
- rexml (3.4.1)
193
- rspec (3.13.1)
192
+ rake (13.3.1)
193
+ regexp_parser (2.11.3)
194
+ rexml (3.4.4)
195
+ rspec (3.13.2)
194
196
  rspec-core (~> 3.13.0)
195
197
  rspec-expectations (~> 3.13.0)
196
198
  rspec-mocks (~> 3.13.0)
197
- rspec-core (3.13.5)
199
+ rspec-core (3.13.6)
198
200
  rspec-support (~> 3.13.0)
199
201
  rspec-expectations (3.13.5)
200
202
  diff-lcs (>= 1.2.0, < 2.0)
201
203
  rspec-support (~> 3.13.0)
202
- rspec-mocks (3.13.5)
204
+ rspec-mocks (3.13.7)
203
205
  diff-lcs (>= 1.2.0, < 2.0)
204
206
  rspec-support (~> 3.13.0)
205
207
  rspec-rails (6.1.5)
@@ -210,8 +212,8 @@ GEM
210
212
  rspec-expectations (~> 3.13)
211
213
  rspec-mocks (~> 3.13)
212
214
  rspec-support (~> 3.13)
213
- rspec-support (3.13.4)
214
- rubocop (1.75.0)
215
+ rspec-support (3.13.7)
216
+ rubocop (1.82.1)
215
217
  json (~> 2.3)
216
218
  language_server-protocol (~> 3.17.0.2)
217
219
  lint_roller (~> 1.1.0)
@@ -219,28 +221,28 @@ GEM
219
221
  parser (>= 3.3.0.2)
220
222
  rainbow (>= 2.2.2, < 4.0)
221
223
  regexp_parser (>= 2.9.3, < 3.0)
222
- rubocop-ast (>= 1.43.0, < 2.0)
224
+ rubocop-ast (>= 1.48.0, < 2.0)
223
225
  ruby-progressbar (~> 1.7)
224
226
  unicode-display_width (>= 2.4.0, < 4.0)
225
- rubocop-ast (1.46.0)
227
+ rubocop-ast (1.49.0)
226
228
  parser (>= 3.3.7.2)
227
- prism (~> 1.4)
228
- rubocop-performance (1.24.0)
229
+ prism (~> 1.7)
230
+ rubocop-performance (1.26.1)
229
231
  lint_roller (~> 1.1)
230
- rubocop (>= 1.72.1, < 2.0)
231
- rubocop-ast (>= 1.38.0, < 2.0)
232
- rubocop-rails (2.30.3)
232
+ rubocop (>= 1.75.0, < 2.0)
233
+ rubocop-ast (>= 1.47.1, < 2.0)
234
+ rubocop-rails (2.34.3)
233
235
  activesupport (>= 4.2.0)
234
236
  lint_roller (~> 1.1)
235
237
  rack (>= 1.1)
236
- rubocop (>= 1.72.1, < 2.0)
237
- rubocop-ast (>= 1.38.0, < 2.0)
238
+ rubocop (>= 1.75.0, < 2.0)
239
+ rubocop-ast (>= 1.44.0, < 2.0)
238
240
  rubocop-rake (0.7.1)
239
241
  lint_roller (~> 1.1)
240
242
  rubocop (>= 1.72.1)
241
- rubocop-rspec (3.6.0)
243
+ rubocop-rspec (3.9.0)
242
244
  lint_roller (~> 1.1)
243
- rubocop (~> 1.72, >= 1.72.1)
245
+ rubocop (~> 1.81)
244
246
  ruby-progressbar (1.13.0)
245
247
  rubyzip (2.4.1)
246
248
  securerandom (0.3.2)
@@ -254,14 +256,14 @@ GEM
254
256
  sprockets (>= 3.0.0)
255
257
  sqlite3 (1.7.3-arm64-darwin)
256
258
  sqlite3 (1.7.3-x86_64-linux)
257
- thor (1.4.0)
258
- timeout (0.4.3)
259
- tomlrb (2.0.3)
259
+ thor (1.5.0)
260
+ timeout (0.6.0)
261
+ tomlrb (2.0.4)
260
262
  tzinfo (2.0.6)
261
263
  concurrent-ruby (~> 1.0)
262
- unicode-display_width (3.1.4)
263
- unicode-emoji (~> 4.0, >= 4.0.4)
264
- unicode-emoji (4.0.4)
264
+ unicode-display_width (3.2.0)
265
+ unicode-emoji (~> 4.1)
266
+ unicode-emoji (4.2.0)
265
267
  websocket-driver (0.8.0)
266
268
  base64
267
269
  websocket-extensions (>= 0.1.0)
@@ -278,17 +280,19 @@ PLATFORMS
278
280
  DEPENDENCIES
279
281
  activerecord (>= 5)
280
282
  appraisal (~> 2.5.0)
281
- base64
282
- bigdecimal
283
+ base64 (~> 0.3.0)
284
+ bigdecimal (~> 3.2.0, < 3.2.3)
283
285
  bundler (~> 2.1)
284
286
  combustion (~> 1.3)
287
+ connection_pool (~> 2.4.1)
285
288
  consent!
286
- erb (< 5.1)
289
+ erb (~> 4.0.4)
287
290
  license_finder (>= 7.0)
288
- logger
289
- mutex_m
291
+ logger (~> 1.7.0)
292
+ minitest (~> 5.25.5)
293
+ mutex_m (~> 0.3.0)
290
294
  net-imap (< 0.5.0)
291
- nokogiri (< 1.19)
295
+ nokogiri (~> 1.17.0, < 1.18)
292
296
  pry (>= 0.14.2)
293
297
  pry-byebug (= 3.10.1)
294
298
  rails (= 6.1.7.7)
@@ -1,17 +1,21 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This file was generated by Appraisal
2
4
 
3
5
  source "https://rubygems.org"
4
6
 
5
- gem "base64"
6
- gem "bigdecimal"
7
- gem "erb", "< 5.1"
8
- gem "logger"
9
- gem "mutex_m"
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"
10
14
  gem "net-imap", "< 0.5.0"
11
- gem "nokogiri", "< 1.19"
15
+ gem "nokogiri", "~> 1.17.0", "< 1.18"
16
+ gem "rails", "7.0.8.7"
12
17
  gem "rubocop-powerhome", path: "../../rubocop-powerhome"
13
18
  gem "securerandom", "< 0.4"
14
19
  gem "zeitwerk", "< 2.7.0"
15
- gem "rails", "7.0.8.7"
16
20
 
17
21
  gemspec path: "../"