role_fu 0.1.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.
@@ -0,0 +1,430 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ role_fu (0.1.0)
5
+ activerecord (>= 7.0)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ action_text-trix (2.1.16)
11
+ railties
12
+ actioncable (8.1.2)
13
+ actionpack (= 8.1.2)
14
+ activesupport (= 8.1.2)
15
+ nio4r (~> 2.0)
16
+ websocket-driver (>= 0.6.1)
17
+ zeitwerk (~> 2.6)
18
+ actionmailbox (8.1.2)
19
+ actionpack (= 8.1.2)
20
+ activejob (= 8.1.2)
21
+ activerecord (= 8.1.2)
22
+ activestorage (= 8.1.2)
23
+ activesupport (= 8.1.2)
24
+ mail (>= 2.8.0)
25
+ actionmailer (8.1.2)
26
+ actionpack (= 8.1.2)
27
+ actionview (= 8.1.2)
28
+ activejob (= 8.1.2)
29
+ activesupport (= 8.1.2)
30
+ mail (>= 2.8.0)
31
+ rails-dom-testing (~> 2.2)
32
+ actionpack (8.1.2)
33
+ actionview (= 8.1.2)
34
+ activesupport (= 8.1.2)
35
+ nokogiri (>= 1.8.5)
36
+ rack (>= 2.2.4)
37
+ rack-session (>= 1.0.1)
38
+ rack-test (>= 0.6.3)
39
+ rails-dom-testing (~> 2.2)
40
+ rails-html-sanitizer (~> 1.6)
41
+ useragent (~> 0.16)
42
+ actiontext (8.1.2)
43
+ action_text-trix (~> 2.1.15)
44
+ actionpack (= 8.1.2)
45
+ activerecord (= 8.1.2)
46
+ activestorage (= 8.1.2)
47
+ activesupport (= 8.1.2)
48
+ globalid (>= 0.6.0)
49
+ nokogiri (>= 1.8.5)
50
+ actionview (8.1.2)
51
+ activesupport (= 8.1.2)
52
+ builder (~> 3.1)
53
+ erubi (~> 1.11)
54
+ rails-dom-testing (~> 2.2)
55
+ rails-html-sanitizer (~> 1.6)
56
+ activejob (8.1.2)
57
+ activesupport (= 8.1.2)
58
+ globalid (>= 0.3.6)
59
+ activemodel (8.1.2)
60
+ activesupport (= 8.1.2)
61
+ activerecord (8.1.2)
62
+ activemodel (= 8.1.2)
63
+ activesupport (= 8.1.2)
64
+ timeout (>= 0.4.0)
65
+ activestorage (8.1.2)
66
+ actionpack (= 8.1.2)
67
+ activejob (= 8.1.2)
68
+ activerecord (= 8.1.2)
69
+ activesupport (= 8.1.2)
70
+ marcel (~> 1.0)
71
+ activesupport (8.1.2)
72
+ base64
73
+ bigdecimal
74
+ concurrent-ruby (~> 1.0, >= 1.3.1)
75
+ connection_pool (>= 2.2.5)
76
+ drb
77
+ i18n (>= 1.6, < 2)
78
+ json
79
+ logger (>= 1.4.2)
80
+ minitest (>= 5.1)
81
+ securerandom (>= 0.3)
82
+ tzinfo (~> 2.0, >= 2.0.5)
83
+ uri (>= 0.13.1)
84
+ appraisal (2.5.0)
85
+ bundler
86
+ rake
87
+ thor (>= 0.14.0)
88
+ ast (2.4.3)
89
+ base64 (0.3.0)
90
+ bigdecimal (4.0.1)
91
+ builder (3.3.0)
92
+ concurrent-ruby (1.3.6)
93
+ connection_pool (3.0.2)
94
+ crass (1.0.6)
95
+ date (3.5.1)
96
+ diff-lcs (1.6.2)
97
+ docile (1.4.1)
98
+ drb (2.2.3)
99
+ erb (6.0.1)
100
+ erubi (1.13.1)
101
+ globalid (1.3.0)
102
+ activesupport (>= 6.1)
103
+ i18n (1.14.8)
104
+ concurrent-ruby (~> 1.0)
105
+ io-console (0.8.2)
106
+ irb (1.16.0)
107
+ pp (>= 0.6.0)
108
+ rdoc (>= 4.0.0)
109
+ reline (>= 0.4.2)
110
+ json (2.18.1)
111
+ language_server-protocol (3.17.0.5)
112
+ lefthook (2.1.0)
113
+ lint_roller (1.1.0)
114
+ logger (1.7.0)
115
+ loofah (2.25.0)
116
+ crass (~> 1.0.2)
117
+ nokogiri (>= 1.12.0)
118
+ mail (2.9.0)
119
+ logger
120
+ mini_mime (>= 0.1.1)
121
+ net-imap
122
+ net-pop
123
+ net-smtp
124
+ marcel (1.1.0)
125
+ mini_mime (1.1.5)
126
+ minitest (6.0.1)
127
+ prism (~> 1.5)
128
+ net-imap (0.6.2)
129
+ date
130
+ net-protocol
131
+ net-pop (0.1.2)
132
+ net-protocol
133
+ net-protocol (0.2.2)
134
+ timeout
135
+ net-smtp (0.5.1)
136
+ net-protocol
137
+ nio4r (2.7.5)
138
+ nokogiri (1.19.0-aarch64-linux-gnu)
139
+ racc (~> 1.4)
140
+ nokogiri (1.19.0-aarch64-linux-musl)
141
+ racc (~> 1.4)
142
+ nokogiri (1.19.0-arm-linux-gnu)
143
+ racc (~> 1.4)
144
+ nokogiri (1.19.0-arm-linux-musl)
145
+ racc (~> 1.4)
146
+ nokogiri (1.19.0-arm64-darwin)
147
+ racc (~> 1.4)
148
+ nokogiri (1.19.0-x86_64-darwin)
149
+ racc (~> 1.4)
150
+ nokogiri (1.19.0-x86_64-linux-gnu)
151
+ racc (~> 1.4)
152
+ nokogiri (1.19.0-x86_64-linux-musl)
153
+ racc (~> 1.4)
154
+ parallel (1.27.0)
155
+ parser (3.3.10.1)
156
+ ast (~> 2.4.1)
157
+ racc
158
+ pp (0.6.3)
159
+ prettyprint
160
+ prettyprint (0.2.0)
161
+ prism (1.9.0)
162
+ psych (5.3.1)
163
+ date
164
+ stringio
165
+ racc (1.8.1)
166
+ rack (3.2.4)
167
+ rack-session (2.1.1)
168
+ base64 (>= 0.1.0)
169
+ rack (>= 3.0.0)
170
+ rack-test (2.2.0)
171
+ rack (>= 1.3)
172
+ rackup (2.3.1)
173
+ rack (>= 3)
174
+ rails (8.1.2)
175
+ actioncable (= 8.1.2)
176
+ actionmailbox (= 8.1.2)
177
+ actionmailer (= 8.1.2)
178
+ actionpack (= 8.1.2)
179
+ actiontext (= 8.1.2)
180
+ actionview (= 8.1.2)
181
+ activejob (= 8.1.2)
182
+ activemodel (= 8.1.2)
183
+ activerecord (= 8.1.2)
184
+ activestorage (= 8.1.2)
185
+ activesupport (= 8.1.2)
186
+ bundler (>= 1.15.0)
187
+ railties (= 8.1.2)
188
+ rails-dom-testing (2.3.0)
189
+ activesupport (>= 5.0.0)
190
+ minitest
191
+ nokogiri (>= 1.6)
192
+ rails-html-sanitizer (1.6.2)
193
+ loofah (~> 2.21)
194
+ 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)
195
+ railties (8.1.2)
196
+ actionpack (= 8.1.2)
197
+ activesupport (= 8.1.2)
198
+ irb (~> 1.13)
199
+ rackup (>= 1.0.0)
200
+ rake (>= 12.2)
201
+ thor (~> 1.0, >= 1.2.2)
202
+ tsort (>= 0.2)
203
+ zeitwerk (~> 2.6)
204
+ rainbow (3.1.1)
205
+ rake (13.3.1)
206
+ rdoc (7.1.0)
207
+ erb
208
+ psych (>= 4.0.0)
209
+ tsort
210
+ regexp_parser (2.11.3)
211
+ reline (0.6.3)
212
+ io-console (~> 0.5)
213
+ rspec (3.13.2)
214
+ rspec-core (~> 3.13.0)
215
+ rspec-expectations (~> 3.13.0)
216
+ rspec-mocks (~> 3.13.0)
217
+ rspec-core (3.13.6)
218
+ rspec-support (~> 3.13.0)
219
+ rspec-expectations (3.13.5)
220
+ diff-lcs (>= 1.2.0, < 2.0)
221
+ rspec-support (~> 3.13.0)
222
+ rspec-mocks (3.13.7)
223
+ diff-lcs (>= 1.2.0, < 2.0)
224
+ rspec-support (~> 3.13.0)
225
+ rspec-support (3.13.7)
226
+ rubocop (1.82.1)
227
+ json (~> 2.3)
228
+ language_server-protocol (~> 3.17.0.2)
229
+ lint_roller (~> 1.1.0)
230
+ parallel (~> 1.10)
231
+ parser (>= 3.3.0.2)
232
+ rainbow (>= 2.2.2, < 4.0)
233
+ regexp_parser (>= 2.9.3, < 3.0)
234
+ rubocop-ast (>= 1.48.0, < 2.0)
235
+ ruby-progressbar (~> 1.7)
236
+ unicode-display_width (>= 2.4.0, < 4.0)
237
+ rubocop-ast (1.49.0)
238
+ parser (>= 3.3.7.2)
239
+ prism (~> 1.7)
240
+ rubocop-performance (1.26.1)
241
+ lint_roller (~> 1.1)
242
+ rubocop (>= 1.75.0, < 2.0)
243
+ rubocop-ast (>= 1.47.1, < 2.0)
244
+ rubocop-rspec (3.9.0)
245
+ lint_roller (~> 1.1)
246
+ rubocop (~> 1.81)
247
+ ruby-progressbar (1.13.0)
248
+ securerandom (0.4.1)
249
+ simplecov (0.22.0)
250
+ docile (~> 1.1)
251
+ simplecov-html (~> 0.11)
252
+ simplecov_json_formatter (~> 0.1)
253
+ simplecov-html (0.13.2)
254
+ simplecov_json_formatter (0.1.4)
255
+ sqlite3 (2.9.0-aarch64-linux-gnu)
256
+ sqlite3 (2.9.0-aarch64-linux-musl)
257
+ sqlite3 (2.9.0-arm-linux-gnu)
258
+ sqlite3 (2.9.0-arm-linux-musl)
259
+ sqlite3 (2.9.0-arm64-darwin)
260
+ sqlite3 (2.9.0-x86_64-darwin)
261
+ sqlite3 (2.9.0-x86_64-linux-gnu)
262
+ sqlite3 (2.9.0-x86_64-linux-musl)
263
+ standard (1.53.0)
264
+ language_server-protocol (~> 3.17.0.2)
265
+ lint_roller (~> 1.0)
266
+ rubocop (~> 1.82.0)
267
+ standard-custom (~> 1.0.0)
268
+ standard-performance (~> 1.8)
269
+ standard-custom (1.0.2)
270
+ lint_roller (~> 1.0)
271
+ rubocop (~> 1.50)
272
+ standard-performance (1.9.0)
273
+ lint_roller (~> 1.1)
274
+ rubocop-performance (~> 1.26.0)
275
+ stringio (3.2.0)
276
+ thor (1.5.0)
277
+ timeout (0.6.0)
278
+ tsort (0.2.0)
279
+ tzinfo (2.0.6)
280
+ concurrent-ruby (~> 1.0)
281
+ unicode-display_width (3.2.0)
282
+ unicode-emoji (~> 4.1)
283
+ unicode-emoji (4.2.0)
284
+ uri (1.1.1)
285
+ useragent (0.16.11)
286
+ websocket-driver (0.8.0)
287
+ base64
288
+ websocket-extensions (>= 0.1.0)
289
+ websocket-extensions (0.1.5)
290
+ zeitwerk (2.7.4)
291
+
292
+ PLATFORMS
293
+ aarch64-linux-gnu
294
+ aarch64-linux-musl
295
+ arm-linux-gnu
296
+ arm-linux-musl
297
+ arm64-darwin
298
+ x86_64-darwin
299
+ x86_64-linux-gnu
300
+ x86_64-linux-musl
301
+
302
+ DEPENDENCIES
303
+ appraisal
304
+ irb
305
+ lefthook
306
+ rails (~> 8.1.0)
307
+ rake (~> 13.0)
308
+ role_fu!
309
+ rspec (~> 3.0)
310
+ rubocop-performance
311
+ rubocop-rspec
312
+ simplecov
313
+ sqlite3 (~> 2.0)
314
+ standard (>= 1.35.1)
315
+
316
+ CHECKSUMS
317
+ action_text-trix (2.1.16) sha256=f645a2c21821b8449fd1d6770708f4031c91a2eedf9ef476e9be93c64e703a8a
318
+ actioncable (8.1.2) sha256=dc31efc34cca9cdefc5c691ddb8b4b214c0ea5cd1372108cbc1377767fb91969
319
+ actionmailbox (8.1.2) sha256=058b2fb1980e5d5a894f675475fcfa45c62631103d5a2596d9610ec81581889b
320
+ actionmailer (8.1.2) sha256=f4c1d2060f653bfe908aa7fdc5a61c0e5279670de992146582f2e36f8b9175e9
321
+ actionpack (8.1.2) sha256=ced74147a1f0daafaa4bab7f677513fd4d3add574c7839958f7b4f1de44f8423
322
+ actiontext (8.1.2) sha256=0bf57da22a9c19d970779c3ce24a56be31b51c7640f2763ec64aa72e358d2d2d
323
+ actionview (8.1.2) sha256=80455b2588911c9b72cec22d240edacb7c150e800ef2234821269b2b2c3e2e5b
324
+ activejob (8.1.2) sha256=908dab3713b101859536375819f4156b07bdf4c232cc645e7538adb9e302f825
325
+ activemodel (8.1.2) sha256=e21358c11ce68aed3f9838b7e464977bc007b4446c6e4059781e1d5c03bcf33e
326
+ activerecord (8.1.2) sha256=acfbe0cadfcc50fa208011fe6f4eb01cae682ebae0ef57145ba45380c74bcc44
327
+ activestorage (8.1.2) sha256=8a63a48c3999caeee26a59441f813f94681fc35cc41aba7ce1f836add04fba76
328
+ activesupport (8.1.2) sha256=88842578ccd0d40f658289b0e8c842acfe9af751afee2e0744a7873f50b6fdae
329
+ appraisal (2.5.0) sha256=36989221be127913b0dba8d114da2001e6b2dceea7bd4951200eaba764eed3ce
330
+ ast (2.4.3) sha256=954615157c1d6a382bc27d690d973195e79db7f55e9765ac7c481c60bdb4d383
331
+ base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b
332
+ bigdecimal (4.0.1) sha256=8b07d3d065a9f921c80ceaea7c9d4ae596697295b584c296fe599dd0ad01c4a7
333
+ builder (3.3.0) sha256=497918d2f9dca528fdca4b88d84e4ef4387256d984b8154e9d5d3fe5a9c8835f
334
+ concurrent-ruby (1.3.6) sha256=6b56837e1e7e5292f9864f34b69c5a2cbc75c0cf5338f1ce9903d10fa762d5ab
335
+ connection_pool (3.0.2) sha256=33fff5ba71a12d2aa26cb72b1db8bba2a1a01823559fb01d29eb74c286e62e0a
336
+ crass (1.0.6) sha256=dc516022a56e7b3b156099abc81b6d2b08ea1ed12676ac7a5657617f012bd45d
337
+ date (3.5.1) sha256=750d06384d7b9c15d562c76291407d89e368dda4d4fff957eb94962d325a0dc0
338
+ diff-lcs (1.6.2) sha256=9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962
339
+ docile (1.4.1) sha256=96159be799bfa73cdb721b840e9802126e4e03dfc26863db73647204c727f21e
340
+ drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373
341
+ erb (6.0.1) sha256=28ecdd99c5472aebd5674d6061e3c6b0a45c049578b071e5a52c2a7f13c197e5
342
+ erubi (1.13.1) sha256=a082103b0885dbc5ecf1172fede897f9ebdb745a4b97a5e8dc63953db1ee4ad9
343
+ globalid (1.3.0) sha256=05c639ad6eb4594522a0b07983022f04aa7254626ab69445a0e493aa3786ff11
344
+ i18n (1.14.8) sha256=285778639134865c5e0f6269e0b818256017e8cde89993fdfcbfb64d088824a5
345
+ io-console (0.8.2) sha256=d6e3ae7a7cc7574f4b8893b4fca2162e57a825b223a177b7afa236c5ef9814cc
346
+ irb (1.16.0) sha256=2abe56c9ac947cdcb2f150572904ba798c1e93c890c256f8429981a7675b0806
347
+ json (2.18.1) sha256=fe112755501b8d0466b5ada6cf50c8c3f41e897fa128ac5d263ec09eedc9f986
348
+ language_server-protocol (3.17.0.5) sha256=fd1e39a51a28bf3eec959379985a72e296e9f9acfce46f6a79d31ca8760803cc
349
+ lefthook (2.1.0) sha256=a100dc90139806e62b9aa40cf32e9edf34f6cff10c8b55ebd14a1b0add4b86bf
350
+ lint_roller (1.1.0) sha256=2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87
351
+ logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
352
+ loofah (2.25.0) sha256=df5ed7ac3bac6a4ec802df3877ee5cc86d027299f8952e6243b3dac446b060e6
353
+ mail (2.9.0) sha256=6fa6673ecd71c60c2d996260f9ee3dd387d4673b8169b502134659ece6d34941
354
+ marcel (1.1.0) sha256=fdcfcfa33cc52e93c4308d40e4090a5d4ea279e160a7f6af988260fa970e0bee
355
+ mini_mime (1.1.5) sha256=8681b7e2e4215f2a159f9400b5816d85e9d8c6c6b491e96a12797e798f8bccef
356
+ minitest (6.0.1) sha256=7854c74f48e2e975969062833adc4013f249a4b212f5e7b9d5c040bf838d54bb
357
+ net-imap (0.6.2) sha256=08caacad486853c61676cca0c0c47df93db02abc4a8239a8b67eb0981428acc6
358
+ net-pop (0.1.2) sha256=848b4e982013c15b2f0382792268763b748cce91c9e91e36b0f27ed26420dff3
359
+ net-protocol (0.2.2) sha256=aa73e0cba6a125369de9837b8d8ef82a61849360eba0521900e2c3713aa162a8
360
+ net-smtp (0.5.1) sha256=ed96a0af63c524fceb4b29b0d352195c30d82dd916a42f03c62a3a70e5b70736
361
+ nio4r (2.7.5) sha256=6c90168e48fb5f8e768419c93abb94ba2b892a1d0602cb06eef16d8b7df1dca1
362
+ nokogiri (1.19.0-aarch64-linux-gnu) sha256=11a97ecc3c0e7e5edcf395720b10860ef493b768f6aa80c539573530bc933767
363
+ nokogiri (1.19.0-aarch64-linux-musl) sha256=eb70507f5e01bc23dad9b8dbec2b36ad0e61d227b42d292835020ff754fb7ba9
364
+ nokogiri (1.19.0-arm-linux-gnu) sha256=572a259026b2c8b7c161fdb6469fa2d0edd2b61cd599db4bbda93289abefbfe5
365
+ nokogiri (1.19.0-arm-linux-musl) sha256=23ed90922f1a38aed555d3de4d058e90850c731c5b756d191b3dc8055948e73c
366
+ nokogiri (1.19.0-arm64-darwin) sha256=0811dfd936d5f6dd3f6d32ef790568bf29b2b7bead9ba68866847b33c9cf5810
367
+ nokogiri (1.19.0-x86_64-darwin) sha256=1dad56220b603a8edb9750cd95798bffa2b8dd9dd9aa47f664009ee5b43e3067
368
+ nokogiri (1.19.0-x86_64-linux-gnu) sha256=f482b95c713d60031d48c44ce14562f8d2ce31e3a9e8dd0ccb131e9e5a68b58c
369
+ nokogiri (1.19.0-x86_64-linux-musl) sha256=1c4ca6b381622420073ce6043443af1d321e8ed93cc18b08e2666e5bd02ffae4
370
+ parallel (1.27.0) sha256=4ac151e1806b755fb4e2dc2332cbf0e54f2e24ba821ff2d3dcf86bf6dc4ae130
371
+ parser (3.3.10.1) sha256=06f6a725d2cd91e5e7f2b7c32ba143631e1f7c8ae2fb918fc4cebec187e6a688
372
+ pp (0.6.3) sha256=2951d514450b93ccfeb1df7d021cae0da16e0a7f95ee1e2273719669d0ab9df6
373
+ prettyprint (0.2.0) sha256=2bc9e15581a94742064a3cc8b0fb9d45aae3d03a1baa6ef80922627a0766f193
374
+ prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85
375
+ psych (5.3.1) sha256=eb7a57cef10c9d70173ff74e739d843ac3b2c019a003de48447b2963d81b1974
376
+ racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f
377
+ rack (3.2.4) sha256=5d74b6f75082a643f43c1e76b419c40f0e5527fcfee1e669ac1e6b73c0ccb6f6
378
+ rack-session (2.1.1) sha256=0b6dc07dea7e4b583f58a48e8b806d4c9f1c6c9214ebc202ec94562cbea2e4e9
379
+ rack-test (2.2.0) sha256=005a36692c306ac0b4a9350355ee080fd09ddef1148a5f8b2ac636c720f5c463
380
+ rackup (2.3.1) sha256=6c79c26753778e90983761d677a48937ee3192b3ffef6bc963c0950f94688868
381
+ rails (8.1.2) sha256=5069061b23dfa8706b9f0159ae8b9d35727359103178a26962b868a680ba7d95
382
+ rails-dom-testing (2.3.0) sha256=8acc7953a7b911ca44588bf08737bc16719f431a1cc3091a292bca7317925c1d
383
+ rails-html-sanitizer (1.6.2) sha256=35fce2ca8242da8775c83b6ba9c1bcaad6751d9eb73c1abaa8403475ab89a560
384
+ railties (8.1.2) sha256=1289ece76b4f7668fc46d07e55cc992b5b8751f2ad85548b7da351b8c59f8055
385
+ rainbow (3.1.1) sha256=039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a
386
+ rake (13.3.1) sha256=8c9e89d09f66a26a01264e7e3480ec0607f0c497a861ef16063604b1b08eb19c
387
+ rdoc (7.1.0) sha256=494899df0706c178596ca6e1d50f1b7eb285a9b2aae715be5abd742734f17363
388
+ regexp_parser (2.11.3) sha256=ca13f381a173b7a93450e53459075c9b76a10433caadcb2f1180f2c741fc55a4
389
+ reline (0.6.3) sha256=1198b04973565b36ec0f11542ab3f5cfeeec34823f4e54cebde90968092b1835
390
+ role_fu (0.1.0)
391
+ rspec (3.13.2) sha256=206284a08ad798e61f86d7ca3e376718d52c0bc944626b2349266f239f820587
392
+ rspec-core (3.13.6) sha256=a8823c6411667b60a8bca135364351dda34cd55e44ff94c4be4633b37d828b2d
393
+ rspec-expectations (3.13.5) sha256=33a4d3a1d95060aea4c94e9f237030a8f9eae5615e9bd85718fe3a09e4b58836
394
+ rspec-mocks (3.13.7) sha256=0979034e64b1d7a838aaaddf12bf065ea4dc40ef3d4c39f01f93ae2c66c62b1c
395
+ rspec-support (3.13.7) sha256=0640e5570872aafefd79867901deeeeb40b0c9875a36b983d85f54fb7381c47c
396
+ rubocop (1.82.1) sha256=09f1a6a654a960eda767aebea33e47603080f8e9c9a3f019bf9b94c9cab5e273
397
+ rubocop-ast (1.49.0) sha256=49c3676d3123a0923d333e20c6c2dbaaae2d2287b475273fddee0c61da9f71fd
398
+ rubocop-performance (1.26.1) sha256=cd19b936ff196df85829d264b522fd4f98b6c89ad271fa52744a8c11b8f71834
399
+ rubocop-rspec (3.9.0) sha256=8fa70a3619408237d789aeecfb9beef40576acc855173e60939d63332fdb55e2
400
+ ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
401
+ securerandom (0.4.1) sha256=cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1
402
+ simplecov (0.22.0) sha256=fe2622c7834ff23b98066bb0a854284b2729a569ac659f82621fc22ef36213a5
403
+ simplecov-html (0.13.2) sha256=bd0b8e54e7c2d7685927e8d6286466359b6f16b18cb0df47b508e8d73c777246
404
+ simplecov_json_formatter (0.1.4) sha256=529418fbe8de1713ac2b2d612aa3daa56d316975d307244399fa4838c601b428
405
+ sqlite3 (2.9.0-aarch64-linux-gnu) sha256=cfe1e0216f46d7483839719bf827129151e6c680317b99d7b8fc1597a3e13473
406
+ sqlite3 (2.9.0-aarch64-linux-musl) sha256=56a35cb2d70779afc2ac191baf2c2148242285ecfed72f9b021218c5c4917913
407
+ sqlite3 (2.9.0-arm-linux-gnu) sha256=a19a21504b0d7c8c825fbbf37b358ae316b6bd0d0134c619874060b2eef05435
408
+ sqlite3 (2.9.0-arm-linux-musl) sha256=fca5b26197c70e3363115d3faaea34d7b2ad9c7f5fa8d8312e31b64e7556ee07
409
+ sqlite3 (2.9.0-arm64-darwin) sha256=a917bd9b84285766ff3300b7d79cd583f5a067594c8c1263e6441618c04a6ed3
410
+ sqlite3 (2.9.0-x86_64-darwin) sha256=59fe51baa3cb33c36d27ce78b4ed9360cd33ccca09498c2ae63850c97c0a6026
411
+ sqlite3 (2.9.0-x86_64-linux-gnu) sha256=72fff9bd750070ba3af695511ba5f0e0a2d8a9206f84869640b3e99dfaf3d5a5
412
+ sqlite3 (2.9.0-x86_64-linux-musl) sha256=ef716ba7a66d7deb1ccc402ac3a6d7343da17fac862793b7f0be3d2917253c90
413
+ standard (1.53.0) sha256=f3c9493385db7079d0abce6f7582f553122156997b81258cd361d3480eeacf9c
414
+ standard-custom (1.0.2) sha256=424adc84179a074f1a2a309bb9cf7cd6bfdb2b6541f20c6bf9436c0ba22a652b
415
+ standard-performance (1.9.0) sha256=49483d31be448292951d80e5e67cdcb576c2502103c7b40aec6f1b6e9c88e3f2
416
+ stringio (3.2.0) sha256=c37cb2e58b4ffbd33fe5cd948c05934af997b36e0b6ca6fdf43afa234cf222e1
417
+ thor (1.5.0) sha256=e3a9e55fe857e44859ce104a84675ab6e8cd59c650a49106a05f55f136425e73
418
+ timeout (0.6.0) sha256=6d722ad619f96ee383a0c557ec6eb8c4ecb08af3af62098a0be5057bf00de1af
419
+ tsort (0.2.0) sha256=9650a793f6859a43b6641671278f79cfead60ac714148aabe4e3f0060480089f
420
+ tzinfo (2.0.6) sha256=8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b
421
+ unicode-display_width (3.2.0) sha256=0cdd96b5681a5949cdbc2c55e7b420facae74c4aaf9a9815eee1087cb1853c42
422
+ unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f
423
+ uri (1.1.1) sha256=379fa58d27ffb1387eaada68c749d1426738bd0f654d812fcc07e7568f5c57c6
424
+ useragent (0.16.11) sha256=700e6413ad4bb954bb63547fa098dddf7b0ebe75b40cc6f93b8d54255b173844
425
+ websocket-driver (0.8.0) sha256=ed0dba4b943c22f17f9a734817e808bc84cdce6a7e22045f5315aa57676d4962
426
+ websocket-extensions (0.1.5) sha256=1c6ba63092cda343eb53fc657110c71c754c56484aad42578495227d717a8241
427
+ zeitwerk (2.7.4) sha256=2bef90f356bdafe9a6c2bd32bcd804f83a4f9b8bc27f3600fff051eb3edcec8b
428
+
429
+ BUNDLED WITH
430
+ 4.0.5
data/lefthook.yml ADDED
@@ -0,0 +1,11 @@
1
+ pre-commit:
2
+ parallel: true
3
+ commands:
4
+ appraisal:
5
+ glob: "{Gemfile,role_fu.gemspec,lib/role_fu/version.rb}"
6
+ run: bundle exec appraisal install && git add gemfiles/*.lock
7
+ rubocop:
8
+ glob: "*.rb"
9
+ run: bundle exec rubocop --force-exclusion {staged_files}
10
+ rspec:
11
+ run: bundle exec rspec
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "rails/generators/base"
4
+
5
+ module RoleFu
6
+ module Generators
7
+ class InstallGenerator < Rails::Generators::Base
8
+ source_root File.expand_path("templates", __dir__)
9
+
10
+ desc "Creates a RoleFu configuration file"
11
+
12
+ def copy_initializer
13
+ template "role_fu.rb", "config/initializers/role_fu.rb"
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "rails/generators/active_record"
4
+
5
+ module RoleFu
6
+ module Generators
7
+ class RoleFuGenerator < ActiveRecord::Generators::Base
8
+ source_root File.expand_path("templates", __dir__)
9
+
10
+ argument :user_cname, type: :string, default: "User", banner: "User"
11
+
12
+ def generate_models
13
+ # Generate Role model
14
+ template "role.rb.erb", "app/models/#{name.underscore}.rb"
15
+
16
+ # Generate RoleAssignment model
17
+ assignment_name = "#{name}Assignment"
18
+ template "role_assignment.rb.erb", "app/models/#{assignment_name.underscore}.rb"
19
+ end
20
+
21
+ def copy_role_fu_migration
22
+ migration_template "migration.rb.erb", "db/migrate/role_fu_create_#{table_name}.rb", migration_version: migration_version
23
+ end
24
+
25
+ def inject_role_fu_into_user_model
26
+ user_path = "app/models/#{user_cname.underscore}.rb"
27
+ if File.exist?(user_path)
28
+ inject_into_class(user_path, user_cname.constantize) do
29
+ " include RoleFu::Roleable\n"
30
+ end
31
+ else
32
+ print_notes "User model #{user_cname} not found at #{user_path}. Please add 'include RoleFu::Roleable' manually."
33
+ end
34
+ end
35
+
36
+ private
37
+
38
+ def migration_version
39
+ "[#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}]" if Rails::VERSION::MAJOR >= 5
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ class RoleFuCreate<%= table_name.camelize %> < ActiveRecord::Migration<%= migration_version %>
4
+ def change
5
+ create_table :<%= table_name %> do |t|
6
+ t.string :name
7
+ t.references :resource, polymorphic: true, index: true
8
+
9
+ t.timestamps
10
+ end
11
+
12
+ create_table :<%= table_name.singularize %>_assignments do |t|
13
+ t.references :<%= user_cname.underscore %>, index: true
14
+ t.references :<%= table_name.singularize %>, index: true
15
+
16
+ t.timestamps
17
+ end
18
+
19
+ add_index(:<%= table_name %>, [ :name, :resource_type, :resource_id ])
20
+ add_index(:<%= table_name.singularize %>_assignments, [ :<%= user_cname.underscore %>_id, :<%= table_name.singularize %>_id ], name: 'index_role_fu_assignments_on_user_and_role', unique: true)
21
+ end
22
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ class <%= class_name %> < ApplicationRecord
4
+ include RoleFu::Role
5
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ class <%= class_name %>Assignment < ApplicationRecord
4
+ include RoleFu::RoleAssignment
5
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ RoleFu.configure do |config|
4
+ # The class name of your User model
5
+ # config.user_class_name = "User"
6
+
7
+ # The class name of your Role model
8
+ # config.role_class_name = "Role"
9
+
10
+ # The class name of your RoleAssignment model
11
+ # config.role_assignment_class_name = "RoleAssignment"
12
+ end
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RoleFu
4
+ class Configuration
5
+ attr_accessor :user_class_name, :role_class_name, :role_assignment_class_name
6
+
7
+ def initialize
8
+ @user_class_name = "User"
9
+ @role_class_name = "Role"
10
+ @role_assignment_class_name = "RoleAssignment"
11
+ end
12
+ end
13
+
14
+ class << self
15
+ def configuration
16
+ @configuration ||= Configuration.new
17
+ end
18
+
19
+ def configure
20
+ yield(configuration)
21
+ end
22
+
23
+ def user_class
24
+ configuration.user_class_name.constantize
25
+ end
26
+
27
+ def role_class
28
+ configuration.role_class_name.constantize
29
+ end
30
+
31
+ def role_assignment_class
32
+ configuration.role_assignment_class_name.constantize
33
+ end
34
+ end
35
+ end