bp3-activeadmin 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 +7 -0
- data/.rspec +3 -0
- data/.rubocop.yml +51 -0
- data/.yardopts +8 -0
- data/CHANGELOG.md +9 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +223 -0
- data/LICENSE.txt +21 -0
- data/README.md +49 -0
- data/Rakefile +12 -0
- data/bp3-activeadmin.gemspec +49 -0
- data/lib/bp3/activeadmin/railtie.rb +40 -0
- data/lib/bp3/activeadmin/version.rb +7 -0
- data/lib/bp3/activeadmin.rb +16 -0
- data/lib/bp3-active_admin.rb +3 -0
- data/sig/bp3/activeadmin.rbs +6 -0
- metadata +207 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 8baee02476e04b3a1d1ef87ec553172119b33916d9380c14dcd4a72da8654814
|
|
4
|
+
data.tar.gz: 3b78564fc8e7ccb2403642a03eb9fe05df029291113811ecf1262b5b9a1d8697
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 728bd2c92e56bf183d2735196b6a3c2f42ca01ed2bdb295f1e54614ab2b334b4e2722d6c6759beead23979668072e04a33ef1ffb3a57ca18f9ff6e2508db627e
|
|
7
|
+
data.tar.gz: a07c5d1b6fc5bbebfc5c702d901d7c0796a6a243d6da0797a8a63b6652612370dbc48746c4ebbc7094af08f65c4f04be36a77b2658c2548bb20e6da8b4d4f57d
|
data/.rspec
ADDED
data/.rubocop.yml
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
require:
|
|
2
|
+
- rubocop-rake
|
|
3
|
+
- rubocop-rspec
|
|
4
|
+
- rubocop-capybara
|
|
5
|
+
- rubocop-factory_bot
|
|
6
|
+
|
|
7
|
+
AllCops:
|
|
8
|
+
TargetRubyVersion: 3.2.2
|
|
9
|
+
NewCops: enable
|
|
10
|
+
|
|
11
|
+
Gemspec/DevelopmentDependencies:
|
|
12
|
+
EnforcedStyle: gemspec
|
|
13
|
+
|
|
14
|
+
Lint/ConstantDefinitionInBlock:
|
|
15
|
+
Exclude:
|
|
16
|
+
- lib/bp3/**/railtie.rb
|
|
17
|
+
|
|
18
|
+
Lint/Void:
|
|
19
|
+
Exclude:
|
|
20
|
+
- lib/bp3/**/railtie.rb
|
|
21
|
+
|
|
22
|
+
Metrics/AbcSize:
|
|
23
|
+
Max: 26
|
|
24
|
+
|
|
25
|
+
Metrics/BlockLength:
|
|
26
|
+
Max: 66
|
|
27
|
+
|
|
28
|
+
Metrics/CyclomaticComplexity:
|
|
29
|
+
Max: 10
|
|
30
|
+
|
|
31
|
+
Metrics/MethodLength:
|
|
32
|
+
Max: 15
|
|
33
|
+
|
|
34
|
+
Metrics/ModuleLength:
|
|
35
|
+
Max: 150
|
|
36
|
+
|
|
37
|
+
Metrics/PerceivedComplexity:
|
|
38
|
+
Max: 10
|
|
39
|
+
|
|
40
|
+
Naming/FileName:
|
|
41
|
+
Exclude:
|
|
42
|
+
- lib/bp3-*.rb
|
|
43
|
+
|
|
44
|
+
RSpec/ExampleLength:
|
|
45
|
+
Max: 10
|
|
46
|
+
|
|
47
|
+
RSpec/MultipleExpectations:
|
|
48
|
+
Max: 4
|
|
49
|
+
|
|
50
|
+
Style/Documentation:
|
|
51
|
+
Enabled: false
|
data/.yardopts
ADDED
data/CHANGELOG.md
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
bp3-activeadmin (0.1.1)
|
|
5
|
+
activeadmin (~> 3.2)
|
|
6
|
+
activesupport (>= 7.1.2, < 8)
|
|
7
|
+
bp3-core (>= 0.1.0, < 2)
|
|
8
|
+
bp3-request_state (>= 0.1.0, < 2)
|
|
9
|
+
|
|
10
|
+
GEM
|
|
11
|
+
remote: https://rubygems.org/
|
|
12
|
+
specs:
|
|
13
|
+
actionpack (7.1.3)
|
|
14
|
+
actionview (= 7.1.3)
|
|
15
|
+
activesupport (= 7.1.3)
|
|
16
|
+
nokogiri (>= 1.8.5)
|
|
17
|
+
racc
|
|
18
|
+
rack (>= 2.2.4)
|
|
19
|
+
rack-session (>= 1.0.1)
|
|
20
|
+
rack-test (>= 0.6.3)
|
|
21
|
+
rails-dom-testing (~> 2.2)
|
|
22
|
+
rails-html-sanitizer (~> 1.6)
|
|
23
|
+
actionview (7.1.3)
|
|
24
|
+
activesupport (= 7.1.3)
|
|
25
|
+
builder (~> 3.1)
|
|
26
|
+
erubi (~> 1.11)
|
|
27
|
+
rails-dom-testing (~> 2.2)
|
|
28
|
+
rails-html-sanitizer (~> 1.6)
|
|
29
|
+
activeadmin (3.2.0)
|
|
30
|
+
arbre (~> 1.2, >= 1.2.1)
|
|
31
|
+
formtastic (>= 3.1)
|
|
32
|
+
formtastic_i18n (>= 0.4)
|
|
33
|
+
inherited_resources (~> 1.7)
|
|
34
|
+
jquery-rails (>= 4.2)
|
|
35
|
+
kaminari (>= 1.2.1)
|
|
36
|
+
railties (>= 6.1)
|
|
37
|
+
ransack (>= 4.0)
|
|
38
|
+
activemodel (7.1.3)
|
|
39
|
+
activesupport (= 7.1.3)
|
|
40
|
+
activerecord (7.1.3)
|
|
41
|
+
activemodel (= 7.1.3)
|
|
42
|
+
activesupport (= 7.1.3)
|
|
43
|
+
timeout (>= 0.4.0)
|
|
44
|
+
activesupport (7.1.3)
|
|
45
|
+
base64
|
|
46
|
+
bigdecimal
|
|
47
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
48
|
+
connection_pool (>= 2.2.5)
|
|
49
|
+
drb
|
|
50
|
+
i18n (>= 1.6, < 2)
|
|
51
|
+
minitest (>= 5.1)
|
|
52
|
+
mutex_m
|
|
53
|
+
tzinfo (~> 2.0)
|
|
54
|
+
arbre (1.7.0)
|
|
55
|
+
activesupport (>= 3.0.0)
|
|
56
|
+
ruby2_keywords (>= 0.0.2)
|
|
57
|
+
ast (2.4.2)
|
|
58
|
+
base64 (0.2.0)
|
|
59
|
+
bigdecimal (3.1.6)
|
|
60
|
+
bp3-core (0.1.2)
|
|
61
|
+
actionview (>= 7.1.2, < 8)
|
|
62
|
+
activesupport (>= 7.1.2, < 8)
|
|
63
|
+
bp3-request_state (0.1.1)
|
|
64
|
+
actionpack (>= 7.1.2, < 8)
|
|
65
|
+
activesupport (>= 7.1.2, < 8)
|
|
66
|
+
request_store (>= 1.5.1, < 2)
|
|
67
|
+
builder (3.2.4)
|
|
68
|
+
concurrent-ruby (1.2.3)
|
|
69
|
+
connection_pool (2.4.1)
|
|
70
|
+
crass (1.0.6)
|
|
71
|
+
diff-lcs (1.5.0)
|
|
72
|
+
drb (2.2.0)
|
|
73
|
+
ruby2_keywords
|
|
74
|
+
erubi (1.12.0)
|
|
75
|
+
formtastic (5.0.0)
|
|
76
|
+
actionpack (>= 6.0.0)
|
|
77
|
+
formtastic_i18n (0.7.0)
|
|
78
|
+
has_scope (0.8.2)
|
|
79
|
+
actionpack (>= 5.2)
|
|
80
|
+
activesupport (>= 5.2)
|
|
81
|
+
i18n (1.14.1)
|
|
82
|
+
concurrent-ruby (~> 1.0)
|
|
83
|
+
inherited_resources (1.14.0)
|
|
84
|
+
actionpack (>= 6.0)
|
|
85
|
+
has_scope (>= 0.6)
|
|
86
|
+
railties (>= 6.0)
|
|
87
|
+
responders (>= 2)
|
|
88
|
+
io-console (0.7.2)
|
|
89
|
+
irb (1.11.1)
|
|
90
|
+
rdoc
|
|
91
|
+
reline (>= 0.4.2)
|
|
92
|
+
jquery-rails (4.6.0)
|
|
93
|
+
rails-dom-testing (>= 1, < 3)
|
|
94
|
+
railties (>= 4.2.0)
|
|
95
|
+
thor (>= 0.14, < 2.0)
|
|
96
|
+
json (2.7.1)
|
|
97
|
+
kaminari (1.2.2)
|
|
98
|
+
activesupport (>= 4.1.0)
|
|
99
|
+
kaminari-actionview (= 1.2.2)
|
|
100
|
+
kaminari-activerecord (= 1.2.2)
|
|
101
|
+
kaminari-core (= 1.2.2)
|
|
102
|
+
kaminari-actionview (1.2.2)
|
|
103
|
+
actionview
|
|
104
|
+
kaminari-core (= 1.2.2)
|
|
105
|
+
kaminari-activerecord (1.2.2)
|
|
106
|
+
activerecord
|
|
107
|
+
kaminari-core (= 1.2.2)
|
|
108
|
+
kaminari-core (1.2.2)
|
|
109
|
+
language_server-protocol (3.17.0.3)
|
|
110
|
+
loofah (2.22.0)
|
|
111
|
+
crass (~> 1.0.2)
|
|
112
|
+
nokogiri (>= 1.12.0)
|
|
113
|
+
minitest (5.21.2)
|
|
114
|
+
mutex_m (0.2.0)
|
|
115
|
+
nokogiri (1.16.0-x86_64-darwin)
|
|
116
|
+
racc (~> 1.4)
|
|
117
|
+
parallel (1.24.0)
|
|
118
|
+
parser (3.3.0.4)
|
|
119
|
+
ast (~> 2.4.1)
|
|
120
|
+
racc
|
|
121
|
+
psych (5.1.2)
|
|
122
|
+
stringio
|
|
123
|
+
racc (1.7.3)
|
|
124
|
+
rack (3.0.8)
|
|
125
|
+
rack-session (2.0.0)
|
|
126
|
+
rack (>= 3.0.0)
|
|
127
|
+
rack-test (2.1.0)
|
|
128
|
+
rack (>= 1.3)
|
|
129
|
+
rackup (2.1.0)
|
|
130
|
+
rack (>= 3)
|
|
131
|
+
webrick (~> 1.8)
|
|
132
|
+
rails-dom-testing (2.2.0)
|
|
133
|
+
activesupport (>= 5.0.0)
|
|
134
|
+
minitest
|
|
135
|
+
nokogiri (>= 1.6)
|
|
136
|
+
rails-html-sanitizer (1.6.0)
|
|
137
|
+
loofah (~> 2.21)
|
|
138
|
+
nokogiri (~> 1.14)
|
|
139
|
+
railties (7.1.3)
|
|
140
|
+
actionpack (= 7.1.3)
|
|
141
|
+
activesupport (= 7.1.3)
|
|
142
|
+
irb
|
|
143
|
+
rackup (>= 1.0.0)
|
|
144
|
+
rake (>= 12.2)
|
|
145
|
+
thor (~> 1.0, >= 1.2.2)
|
|
146
|
+
zeitwerk (~> 2.6)
|
|
147
|
+
rainbow (3.1.1)
|
|
148
|
+
rake (13.1.0)
|
|
149
|
+
ransack (4.1.1)
|
|
150
|
+
activerecord (>= 6.1.5)
|
|
151
|
+
activesupport (>= 6.1.5)
|
|
152
|
+
i18n
|
|
153
|
+
rdoc (6.6.2)
|
|
154
|
+
psych (>= 4.0.0)
|
|
155
|
+
regexp_parser (2.9.0)
|
|
156
|
+
reline (0.4.2)
|
|
157
|
+
io-console (~> 0.5)
|
|
158
|
+
request_store (1.7.0)
|
|
159
|
+
rack (>= 1.4)
|
|
160
|
+
responders (3.1.1)
|
|
161
|
+
actionpack (>= 5.2)
|
|
162
|
+
railties (>= 5.2)
|
|
163
|
+
rexml (3.2.6)
|
|
164
|
+
rspec (3.12.0)
|
|
165
|
+
rspec-core (~> 3.12.0)
|
|
166
|
+
rspec-expectations (~> 3.12.0)
|
|
167
|
+
rspec-mocks (~> 3.12.0)
|
|
168
|
+
rspec-core (3.12.2)
|
|
169
|
+
rspec-support (~> 3.12.0)
|
|
170
|
+
rspec-expectations (3.12.3)
|
|
171
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
172
|
+
rspec-support (~> 3.12.0)
|
|
173
|
+
rspec-mocks (3.12.6)
|
|
174
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
175
|
+
rspec-support (~> 3.12.0)
|
|
176
|
+
rspec-support (3.12.1)
|
|
177
|
+
rubocop (1.60.1)
|
|
178
|
+
json (~> 2.3)
|
|
179
|
+
language_server-protocol (>= 3.17.0)
|
|
180
|
+
parallel (~> 1.10)
|
|
181
|
+
parser (>= 3.3.0.2)
|
|
182
|
+
rainbow (>= 2.2.2, < 4.0)
|
|
183
|
+
regexp_parser (>= 1.8, < 3.0)
|
|
184
|
+
rexml (>= 3.2.5, < 4.0)
|
|
185
|
+
rubocop-ast (>= 1.30.0, < 2.0)
|
|
186
|
+
ruby-progressbar (~> 1.7)
|
|
187
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
|
188
|
+
rubocop-ast (1.30.0)
|
|
189
|
+
parser (>= 3.2.1.0)
|
|
190
|
+
rubocop-capybara (2.20.0)
|
|
191
|
+
rubocop (~> 1.41)
|
|
192
|
+
rubocop-factory_bot (2.25.1)
|
|
193
|
+
rubocop (~> 1.41)
|
|
194
|
+
rubocop-rake (0.6.0)
|
|
195
|
+
rubocop (~> 1.0)
|
|
196
|
+
rubocop-rspec (2.26.1)
|
|
197
|
+
rubocop (~> 1.40)
|
|
198
|
+
rubocop-capybara (~> 2.17)
|
|
199
|
+
rubocop-factory_bot (~> 2.22)
|
|
200
|
+
ruby-progressbar (1.13.0)
|
|
201
|
+
ruby2_keywords (0.0.5)
|
|
202
|
+
stringio (3.1.0)
|
|
203
|
+
thor (1.3.0)
|
|
204
|
+
timeout (0.4.1)
|
|
205
|
+
tzinfo (2.0.6)
|
|
206
|
+
concurrent-ruby (~> 1.0)
|
|
207
|
+
unicode-display_width (2.5.0)
|
|
208
|
+
webrick (1.8.1)
|
|
209
|
+
zeitwerk (2.6.12)
|
|
210
|
+
|
|
211
|
+
PLATFORMS
|
|
212
|
+
x86_64-darwin-22
|
|
213
|
+
|
|
214
|
+
DEPENDENCIES
|
|
215
|
+
bp3-activeadmin!
|
|
216
|
+
rake (~> 13.0)
|
|
217
|
+
rspec (~> 3.0)
|
|
218
|
+
rubocop (~> 1.21)
|
|
219
|
+
rubocop-rake (~> 0.6)
|
|
220
|
+
rubocop-rspec (~> 2.25)
|
|
221
|
+
|
|
222
|
+
BUNDLED WITH
|
|
223
|
+
2.5.11
|
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Wim den Braven
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Bp3::Activeadmin
|
|
2
|
+
|
|
3
|
+
bp3-activeadmin adapts activeadmin for BP3, the persuavis/black_phoebe_3
|
|
4
|
+
multi-site multi-tenant rails application.
|
|
5
|
+
|
|
6
|
+
## Installation
|
|
7
|
+
|
|
8
|
+
Add this line to your application's Gemfile:
|
|
9
|
+
|
|
10
|
+
```ruby
|
|
11
|
+
gem 'bp3-activeadmin'
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
And then execute:
|
|
15
|
+
|
|
16
|
+
$ bundle install
|
|
17
|
+
|
|
18
|
+
Or install it yourself as:
|
|
19
|
+
|
|
20
|
+
$ gem install bp3-activeadmin
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
In your application's `config/initializers/bp3-activeadmin` initializer, specify the name of the class representing the
|
|
25
|
+
global state and the global state method that determines the `auth_object` used to determine ransackable fields:
|
|
26
|
+
|
|
27
|
+
```ruby
|
|
28
|
+
Bp3::Activeadmin.global_request_state_class_name = 'GlobalRequestState'
|
|
29
|
+
Bp3::Activeadmin.global_request_state_method = :highest_privilege
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Development
|
|
33
|
+
|
|
34
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can
|
|
35
|
+
also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
36
|
+
|
|
37
|
+
To install this gem onto your local machine, run `rake install`. To release a new version, update the
|
|
38
|
+
version number in `version.rb`, and then run `rake release`, which will create a git tag for the version, push git
|
|
39
|
+
commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
40
|
+
|
|
41
|
+
## Testing
|
|
42
|
+
Run `rake` to run rspec tests and rubocop linting.
|
|
43
|
+
|
|
44
|
+
## Documentation
|
|
45
|
+
A `.yardopts` file is provided to support yard documentation.
|
|
46
|
+
|
|
47
|
+
## License
|
|
48
|
+
|
|
49
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative 'lib/bp3/activeadmin/version'
|
|
4
|
+
|
|
5
|
+
Gem::Specification.new do |spec|
|
|
6
|
+
spec.name = 'bp3-activeadmin'
|
|
7
|
+
spec.version = Bp3::Activeadmin::VERSION
|
|
8
|
+
spec.authors = ['Wim den Braven']
|
|
9
|
+
spec.email = ['wimdenbraven@persuavis.com']
|
|
10
|
+
|
|
11
|
+
spec.summary = 'bp3-active_admin.'
|
|
12
|
+
# spec.description = "TODO: Write a longer description or delete this line."
|
|
13
|
+
spec.homepage = 'https://www.black-phoebe.com'
|
|
14
|
+
spec.license = 'MIT'
|
|
15
|
+
spec.required_ruby_version = '>= 3.2.0'
|
|
16
|
+
|
|
17
|
+
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
|
18
|
+
|
|
19
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
|
20
|
+
spec.metadata['source_code_uri'] = 'https://github.com/persuavis/bp3-activeadmin'
|
|
21
|
+
spec.metadata['changelog_uri'] = 'https://github.com/persuavis/bp3-activeadmin/blob/main/CHANGELOG.md'
|
|
22
|
+
|
|
23
|
+
# Specify which files should be added to the gem when it is released.
|
|
24
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
25
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
|
26
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
|
27
|
+
(f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
spec.bindir = 'exe'
|
|
31
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
|
32
|
+
spec.require_paths = ['lib']
|
|
33
|
+
|
|
34
|
+
spec.add_dependency 'activeadmin', '~> 3.2'
|
|
35
|
+
spec.add_dependency 'activesupport', ['>= 7.1.2', '< 8']
|
|
36
|
+
spec.add_dependency 'bp3-core', ['>= 0.1.0', '< 2']
|
|
37
|
+
spec.add_dependency 'bp3-request_state', ['>= 0.1.0', '< 2']
|
|
38
|
+
|
|
39
|
+
# spec.add_development_dependency 'bp3-core' # TODO: make this work
|
|
40
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
|
41
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
|
42
|
+
spec.add_development_dependency 'rubocop', '~> 1.21'
|
|
43
|
+
spec.add_development_dependency 'rubocop-rake', '~> 0.6'
|
|
44
|
+
spec.add_development_dependency 'rubocop-rspec', '~> 2.25'
|
|
45
|
+
|
|
46
|
+
# For more information and examples about making a new gem, check out our
|
|
47
|
+
# guide at: https://bundler.io/guides/creating_gem.html
|
|
48
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
|
49
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'rails/railtie'
|
|
4
|
+
|
|
5
|
+
module Bp3
|
|
6
|
+
module Activeadmin
|
|
7
|
+
class Railtie < Rails::Railtie
|
|
8
|
+
initializer 'bp3.activeadmin.railtie.register' do |app|
|
|
9
|
+
app.config.after_initialize do
|
|
10
|
+
::ActiveAdmin::Filters # preload
|
|
11
|
+
::ActiveAdmin::Comment # preload
|
|
12
|
+
module ::ActiveAdmin
|
|
13
|
+
module Filters
|
|
14
|
+
# PrependResourceExtension ensures that the default_filters honor the ransackable attributes
|
|
15
|
+
module PrependResourceExtension
|
|
16
|
+
def default_filters
|
|
17
|
+
filters = super
|
|
18
|
+
allowed = resource_class.ransackable_fields(auth_object)
|
|
19
|
+
filters & allowed
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def auth_object
|
|
23
|
+
Bp3::Activeadmin.global_request_state_class.send(Bp3::Activeadmin.global_request_state_method)
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
module ResourceExtension
|
|
28
|
+
prepend PrependResourceExtension
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
class Comment
|
|
33
|
+
include Bp3::Core::Ransackable
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'active_support/core_ext/module/attribute_accessors'
|
|
4
|
+
|
|
5
|
+
require_relative 'activeadmin/railtie'
|
|
6
|
+
require_relative 'activeadmin/version'
|
|
7
|
+
|
|
8
|
+
module Bp3
|
|
9
|
+
module Activeadmin
|
|
10
|
+
mattr_accessor :global_request_state_class_name, :global_request_state_method
|
|
11
|
+
|
|
12
|
+
def self.global_request_state_class
|
|
13
|
+
@@global_request_state_class ||= global_request_state_class_name.constantize # rubocop:disable Style/ClassVars
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: bp3-activeadmin
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.1
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Wim den Braven
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: exe
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2024-05-31 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: activeadmin
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - "~>"
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '3.2'
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - "~>"
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '3.2'
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: activesupport
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - ">="
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: 7.1.2
|
|
34
|
+
- - "<"
|
|
35
|
+
- !ruby/object:Gem::Version
|
|
36
|
+
version: '8'
|
|
37
|
+
type: :runtime
|
|
38
|
+
prerelease: false
|
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
40
|
+
requirements:
|
|
41
|
+
- - ">="
|
|
42
|
+
- !ruby/object:Gem::Version
|
|
43
|
+
version: 7.1.2
|
|
44
|
+
- - "<"
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: '8'
|
|
47
|
+
- !ruby/object:Gem::Dependency
|
|
48
|
+
name: bp3-core
|
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
|
50
|
+
requirements:
|
|
51
|
+
- - ">="
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: 0.1.0
|
|
54
|
+
- - "<"
|
|
55
|
+
- !ruby/object:Gem::Version
|
|
56
|
+
version: '2'
|
|
57
|
+
type: :runtime
|
|
58
|
+
prerelease: false
|
|
59
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
60
|
+
requirements:
|
|
61
|
+
- - ">="
|
|
62
|
+
- !ruby/object:Gem::Version
|
|
63
|
+
version: 0.1.0
|
|
64
|
+
- - "<"
|
|
65
|
+
- !ruby/object:Gem::Version
|
|
66
|
+
version: '2'
|
|
67
|
+
- !ruby/object:Gem::Dependency
|
|
68
|
+
name: bp3-request_state
|
|
69
|
+
requirement: !ruby/object:Gem::Requirement
|
|
70
|
+
requirements:
|
|
71
|
+
- - ">="
|
|
72
|
+
- !ruby/object:Gem::Version
|
|
73
|
+
version: 0.1.0
|
|
74
|
+
- - "<"
|
|
75
|
+
- !ruby/object:Gem::Version
|
|
76
|
+
version: '2'
|
|
77
|
+
type: :runtime
|
|
78
|
+
prerelease: false
|
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
80
|
+
requirements:
|
|
81
|
+
- - ">="
|
|
82
|
+
- !ruby/object:Gem::Version
|
|
83
|
+
version: 0.1.0
|
|
84
|
+
- - "<"
|
|
85
|
+
- !ruby/object:Gem::Version
|
|
86
|
+
version: '2'
|
|
87
|
+
- !ruby/object:Gem::Dependency
|
|
88
|
+
name: rake
|
|
89
|
+
requirement: !ruby/object:Gem::Requirement
|
|
90
|
+
requirements:
|
|
91
|
+
- - "~>"
|
|
92
|
+
- !ruby/object:Gem::Version
|
|
93
|
+
version: '13.0'
|
|
94
|
+
type: :development
|
|
95
|
+
prerelease: false
|
|
96
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
97
|
+
requirements:
|
|
98
|
+
- - "~>"
|
|
99
|
+
- !ruby/object:Gem::Version
|
|
100
|
+
version: '13.0'
|
|
101
|
+
- !ruby/object:Gem::Dependency
|
|
102
|
+
name: rspec
|
|
103
|
+
requirement: !ruby/object:Gem::Requirement
|
|
104
|
+
requirements:
|
|
105
|
+
- - "~>"
|
|
106
|
+
- !ruby/object:Gem::Version
|
|
107
|
+
version: '3.0'
|
|
108
|
+
type: :development
|
|
109
|
+
prerelease: false
|
|
110
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
111
|
+
requirements:
|
|
112
|
+
- - "~>"
|
|
113
|
+
- !ruby/object:Gem::Version
|
|
114
|
+
version: '3.0'
|
|
115
|
+
- !ruby/object:Gem::Dependency
|
|
116
|
+
name: rubocop
|
|
117
|
+
requirement: !ruby/object:Gem::Requirement
|
|
118
|
+
requirements:
|
|
119
|
+
- - "~>"
|
|
120
|
+
- !ruby/object:Gem::Version
|
|
121
|
+
version: '1.21'
|
|
122
|
+
type: :development
|
|
123
|
+
prerelease: false
|
|
124
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
125
|
+
requirements:
|
|
126
|
+
- - "~>"
|
|
127
|
+
- !ruby/object:Gem::Version
|
|
128
|
+
version: '1.21'
|
|
129
|
+
- !ruby/object:Gem::Dependency
|
|
130
|
+
name: rubocop-rake
|
|
131
|
+
requirement: !ruby/object:Gem::Requirement
|
|
132
|
+
requirements:
|
|
133
|
+
- - "~>"
|
|
134
|
+
- !ruby/object:Gem::Version
|
|
135
|
+
version: '0.6'
|
|
136
|
+
type: :development
|
|
137
|
+
prerelease: false
|
|
138
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
139
|
+
requirements:
|
|
140
|
+
- - "~>"
|
|
141
|
+
- !ruby/object:Gem::Version
|
|
142
|
+
version: '0.6'
|
|
143
|
+
- !ruby/object:Gem::Dependency
|
|
144
|
+
name: rubocop-rspec
|
|
145
|
+
requirement: !ruby/object:Gem::Requirement
|
|
146
|
+
requirements:
|
|
147
|
+
- - "~>"
|
|
148
|
+
- !ruby/object:Gem::Version
|
|
149
|
+
version: '2.25'
|
|
150
|
+
type: :development
|
|
151
|
+
prerelease: false
|
|
152
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
153
|
+
requirements:
|
|
154
|
+
- - "~>"
|
|
155
|
+
- !ruby/object:Gem::Version
|
|
156
|
+
version: '2.25'
|
|
157
|
+
description:
|
|
158
|
+
email:
|
|
159
|
+
- wimdenbraven@persuavis.com
|
|
160
|
+
executables: []
|
|
161
|
+
extensions: []
|
|
162
|
+
extra_rdoc_files: []
|
|
163
|
+
files:
|
|
164
|
+
- ".rspec"
|
|
165
|
+
- ".rubocop.yml"
|
|
166
|
+
- ".yardopts"
|
|
167
|
+
- CHANGELOG.md
|
|
168
|
+
- Gemfile
|
|
169
|
+
- Gemfile.lock
|
|
170
|
+
- LICENSE.txt
|
|
171
|
+
- README.md
|
|
172
|
+
- Rakefile
|
|
173
|
+
- bp3-activeadmin.gemspec
|
|
174
|
+
- lib/bp3-active_admin.rb
|
|
175
|
+
- lib/bp3/activeadmin.rb
|
|
176
|
+
- lib/bp3/activeadmin/railtie.rb
|
|
177
|
+
- lib/bp3/activeadmin/version.rb
|
|
178
|
+
- sig/bp3/activeadmin.rbs
|
|
179
|
+
homepage: https://www.black-phoebe.com
|
|
180
|
+
licenses:
|
|
181
|
+
- MIT
|
|
182
|
+
metadata:
|
|
183
|
+
allowed_push_host: https://rubygems.org
|
|
184
|
+
homepage_uri: https://www.black-phoebe.com
|
|
185
|
+
source_code_uri: https://github.com/persuavis/bp3-activeadmin
|
|
186
|
+
changelog_uri: https://github.com/persuavis/bp3-activeadmin/blob/main/CHANGELOG.md
|
|
187
|
+
rubygems_mfa_required: 'true'
|
|
188
|
+
post_install_message:
|
|
189
|
+
rdoc_options: []
|
|
190
|
+
require_paths:
|
|
191
|
+
- lib
|
|
192
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
193
|
+
requirements:
|
|
194
|
+
- - ">="
|
|
195
|
+
- !ruby/object:Gem::Version
|
|
196
|
+
version: 3.2.0
|
|
197
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
198
|
+
requirements:
|
|
199
|
+
- - ">="
|
|
200
|
+
- !ruby/object:Gem::Version
|
|
201
|
+
version: '0'
|
|
202
|
+
requirements: []
|
|
203
|
+
rubygems_version: 3.5.11
|
|
204
|
+
signing_key:
|
|
205
|
+
specification_version: 4
|
|
206
|
+
summary: bp3-active_admin.
|
|
207
|
+
test_files: []
|