bp3-activeadmin 0.2.0 → 0.3.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 +4 -4
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +15 -0
- data/CLAUDE.md +49 -0
- data/Gemfile.lock +105 -93
- data/README.md +1 -1
- data/bp3-activeadmin.gemspec +2 -2
- data/lib/bp3/activeadmin/railtie.rb +14 -0
- data/lib/bp3/activeadmin/version.rb +1 -1
- data/lib/bp3/activeadmin.rb +1 -1
- metadata +180 -159
- /data/lib/{bp3-active_admin.rb → bp3-activeadmin.rb} +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 05ca09a06035384756df0068d7920b9713dca75d6bb7e61f9ff29d3be7c65a71
|
|
4
|
+
data.tar.gz: 78a87fd00ba2d889f271f796500ab1ef139612391b1cfa2633c01bb4786607b6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8cfd13724e21aee39e43815981608d4591a105fb8b67ab1aedb1055478df53b4fb04cb93941e4e3ded8d65253df48082bac0b3e6456d58ec126fbdea77990c47
|
|
7
|
+
data.tar.gz: d18727725a7dfee2c5a09932f5d7a1faa56f9e27962358aaa8e1ffb6c934210d397508fbffc8ca52489cb135bf44b5c686bc2b56074fb3d1a17a6ff40473db30
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [0.3.0] - 2026-11-20
|
|
4
|
+
|
|
5
|
+
- Update gems
|
|
6
|
+
- Require Ruby 4.0.10 and update Bundler to 4.1.0
|
|
7
|
+
- Remove constantize memoization
|
|
8
|
+
- Rename the entry file to `lib/bp3-activeadmin.rb`, to match the gem
|
|
9
|
+
|
|
10
|
+
## [0.2.1] - 2026-10-30
|
|
11
|
+
|
|
12
|
+
### Security
|
|
13
|
+
|
|
14
|
+
- Answer `EXPLORE` through `Bp3::Core::Ransackable` on `ActiveAdmin::Comment`, whose own class methods
|
|
15
|
+
otherwise allowed every column and association to it
|
|
16
|
+
- Require bp3-core 0.4.0, for `Bp3::Core::Ransackable::EXPLORE`
|
|
17
|
+
|
|
3
18
|
## [0.2.0] - 2026-01-12
|
|
4
19
|
|
|
5
20
|
- Update activeadmin gem dependency to 4.0.0.beta16
|
data/CLAUDE.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
+
|
|
5
|
+
## Project Overview
|
|
6
|
+
|
|
7
|
+
bp3-activeadmin adapts `activeadmin` (4.x) for BP3 (persuavis/black_phoebe_3), a multi-site multi-tenant
|
|
8
|
+
Rails application. It keeps ActiveAdmin's default filters inside what each model allows ransack to search.
|
|
9
|
+
|
|
10
|
+
## Commands
|
|
11
|
+
|
|
12
|
+
The gems run on Ruby 3.4.6 (`.ruby-version`). Prefix commands with `~/.rvm/bin/rvm 3.4.6 do` when the
|
|
13
|
+
shell is not already on it; a missing `rspec` means the wrong Ruby, not a missing bundle.
|
|
14
|
+
|
|
15
|
+
- `bundle exec rake` - specs and RuboCop (the default task)
|
|
16
|
+
- `bundle exec rspec spec/path/to/file_spec.rb[:LINE]` - one file or example
|
|
17
|
+
- `bundle exec rubocop` / `bundle exec rubocop -a`
|
|
18
|
+
- `bin/setup`, `bin/console`, `rake install`
|
|
19
|
+
|
|
20
|
+
## Architecture
|
|
21
|
+
|
|
22
|
+
`lib/bp3/activeadmin/railtie.rb` runs in an `after_initialize` block:
|
|
23
|
+
|
|
24
|
+
- prepends `PrependResourceExtension` to `ActiveAdmin::Filters::ResourceExtension`, so `default_filters`
|
|
25
|
+
keeps only the fields in `resource_class.ransackable_fields(auth_object)` (from `Bp3::Core::Ransackable`)
|
|
26
|
+
- `auth_object` is the configured request state class sent the configured method
|
|
27
|
+
- includes `Bp3::Core::Ransackable` in `ActiveAdmin::Comment`
|
|
28
|
+
|
|
29
|
+
**Configuration** (`lib/bp3/activeadmin.rb`): `Bp3::Activeadmin.global_request_state_class_name` and
|
|
30
|
+
`.global_request_state_method`. The application's `config/initializers/bp3-activeadmin.rb` sets them to
|
|
31
|
+
`'GlobalRequestState'` and `:current_login` (the README's example still shows `:highest_privilege`).
|
|
32
|
+
|
|
33
|
+
## Testing
|
|
34
|
+
|
|
35
|
+
The spec only checks the version; the Railtie needs a Rails application with ActiveAdmin to exercise. Try a
|
|
36
|
+
change against the application (black_phoebe_3) by putting this repo's `lib` ahead of the bundled gem.
|
|
37
|
+
|
|
38
|
+
## Code Style
|
|
39
|
+
|
|
40
|
+
- RuboCop (`.rubocop.yml`): target Ruby 3.2.2, NewCops, rubocop-rake and rubocop-rspec; AbcSize 26,
|
|
41
|
+
MethodLength 15, BlockLength 66, ModuleLength 150; `Lint/ConstantDefinitionInBlock` and `Lint/Void`
|
|
42
|
+
are off for `lib/bp3/**/railtie.rb`, where classes are reopened inside a block
|
|
43
|
+
- Every file starts with `# frozen_string_literal: true`
|
|
44
|
+
- American English; no trailing whitespace on any added or modified line
|
|
45
|
+
|
|
46
|
+
## Release
|
|
47
|
+
|
|
48
|
+
Bump `lib/bp3/activeadmin/version.rb` and add a `CHANGELOG.md` entry. `rake release` tags, pushes and
|
|
49
|
+
publishes to rubygems.org; leave releasing and committing to the user.
|
data/Gemfile.lock
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
bp3-activeadmin (0.
|
|
4
|
+
bp3-activeadmin (0.3.0)
|
|
5
5
|
activeadmin (>= 4.0.0.beta16)
|
|
6
6
|
activesupport (~> 8.1)
|
|
7
|
-
bp3-core (>= 0.
|
|
7
|
+
bp3-core (>= 0.4.0)
|
|
8
8
|
bp3-request_state (>= 0.1.0)
|
|
9
9
|
|
|
10
10
|
GEM
|
|
11
11
|
remote: https://rubygems.org/
|
|
12
12
|
specs:
|
|
13
|
-
actionpack (8.1.
|
|
14
|
-
actionview (= 8.1.
|
|
15
|
-
activesupport (= 8.1.
|
|
13
|
+
actionpack (8.1.4.1)
|
|
14
|
+
actionview (= 8.1.4.1)
|
|
15
|
+
activesupport (= 8.1.4.1)
|
|
16
16
|
nokogiri (>= 1.8.5)
|
|
17
17
|
rack (>= 2.2.4)
|
|
18
18
|
rack-session (>= 1.0.1)
|
|
@@ -20,28 +20,28 @@ GEM
|
|
|
20
20
|
rails-dom-testing (~> 2.2)
|
|
21
21
|
rails-html-sanitizer (~> 1.6)
|
|
22
22
|
useragent (~> 0.16)
|
|
23
|
-
actionview (8.1.
|
|
24
|
-
activesupport (= 8.1.
|
|
23
|
+
actionview (8.1.4.1)
|
|
24
|
+
activesupport (= 8.1.4.1)
|
|
25
25
|
builder (~> 3.1)
|
|
26
26
|
erubi (~> 1.11)
|
|
27
27
|
rails-dom-testing (~> 2.2)
|
|
28
|
-
rails-html-sanitizer (~> 1.6)
|
|
29
|
-
activeadmin (4.0.0.
|
|
28
|
+
rails-html-sanitizer (~> 1.6, >= 1.7.2)
|
|
29
|
+
activeadmin (4.0.0.beta23)
|
|
30
30
|
arbre (~> 2.0)
|
|
31
31
|
csv
|
|
32
|
-
formtastic (>=
|
|
32
|
+
formtastic (>= 6.0)
|
|
33
33
|
formtastic_i18n (>= 0.7)
|
|
34
34
|
inherited_resources (~> 2.0)
|
|
35
35
|
kaminari (>= 1.2.1)
|
|
36
|
-
railties (>= 7.
|
|
36
|
+
railties (>= 7.2)
|
|
37
37
|
ransack (>= 4.0)
|
|
38
|
-
activemodel (8.1.
|
|
39
|
-
activesupport (= 8.1.
|
|
40
|
-
activerecord (8.1.
|
|
41
|
-
activemodel (= 8.1.
|
|
42
|
-
activesupport (= 8.1.
|
|
38
|
+
activemodel (8.1.4.1)
|
|
39
|
+
activesupport (= 8.1.4.1)
|
|
40
|
+
activerecord (8.1.4.1)
|
|
41
|
+
activemodel (= 8.1.4.1)
|
|
42
|
+
activesupport (= 8.1.4.1)
|
|
43
43
|
timeout (>= 0.4.0)
|
|
44
|
-
activesupport (8.1.
|
|
44
|
+
activesupport (8.1.4.1)
|
|
45
45
|
base64
|
|
46
46
|
bigdecimal
|
|
47
47
|
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
@@ -58,83 +58,88 @@ GEM
|
|
|
58
58
|
activesupport (>= 7.0)
|
|
59
59
|
ast (2.4.3)
|
|
60
60
|
base64 (0.3.0)
|
|
61
|
-
bigdecimal (4.
|
|
62
|
-
bp3-core (0.
|
|
61
|
+
bigdecimal (4.1.3)
|
|
62
|
+
bp3-core (0.7.0)
|
|
63
63
|
actionview (~> 8.1)
|
|
64
64
|
activesupport (~> 8.1)
|
|
65
65
|
bp3-request_state (~> 0.1)
|
|
66
|
-
bp3-request_state (0.1.
|
|
66
|
+
bp3-request_state (0.1.4)
|
|
67
67
|
actionpack (~> 8.1)
|
|
68
68
|
activesupport (~> 8.1)
|
|
69
|
+
ostruct (>= 0.6)
|
|
69
70
|
request_store (>= 1.5.1)
|
|
70
71
|
builder (3.3.0)
|
|
71
|
-
concurrent-ruby (1.3.
|
|
72
|
-
connection_pool (3.0.
|
|
73
|
-
crass (1.0.
|
|
74
|
-
csv (3.3.
|
|
75
|
-
date (3.5.1)
|
|
72
|
+
concurrent-ruby (1.3.8)
|
|
73
|
+
connection_pool (3.0.3)
|
|
74
|
+
crass (1.0.8)
|
|
75
|
+
csv (3.3.7)
|
|
76
76
|
diff-lcs (1.6.2)
|
|
77
77
|
drb (2.2.3)
|
|
78
|
-
erb (6.0.
|
|
78
|
+
erb (6.0.7)
|
|
79
79
|
erubi (1.13.1)
|
|
80
|
-
formtastic (
|
|
81
|
-
actionpack (>=
|
|
80
|
+
formtastic (6.0.0)
|
|
81
|
+
actionpack (>= 7.2.0)
|
|
82
82
|
formtastic_i18n (0.7.0)
|
|
83
83
|
has_scope (0.9.0)
|
|
84
84
|
actionpack (>= 7.0)
|
|
85
85
|
activesupport (>= 7.0)
|
|
86
|
-
i18n (1.
|
|
86
|
+
i18n (1.15.2)
|
|
87
87
|
concurrent-ruby (~> 1.0)
|
|
88
88
|
inherited_resources (2.1.0)
|
|
89
89
|
actionpack (>= 7.0)
|
|
90
90
|
has_scope (>= 0.6)
|
|
91
91
|
railties (>= 7.0)
|
|
92
92
|
responders (>= 2)
|
|
93
|
-
io-console (0.
|
|
94
|
-
irb (1.
|
|
93
|
+
io-console (0.9.5)
|
|
94
|
+
irb (1.19.0)
|
|
95
95
|
pp (>= 0.6.0)
|
|
96
|
+
prism (>= 1.3.0)
|
|
96
97
|
rdoc (>= 4.0.0)
|
|
97
98
|
reline (>= 0.4.2)
|
|
98
|
-
json (
|
|
99
|
-
kaminari (1.
|
|
99
|
+
json (3.1.0)
|
|
100
|
+
kaminari (1.3.3)
|
|
100
101
|
activesupport (>= 4.1.0)
|
|
101
|
-
kaminari-actionview (= 1.
|
|
102
|
-
kaminari-activerecord (= 1.
|
|
103
|
-
kaminari-core (= 1.
|
|
104
|
-
kaminari-actionview (1.
|
|
102
|
+
kaminari-actionview (= 1.3.3)
|
|
103
|
+
kaminari-activerecord (= 1.3.3)
|
|
104
|
+
kaminari-core (= 1.3.3)
|
|
105
|
+
kaminari-actionview (1.3.3)
|
|
105
106
|
actionview
|
|
106
|
-
kaminari-core (= 1.
|
|
107
|
-
kaminari-activerecord (1.
|
|
107
|
+
kaminari-core (= 1.3.3)
|
|
108
|
+
kaminari-activerecord (1.3.3)
|
|
108
109
|
activerecord
|
|
109
|
-
kaminari-core (= 1.
|
|
110
|
-
kaminari-core (1.
|
|
111
|
-
language_server-protocol (3.17.0.
|
|
110
|
+
kaminari-core (= 1.3.3)
|
|
111
|
+
kaminari-core (1.3.3)
|
|
112
|
+
language_server-protocol (3.17.0.6)
|
|
112
113
|
lint_roller (1.1.0)
|
|
113
114
|
logger (1.7.0)
|
|
114
|
-
loofah (2.25.
|
|
115
|
+
loofah (2.25.3)
|
|
115
116
|
crass (~> 1.0.2)
|
|
116
|
-
nokogiri (>= 1.
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
nokogiri (>= 1.19.5)
|
|
118
|
+
mini_portile2 (2.8.9)
|
|
119
|
+
minitest (6.1.0)
|
|
120
|
+
drb (~> 2.0)
|
|
121
|
+
prism (>= 1.5, < 3)
|
|
122
|
+
nokogiri (1.19.7)
|
|
123
|
+
mini_portile2 (~> 2.8.2)
|
|
124
|
+
racc (~> 1.4)
|
|
125
|
+
nokogiri (1.19.7-x86_64-darwin)
|
|
120
126
|
racc (~> 1.4)
|
|
121
|
-
|
|
122
|
-
|
|
127
|
+
ostruct (0.6.3)
|
|
128
|
+
parallel (2.3.0)
|
|
129
|
+
parser (3.3.14.0)
|
|
123
130
|
ast (~> 2.4.1)
|
|
124
131
|
racc
|
|
125
|
-
pp (0.6.
|
|
132
|
+
pp (0.6.4)
|
|
126
133
|
prettyprint
|
|
127
|
-
prettyprint (0.2.
|
|
128
|
-
prism (1.
|
|
129
|
-
|
|
130
|
-
date
|
|
131
|
-
stringio
|
|
134
|
+
prettyprint (0.2.1)
|
|
135
|
+
prism (2.1.0)
|
|
136
|
+
prism (2.1.0-x86_64-darwin)
|
|
132
137
|
racc (1.8.1)
|
|
133
|
-
rack (3.2.
|
|
134
|
-
rack-session (2.1.
|
|
138
|
+
rack (3.2.8)
|
|
139
|
+
rack-session (2.1.2)
|
|
135
140
|
base64 (>= 0.1.0)
|
|
136
141
|
rack (>= 3.0.0)
|
|
137
|
-
rack-test (2.
|
|
142
|
+
rack-test (2.3.0)
|
|
138
143
|
rack (>= 1.3)
|
|
139
144
|
rackup (2.3.1)
|
|
140
145
|
rack (>= 3)
|
|
@@ -142,12 +147,12 @@ GEM
|
|
|
142
147
|
activesupport (>= 5.0.0)
|
|
143
148
|
minitest
|
|
144
149
|
nokogiri (>= 1.6)
|
|
145
|
-
rails-html-sanitizer (1.
|
|
146
|
-
loofah (~> 2.
|
|
150
|
+
rails-html-sanitizer (1.7.2)
|
|
151
|
+
loofah (~> 2.25, >= 2.25.3)
|
|
147
152
|
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)
|
|
148
|
-
railties (8.1.
|
|
149
|
-
actionpack (= 8.1.
|
|
150
|
-
activesupport (= 8.1.
|
|
153
|
+
railties (8.1.4.1)
|
|
154
|
+
actionpack (= 8.1.4.1)
|
|
155
|
+
activesupport (= 8.1.4.1)
|
|
151
156
|
irb (~> 1.13)
|
|
152
157
|
rackup (>= 1.0.0)
|
|
153
158
|
rake (>= 12.2)
|
|
@@ -155,70 +160,77 @@ GEM
|
|
|
155
160
|
tsort (>= 0.2)
|
|
156
161
|
zeitwerk (~> 2.6)
|
|
157
162
|
rainbow (3.1.1)
|
|
158
|
-
rake (13.
|
|
159
|
-
ransack (
|
|
160
|
-
activerecord (>=
|
|
161
|
-
activesupport (>=
|
|
163
|
+
rake (13.4.2)
|
|
164
|
+
ransack (6.1.1)
|
|
165
|
+
activerecord (>= 8.1)
|
|
166
|
+
activesupport (>= 8.1)
|
|
162
167
|
i18n
|
|
163
|
-
|
|
168
|
+
rbs (4.2.0)
|
|
169
|
+
logger
|
|
170
|
+
prism (>= 1.6.0)
|
|
171
|
+
tsort
|
|
172
|
+
rdoc (8.1.0)
|
|
164
173
|
erb
|
|
165
|
-
|
|
174
|
+
prism (>= 1.6.0)
|
|
175
|
+
rbs (>= 4.0.0)
|
|
166
176
|
tsort
|
|
167
|
-
regexp_parser (2.
|
|
168
|
-
reline (0.
|
|
177
|
+
regexp_parser (2.13.4)
|
|
178
|
+
reline (0.7.0)
|
|
169
179
|
io-console (~> 0.5)
|
|
170
180
|
request_store (1.7.0)
|
|
171
181
|
rack (>= 1.4)
|
|
172
|
-
responders (3.2.
|
|
182
|
+
responders (3.2.1)
|
|
173
183
|
actionpack (>= 7.0)
|
|
174
184
|
railties (>= 7.0)
|
|
175
185
|
rspec (3.13.2)
|
|
176
186
|
rspec-core (~> 3.13.0)
|
|
177
187
|
rspec-expectations (~> 3.13.0)
|
|
178
188
|
rspec-mocks (~> 3.13.0)
|
|
179
|
-
rspec-core (3.13.
|
|
189
|
+
rspec-core (3.13.7)
|
|
180
190
|
rspec-support (~> 3.13.0)
|
|
181
|
-
rspec-expectations (3.13.
|
|
191
|
+
rspec-expectations (3.13.6)
|
|
182
192
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
183
193
|
rspec-support (~> 3.13.0)
|
|
184
|
-
rspec-mocks (3.13.
|
|
194
|
+
rspec-mocks (3.13.9)
|
|
185
195
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
186
196
|
rspec-support (~> 3.13.0)
|
|
187
|
-
rspec-support (3.13.
|
|
188
|
-
rubocop (1.
|
|
189
|
-
json (
|
|
197
|
+
rspec-support (3.13.8)
|
|
198
|
+
rubocop (1.92.3)
|
|
199
|
+
json (>= 2.3)
|
|
190
200
|
language_server-protocol (~> 3.17.0.2)
|
|
191
201
|
lint_roller (~> 1.1.0)
|
|
192
|
-
parallel (
|
|
202
|
+
parallel (>= 1.10)
|
|
193
203
|
parser (>= 3.3.0.2)
|
|
194
204
|
rainbow (>= 2.2.2, < 4.0)
|
|
195
|
-
regexp_parser (>= 2.
|
|
196
|
-
rubocop-ast (>= 1.
|
|
205
|
+
regexp_parser (>= 2.11.3, < 3.0)
|
|
206
|
+
rubocop-ast (>= 1.49.0, < 2.0)
|
|
197
207
|
ruby-progressbar (~> 1.7)
|
|
198
208
|
unicode-display_width (>= 2.4.0, < 4.0)
|
|
199
|
-
rubocop-ast (1.
|
|
209
|
+
rubocop-ast (1.53.0)
|
|
210
|
+
ast (~> 2.4)
|
|
200
211
|
parser (>= 3.3.7.2)
|
|
201
|
-
prism (
|
|
212
|
+
prism (>= 1.7)
|
|
213
|
+
racc
|
|
202
214
|
rubocop-rake (0.7.1)
|
|
203
215
|
lint_roller (~> 1.1)
|
|
204
216
|
rubocop (>= 1.72.1)
|
|
205
|
-
rubocop-rspec (3.
|
|
217
|
+
rubocop-rspec (3.10.2)
|
|
206
218
|
lint_roller (~> 1.1)
|
|
207
|
-
|
|
219
|
+
regexp_parser (>= 2.0)
|
|
220
|
+
rubocop (~> 1.86, >= 1.86.2)
|
|
208
221
|
ruby-progressbar (1.13.0)
|
|
209
222
|
securerandom (0.4.1)
|
|
210
|
-
stringio (3.2.0)
|
|
211
223
|
thor (1.5.0)
|
|
212
|
-
timeout (0.6.
|
|
224
|
+
timeout (0.6.1)
|
|
213
225
|
tsort (0.2.0)
|
|
214
226
|
tzinfo (2.0.6)
|
|
215
227
|
concurrent-ruby (~> 1.0)
|
|
216
|
-
unicode-display_width (3.
|
|
217
|
-
unicode-emoji (~> 4.
|
|
218
|
-
unicode-emoji (4.
|
|
219
|
-
uri (1.1.
|
|
228
|
+
unicode-display_width (3.3.0)
|
|
229
|
+
unicode-emoji (~> 4.3)
|
|
230
|
+
unicode-emoji (4.3.0)
|
|
231
|
+
uri (1.1.2)
|
|
220
232
|
useragent (0.16.11)
|
|
221
|
-
zeitwerk (2.
|
|
233
|
+
zeitwerk (2.8.3)
|
|
222
234
|
|
|
223
235
|
PLATFORMS
|
|
224
236
|
x86_64-darwin-22
|
|
@@ -234,4 +246,4 @@ DEPENDENCIES
|
|
|
234
246
|
rubocop-rspec (>= 2.25)
|
|
235
247
|
|
|
236
248
|
BUNDLED WITH
|
|
237
|
-
|
|
249
|
+
4.1.0
|
data/README.md
CHANGED
|
@@ -26,7 +26,7 @@ global state and the global state method that determines the `auth_object` used
|
|
|
26
26
|
|
|
27
27
|
```ruby
|
|
28
28
|
Bp3::Activeadmin.global_request_state_class_name = 'GlobalRequestState'
|
|
29
|
-
Bp3::Activeadmin.global_request_state_method = :
|
|
29
|
+
Bp3::Activeadmin.global_request_state_method = :current_login
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
## Development
|
data/bp3-activeadmin.gemspec
CHANGED
|
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
|
12
12
|
# spec.description = "TODO: Write a longer description or delete this line."
|
|
13
13
|
spec.homepage = 'https://www.black-phoebe.com'
|
|
14
14
|
spec.license = 'MIT'
|
|
15
|
-
spec.required_ruby_version = '>=
|
|
15
|
+
spec.required_ruby_version = '>= 4.0.10'
|
|
16
16
|
|
|
17
17
|
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
|
18
18
|
|
|
@@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
|
|
|
33
33
|
|
|
34
34
|
spec.add_dependency 'activeadmin', '>= 4.0.0.beta16'
|
|
35
35
|
spec.add_dependency 'activesupport', '~> 8.1'
|
|
36
|
-
spec.add_dependency 'bp3-core', '>= 0.
|
|
36
|
+
spec.add_dependency 'bp3-core', '>= 0.4.0'
|
|
37
37
|
spec.add_dependency 'bp3-request_state', '>= 0.1.0'
|
|
38
38
|
|
|
39
39
|
# spec.add_development_dependency 'bp3-core' # TODO: make this work
|
|
@@ -32,6 +32,20 @@ module Bp3
|
|
|
32
32
|
|
|
33
33
|
class Comment
|
|
34
34
|
include Bp3::Core::Ransackable
|
|
35
|
+
|
|
36
|
+
# ActiveAdmin defines these on the class itself, which beats anything included, so its
|
|
37
|
+
# answers stand only for plain ransack and Ransackable still answers EXPLORE
|
|
38
|
+
def self.ransackable_attributes(auth_object = nil)
|
|
39
|
+
return super if auth_object == Bp3::Core::Ransackable::EXPLORE
|
|
40
|
+
|
|
41
|
+
authorizable_ransackable_attributes
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def self.ransackable_associations(auth_object = nil)
|
|
45
|
+
return super if auth_object == Bp3::Core::Ransackable::EXPLORE
|
|
46
|
+
|
|
47
|
+
authorizable_ransackable_associations
|
|
48
|
+
end
|
|
35
49
|
end
|
|
36
50
|
end
|
|
37
51
|
end
|
data/lib/bp3/activeadmin.rb
CHANGED
|
@@ -10,7 +10,7 @@ module Bp3
|
|
|
10
10
|
mattr_accessor :global_request_state_class_name, :global_request_state_method
|
|
11
11
|
|
|
12
12
|
def self.global_request_state_class
|
|
13
|
-
|
|
13
|
+
global_request_state_class_name.constantize
|
|
14
14
|
end
|
|
15
15
|
end
|
|
16
16
|
end
|
metadata
CHANGED
|
@@ -1,185 +1,206 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bp3-activeadmin
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
|
-
- Wim den Braven
|
|
7
|
+
- Wim den Braven
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
|
-
- !ruby/object:Gem::Dependency
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
- !ruby/object:Gem::
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
- !ruby/object:Gem::
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
- !ruby/object:Gem::Dependency
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: activeadmin
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
-
|
|
17
|
+
- ">="
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: 4.0.0.beta16
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: true
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
-
|
|
25
|
+
- ">="
|
|
26
|
+
- !ruby/object:Gem::Version
|
|
27
|
+
version: 4.0.0.beta16
|
|
28
|
+
- !ruby/object:Gem::Dependency
|
|
29
|
+
name: activesupport
|
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
|
31
|
+
requirements:
|
|
32
|
+
-
|
|
33
|
+
- ~>
|
|
34
|
+
- !ruby/object:Gem::Version
|
|
35
|
+
version: "8.1"
|
|
36
|
+
type: :runtime
|
|
37
|
+
prerelease: false
|
|
38
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
39
|
+
requirements:
|
|
40
|
+
-
|
|
41
|
+
- ~>
|
|
42
|
+
- !ruby/object:Gem::Version
|
|
43
|
+
version: "8.1"
|
|
44
|
+
- !ruby/object:Gem::Dependency
|
|
45
|
+
name: bp3-core
|
|
46
|
+
requirement: !ruby/object:Gem::Requirement
|
|
47
|
+
requirements:
|
|
48
|
+
-
|
|
49
|
+
- ">="
|
|
50
|
+
- !ruby/object:Gem::Version
|
|
51
|
+
version: 0.4.0
|
|
52
|
+
type: :runtime
|
|
53
|
+
prerelease: false
|
|
54
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
55
|
+
requirements:
|
|
56
|
+
-
|
|
57
|
+
- ">="
|
|
58
|
+
- !ruby/object:Gem::Version
|
|
59
|
+
version: 0.4.0
|
|
60
|
+
- !ruby/object:Gem::Dependency
|
|
61
|
+
name: bp3-request_state
|
|
62
|
+
requirement: !ruby/object:Gem::Requirement
|
|
63
|
+
requirements:
|
|
64
|
+
-
|
|
65
|
+
- ">="
|
|
66
|
+
- !ruby/object:Gem::Version
|
|
67
|
+
version: 0.1.0
|
|
68
|
+
type: :runtime
|
|
69
|
+
prerelease: false
|
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
71
|
+
requirements:
|
|
72
|
+
-
|
|
73
|
+
- ">="
|
|
74
|
+
- !ruby/object:Gem::Version
|
|
75
|
+
version: 0.1.0
|
|
76
|
+
- !ruby/object:Gem::Dependency
|
|
77
|
+
name: rake
|
|
78
|
+
requirement: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
-
|
|
81
|
+
- ">="
|
|
82
|
+
- !ruby/object:Gem::Version
|
|
83
|
+
version: "13.0"
|
|
84
|
+
type: :development
|
|
85
|
+
prerelease: false
|
|
86
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
87
|
+
requirements:
|
|
88
|
+
-
|
|
89
|
+
- ">="
|
|
90
|
+
- !ruby/object:Gem::Version
|
|
91
|
+
version: "13.0"
|
|
92
|
+
- !ruby/object:Gem::Dependency
|
|
93
|
+
name: rspec
|
|
94
|
+
requirement: !ruby/object:Gem::Requirement
|
|
95
|
+
requirements:
|
|
96
|
+
-
|
|
97
|
+
- ">="
|
|
98
|
+
- !ruby/object:Gem::Version
|
|
99
|
+
version: "3.0"
|
|
100
|
+
type: :development
|
|
101
|
+
prerelease: false
|
|
102
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
103
|
+
requirements:
|
|
104
|
+
-
|
|
105
|
+
- ">="
|
|
106
|
+
- !ruby/object:Gem::Version
|
|
107
|
+
version: "3.0"
|
|
108
|
+
- !ruby/object:Gem::Dependency
|
|
109
|
+
name: rubocop
|
|
110
|
+
requirement: !ruby/object:Gem::Requirement
|
|
111
|
+
requirements:
|
|
112
|
+
-
|
|
113
|
+
- ">="
|
|
114
|
+
- !ruby/object:Gem::Version
|
|
115
|
+
version: "1.21"
|
|
116
|
+
type: :development
|
|
117
|
+
prerelease: false
|
|
118
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
119
|
+
requirements:
|
|
120
|
+
-
|
|
121
|
+
- ">="
|
|
122
|
+
- !ruby/object:Gem::Version
|
|
123
|
+
version: "1.21"
|
|
124
|
+
- !ruby/object:Gem::Dependency
|
|
125
|
+
name: rubocop-rake
|
|
126
|
+
requirement: !ruby/object:Gem::Requirement
|
|
127
|
+
requirements:
|
|
128
|
+
-
|
|
129
|
+
- ">="
|
|
130
|
+
- !ruby/object:Gem::Version
|
|
131
|
+
version: "0.6"
|
|
132
|
+
type: :development
|
|
133
|
+
prerelease: false
|
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
135
|
+
requirements:
|
|
136
|
+
-
|
|
137
|
+
- ">="
|
|
138
|
+
- !ruby/object:Gem::Version
|
|
139
|
+
version: "0.6"
|
|
140
|
+
- !ruby/object:Gem::Dependency
|
|
141
|
+
name: rubocop-rspec
|
|
142
|
+
requirement: !ruby/object:Gem::Requirement
|
|
143
|
+
requirements:
|
|
144
|
+
-
|
|
145
|
+
- ">="
|
|
146
|
+
- !ruby/object:Gem::Version
|
|
147
|
+
version: "2.25"
|
|
148
|
+
type: :development
|
|
149
|
+
prerelease: false
|
|
150
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
151
|
+
requirements:
|
|
152
|
+
-
|
|
153
|
+
- ">="
|
|
154
|
+
- !ruby/object:Gem::Version
|
|
155
|
+
version: "2.25"
|
|
138
156
|
email:
|
|
139
|
-
- wimdenbraven@persuavis.com
|
|
157
|
+
- wimdenbraven@persuavis.com
|
|
140
158
|
executables: []
|
|
141
159
|
extensions: []
|
|
142
160
|
extra_rdoc_files: []
|
|
143
161
|
files:
|
|
144
|
-
-
|
|
145
|
-
-
|
|
146
|
-
-
|
|
147
|
-
- CHANGELOG.md
|
|
148
|
-
-
|
|
149
|
-
- Gemfile
|
|
150
|
-
-
|
|
151
|
-
-
|
|
152
|
-
-
|
|
153
|
-
-
|
|
154
|
-
-
|
|
155
|
-
- lib/bp3
|
|
156
|
-
- lib/bp3/activeadmin
|
|
157
|
-
- lib/bp3/activeadmin/
|
|
158
|
-
-
|
|
159
|
-
|
|
162
|
+
- .rspec
|
|
163
|
+
- .rubocop.yml
|
|
164
|
+
- .yardopts
|
|
165
|
+
- CHANGELOG.md
|
|
166
|
+
- CLAUDE.md
|
|
167
|
+
- Gemfile
|
|
168
|
+
- Gemfile.lock
|
|
169
|
+
- LICENSE.txt
|
|
170
|
+
- README.md
|
|
171
|
+
- Rakefile
|
|
172
|
+
- bp3-activeadmin.gemspec
|
|
173
|
+
- lib/bp3-activeadmin.rb
|
|
174
|
+
- lib/bp3/activeadmin.rb
|
|
175
|
+
- lib/bp3/activeadmin/railtie.rb
|
|
176
|
+
- lib/bp3/activeadmin/version.rb
|
|
177
|
+
- sig/bp3/activeadmin.rbs
|
|
178
|
+
homepage: "https://www.black-phoebe.com"
|
|
160
179
|
licenses:
|
|
161
|
-
- MIT
|
|
180
|
+
- MIT
|
|
162
181
|
metadata:
|
|
163
|
-
allowed_push_host: https://rubygems.org
|
|
164
|
-
homepage_uri: https://www.black-phoebe.com
|
|
165
|
-
source_code_uri: https://github.com/persuavis/bp3-activeadmin
|
|
166
|
-
changelog_uri: https://github.com/persuavis/bp3-activeadmin/blob/main/CHANGELOG.md
|
|
167
|
-
rubygems_mfa_required:
|
|
182
|
+
allowed_push_host: "https://rubygems.org"
|
|
183
|
+
homepage_uri: "https://www.black-phoebe.com"
|
|
184
|
+
source_code_uri: "https://github.com/persuavis/bp3-activeadmin"
|
|
185
|
+
changelog_uri: "https://github.com/persuavis/bp3-activeadmin/blob/main/CHANGELOG.md"
|
|
186
|
+
rubygems_mfa_required: "true"
|
|
168
187
|
rdoc_options: []
|
|
169
188
|
require_paths:
|
|
170
|
-
- lib
|
|
189
|
+
- lib
|
|
171
190
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
172
191
|
requirements:
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
192
|
+
-
|
|
193
|
+
- ">="
|
|
194
|
+
- !ruby/object:Gem::Version
|
|
195
|
+
version: 4.0.10
|
|
176
196
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
177
197
|
requirements:
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
198
|
+
-
|
|
199
|
+
- ">="
|
|
200
|
+
- !ruby/object:Gem::Version
|
|
201
|
+
version: "0"
|
|
181
202
|
requirements: []
|
|
182
|
-
rubygems_version:
|
|
203
|
+
rubygems_version: 4.1.0
|
|
183
204
|
specification_version: 4
|
|
184
205
|
summary: bp3-activeadmin adapts activeadmin for BP3 (persuavis/black_phoebe_3).
|
|
185
206
|
test_files: []
|
|
File without changes
|