active_manageable 0.1.2 → 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/.github/workflows/ci.yml +23 -11
- data/.gitignore +1 -1
- data/.rubocop.yml +12 -19
- data/Appraisals +19 -10
- data/CHANGELOG.md +18 -0
- data/Gemfile.lock +179 -108
- data/README.md +81 -11
- data/active_manageable.gemspec +7 -7
- data/gemfiles/rails_7_0.gemfile +9 -2
- data/gemfiles/{rails_6_1.gemfile → rails_7_1.gemfile} +2 -2
- data/gemfiles/{rails_6_0.gemfile → rails_7_2.gemfile} +2 -2
- data/lib/active_manageable/authorization/cancancan.rb +10 -12
- data/lib/active_manageable/authorization/pundit.rb +10 -12
- data/lib/active_manageable/base.rb +16 -5
- data/lib/active_manageable/configuration.rb +16 -7
- data/lib/active_manageable/methods/auxiliary/includes.rb +28 -30
- data/lib/active_manageable/methods/auxiliary/model_attributes.rb +15 -17
- data/lib/active_manageable/methods/auxiliary/order.rb +12 -14
- data/lib/active_manageable/methods/auxiliary/scopes.rb +35 -28
- data/lib/active_manageable/methods/auxiliary/select.rb +11 -13
- data/lib/active_manageable/methods/auxiliary/unique_search.rb +19 -19
- data/lib/active_manageable/methods/create.rb +20 -5
- data/lib/active_manageable/methods/destroy.rb +22 -7
- data/lib/active_manageable/methods/edit.rb +17 -9
- data/lib/active_manageable/methods/index.rb +28 -26
- data/lib/active_manageable/methods/new.rb +14 -6
- data/lib/active_manageable/methods/show.rb +17 -9
- data/lib/active_manageable/methods/update.rb +28 -7
- data/lib/active_manageable/pagination/kaminari.rb +29 -9
- data/lib/active_manageable/search/ransack.rb +15 -17
- data/lib/active_manageable/version.rb +1 -1
- metadata +36 -28
- data/.rubocop_rails.yml +0 -201
- data/.rubocop_rspec.yml +0 -68
- data/.standard.yml +0 -5
metadata
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: active_manageable
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chris Hilton
|
|
8
8
|
- Chris Branson
|
|
9
|
-
autorequire:
|
|
10
9
|
bindir: exe
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date:
|
|
11
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
|
15
14
|
name: activerecord
|
|
@@ -17,28 +16,28 @@ dependencies:
|
|
|
17
16
|
requirements:
|
|
18
17
|
- - ">="
|
|
19
18
|
- !ruby/object:Gem::Version
|
|
20
|
-
version: '
|
|
19
|
+
version: '7.0'
|
|
21
20
|
type: :runtime
|
|
22
21
|
prerelease: false
|
|
23
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
24
23
|
requirements:
|
|
25
24
|
- - ">="
|
|
26
25
|
- !ruby/object:Gem::Version
|
|
27
|
-
version: '
|
|
26
|
+
version: '7.0'
|
|
28
27
|
- !ruby/object:Gem::Dependency
|
|
29
28
|
name: activesupport
|
|
30
29
|
requirement: !ruby/object:Gem::Requirement
|
|
31
30
|
requirements:
|
|
32
31
|
- - ">="
|
|
33
32
|
- !ruby/object:Gem::Version
|
|
34
|
-
version: '
|
|
33
|
+
version: '7.0'
|
|
35
34
|
type: :runtime
|
|
36
35
|
prerelease: false
|
|
37
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
38
37
|
requirements:
|
|
39
38
|
- - ">="
|
|
40
39
|
- !ruby/object:Gem::Version
|
|
41
|
-
version: '
|
|
40
|
+
version: '7.0'
|
|
42
41
|
- !ruby/object:Gem::Dependency
|
|
43
42
|
name: rails-i18n
|
|
44
43
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -71,16 +70,16 @@ dependencies:
|
|
|
71
70
|
name: rake
|
|
72
71
|
requirement: !ruby/object:Gem::Requirement
|
|
73
72
|
requirements:
|
|
74
|
-
- - "
|
|
73
|
+
- - ">="
|
|
75
74
|
- !ruby/object:Gem::Version
|
|
76
|
-
version: '
|
|
75
|
+
version: '0'
|
|
77
76
|
type: :development
|
|
78
77
|
prerelease: false
|
|
79
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
80
79
|
requirements:
|
|
81
|
-
- - "
|
|
80
|
+
- - ">="
|
|
82
81
|
- !ruby/object:Gem::Version
|
|
83
|
-
version: '
|
|
82
|
+
version: '0'
|
|
84
83
|
- !ruby/object:Gem::Dependency
|
|
85
84
|
name: appraisal
|
|
86
85
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -99,16 +98,16 @@ dependencies:
|
|
|
99
98
|
name: sqlite3
|
|
100
99
|
requirement: !ruby/object:Gem::Requirement
|
|
101
100
|
requirements:
|
|
102
|
-
- - "
|
|
101
|
+
- - ">="
|
|
103
102
|
- !ruby/object:Gem::Version
|
|
104
|
-
version:
|
|
103
|
+
version: '0'
|
|
105
104
|
type: :development
|
|
106
105
|
prerelease: false
|
|
107
106
|
version_requirements: !ruby/object:Gem::Requirement
|
|
108
107
|
requirements:
|
|
109
|
-
- - "
|
|
108
|
+
- - ">="
|
|
110
109
|
- !ruby/object:Gem::Version
|
|
111
|
-
version:
|
|
110
|
+
version: '0'
|
|
112
111
|
- !ruby/object:Gem::Dependency
|
|
113
112
|
name: rspec-rails
|
|
114
113
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -239,16 +238,16 @@ dependencies:
|
|
|
239
238
|
name: rubocop
|
|
240
239
|
requirement: !ruby/object:Gem::Requirement
|
|
241
240
|
requirements:
|
|
242
|
-
- -
|
|
241
|
+
- - ">="
|
|
243
242
|
- !ruby/object:Gem::Version
|
|
244
|
-
version:
|
|
243
|
+
version: '0'
|
|
245
244
|
type: :development
|
|
246
245
|
prerelease: false
|
|
247
246
|
version_requirements: !ruby/object:Gem::Requirement
|
|
248
247
|
requirements:
|
|
249
|
-
- -
|
|
248
|
+
- - ">="
|
|
250
249
|
- !ruby/object:Gem::Version
|
|
251
|
-
version:
|
|
250
|
+
version: '0'
|
|
252
251
|
- !ruby/object:Gem::Dependency
|
|
253
252
|
name: standard
|
|
254
253
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -263,6 +262,20 @@ dependencies:
|
|
|
263
262
|
- - ">="
|
|
264
263
|
- !ruby/object:Gem::Version
|
|
265
264
|
version: '0'
|
|
265
|
+
- !ruby/object:Gem::Dependency
|
|
266
|
+
name: standard-rails
|
|
267
|
+
requirement: !ruby/object:Gem::Requirement
|
|
268
|
+
requirements:
|
|
269
|
+
- - ">="
|
|
270
|
+
- !ruby/object:Gem::Version
|
|
271
|
+
version: '0'
|
|
272
|
+
type: :development
|
|
273
|
+
prerelease: false
|
|
274
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
275
|
+
requirements:
|
|
276
|
+
- - ">="
|
|
277
|
+
- !ruby/object:Gem::Version
|
|
278
|
+
version: '0'
|
|
266
279
|
- !ruby/object:Gem::Dependency
|
|
267
280
|
name: rubocop-rails
|
|
268
281
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -303,9 +316,6 @@ files:
|
|
|
303
316
|
- ".gitignore"
|
|
304
317
|
- ".rspec"
|
|
305
318
|
- ".rubocop.yml"
|
|
306
|
-
- ".rubocop_rails.yml"
|
|
307
|
-
- ".rubocop_rspec.yml"
|
|
308
|
-
- ".standard.yml"
|
|
309
319
|
- Appraisals
|
|
310
320
|
- CHANGELOG.md
|
|
311
321
|
- CODE_OF_CONDUCT.md
|
|
@@ -318,9 +328,9 @@ files:
|
|
|
318
328
|
- bin/console
|
|
319
329
|
- bin/setup
|
|
320
330
|
- gemfiles/.bundle/config
|
|
321
|
-
- gemfiles/rails_6_0.gemfile
|
|
322
|
-
- gemfiles/rails_6_1.gemfile
|
|
323
331
|
- gemfiles/rails_7_0.gemfile
|
|
332
|
+
- gemfiles/rails_7_1.gemfile
|
|
333
|
+
- gemfiles/rails_7_2.gemfile
|
|
324
334
|
- lib/active_manageable.rb
|
|
325
335
|
- lib/active_manageable/authorization/cancancan.rb
|
|
326
336
|
- lib/active_manageable/authorization/pundit.rb
|
|
@@ -351,7 +361,6 @@ metadata:
|
|
|
351
361
|
changelog_uri: https://github.com/CircleSD/active_manageable/blob/main/CHANGELOG.md
|
|
352
362
|
bug_tracker_uri: https://github.com/CircleSD/active_manageable/issues
|
|
353
363
|
documentation_uri: https://github.com/CircleSD/active_manageable
|
|
354
|
-
post_install_message:
|
|
355
364
|
rdoc_options: []
|
|
356
365
|
require_paths:
|
|
357
366
|
- lib
|
|
@@ -359,15 +368,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
359
368
|
requirements:
|
|
360
369
|
- - ">="
|
|
361
370
|
- !ruby/object:Gem::Version
|
|
362
|
-
version:
|
|
371
|
+
version: 3.0.0
|
|
363
372
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
364
373
|
requirements:
|
|
365
374
|
- - ">="
|
|
366
375
|
- !ruby/object:Gem::Version
|
|
367
376
|
version: '0'
|
|
368
377
|
requirements: []
|
|
369
|
-
rubygems_version: 3.
|
|
370
|
-
signing_key:
|
|
378
|
+
rubygems_version: 3.6.9
|
|
371
379
|
specification_version: 4
|
|
372
380
|
summary: Business logic framework for Ruby on Rails
|
|
373
381
|
test_files: []
|
data/.rubocop_rails.yml
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
# Copy of Evil Martians config file
|
|
2
|
-
# https://evilmartians.com/chronicles/rubocoping-with-legacy-bring-your-ruby-code-up-to-standard
|
|
3
|
-
# https://gist.github.com/palkan/24869b835c45e89116b9727b534e579e
|
|
4
|
-
# Based on removed standard configuration:
|
|
5
|
-
# https://github.com/testdouble/standard/commit/94d133f477a5694084ac974d5ee01e8a66ce777e#diff-65478e10d5b2ef41c7293a110c0e6b7c
|
|
6
|
-
|
|
7
|
-
require:
|
|
8
|
-
- rubocop-rails
|
|
9
|
-
|
|
10
|
-
Rails/ActionFilter:
|
|
11
|
-
Enabled: true
|
|
12
|
-
EnforcedStyle: action
|
|
13
|
-
Include:
|
|
14
|
-
- app/controllers/**/*.rb
|
|
15
|
-
|
|
16
|
-
Rails/ActiveRecordAliases:
|
|
17
|
-
Enabled: true
|
|
18
|
-
|
|
19
|
-
Rails/ActiveSupportAliases:
|
|
20
|
-
Enabled: true
|
|
21
|
-
|
|
22
|
-
Rails/ApplicationJob:
|
|
23
|
-
Enabled: true
|
|
24
|
-
|
|
25
|
-
Rails/ApplicationRecord:
|
|
26
|
-
Enabled: true
|
|
27
|
-
|
|
28
|
-
Rails/AssertNot:
|
|
29
|
-
Enabled: true
|
|
30
|
-
Include:
|
|
31
|
-
- '**/test/**/*'
|
|
32
|
-
|
|
33
|
-
Rails/Blank:
|
|
34
|
-
Enabled: true
|
|
35
|
-
# Convert usages of `nil? || empty?` to `blank?`
|
|
36
|
-
NilOrEmpty: true
|
|
37
|
-
# Convert usages of `!present?` to `blank?`
|
|
38
|
-
NotPresent: true
|
|
39
|
-
# Convert usages of `unless present?` to `if blank?`
|
|
40
|
-
UnlessPresent: true
|
|
41
|
-
|
|
42
|
-
Rails/BulkChangeTable:
|
|
43
|
-
Enabled: true
|
|
44
|
-
Database: null
|
|
45
|
-
Include:
|
|
46
|
-
- db/migrate/*.rb
|
|
47
|
-
|
|
48
|
-
Rails/CreateTableWithTimestamps:
|
|
49
|
-
Enabled: true
|
|
50
|
-
Include:
|
|
51
|
-
- db/migrate/*.rb
|
|
52
|
-
|
|
53
|
-
Rails/Date:
|
|
54
|
-
Enabled: true
|
|
55
|
-
EnforcedStyle: flexible
|
|
56
|
-
|
|
57
|
-
Rails/Delegate:
|
|
58
|
-
Enabled: true
|
|
59
|
-
EnforceForPrefixed: true
|
|
60
|
-
|
|
61
|
-
Rails/DelegateAllowBlank:
|
|
62
|
-
Enabled: true
|
|
63
|
-
|
|
64
|
-
Rails/DynamicFindBy:
|
|
65
|
-
Enabled: true
|
|
66
|
-
Whitelist:
|
|
67
|
-
- find_by_sql
|
|
68
|
-
|
|
69
|
-
Rails/EnumUniqueness:
|
|
70
|
-
Enabled: true
|
|
71
|
-
Include:
|
|
72
|
-
- app/models/**/*.rb
|
|
73
|
-
|
|
74
|
-
Rails/EnvironmentComparison:
|
|
75
|
-
Enabled: true
|
|
76
|
-
|
|
77
|
-
Rails/Exit:
|
|
78
|
-
Enabled: true
|
|
79
|
-
Include:
|
|
80
|
-
- app/**/*.rb
|
|
81
|
-
- config/**/*.rb
|
|
82
|
-
- lib/**/*.rb
|
|
83
|
-
Exclude:
|
|
84
|
-
- lib/**/*.rake
|
|
85
|
-
|
|
86
|
-
Rails/FilePath:
|
|
87
|
-
Enabled: true
|
|
88
|
-
EnforcedStyle: arguments
|
|
89
|
-
|
|
90
|
-
Rails/FindBy:
|
|
91
|
-
Enabled: true
|
|
92
|
-
Include:
|
|
93
|
-
- app/models/**/*.rb
|
|
94
|
-
|
|
95
|
-
Rails/FindEach:
|
|
96
|
-
Enabled: true
|
|
97
|
-
Include:
|
|
98
|
-
- app/models/**/*.rb
|
|
99
|
-
|
|
100
|
-
Rails/HasAndBelongsToMany:
|
|
101
|
-
Enabled: true
|
|
102
|
-
Include:
|
|
103
|
-
- app/models/**/*.rb
|
|
104
|
-
|
|
105
|
-
Rails/HttpPositionalArguments:
|
|
106
|
-
Enabled: true
|
|
107
|
-
Include:
|
|
108
|
-
- 'spec/**/*'
|
|
109
|
-
- 'test/**/*'
|
|
110
|
-
|
|
111
|
-
Rails/HttpStatus:
|
|
112
|
-
Enabled: true
|
|
113
|
-
EnforcedStyle: symbolic
|
|
114
|
-
|
|
115
|
-
Rails/InverseOf:
|
|
116
|
-
Enabled: true
|
|
117
|
-
Include:
|
|
118
|
-
- app/models/**/*.rb
|
|
119
|
-
|
|
120
|
-
Rails/LexicallyScopedActionFilter:
|
|
121
|
-
Enabled: true
|
|
122
|
-
Safe: false
|
|
123
|
-
Include:
|
|
124
|
-
- app/controllers/**/*.rb
|
|
125
|
-
|
|
126
|
-
Rails/NotNullColumn:
|
|
127
|
-
Enabled: true
|
|
128
|
-
Include:
|
|
129
|
-
- db/migrate/*.rb
|
|
130
|
-
|
|
131
|
-
Rails/Output:
|
|
132
|
-
Enabled: true
|
|
133
|
-
Include:
|
|
134
|
-
- app/**/*.rb
|
|
135
|
-
- config/**/*.rb
|
|
136
|
-
- db/**/*.rb
|
|
137
|
-
- lib/**/*.rb
|
|
138
|
-
|
|
139
|
-
Rails/OutputSafety:
|
|
140
|
-
Enabled: true
|
|
141
|
-
|
|
142
|
-
Rails/PluralizationGrammar:
|
|
143
|
-
Enabled: true
|
|
144
|
-
|
|
145
|
-
Rails/Presence:
|
|
146
|
-
Enabled: true
|
|
147
|
-
|
|
148
|
-
Rails/Present:
|
|
149
|
-
Enabled: true
|
|
150
|
-
NotNilAndNotEmpty: true
|
|
151
|
-
NotBlank: true
|
|
152
|
-
UnlessBlank: true
|
|
153
|
-
|
|
154
|
-
Rails/ReadWriteAttribute:
|
|
155
|
-
Enabled: true
|
|
156
|
-
Include:
|
|
157
|
-
- app/models/**/*.rb
|
|
158
|
-
|
|
159
|
-
Rails/RedundantReceiverInWithOptions:
|
|
160
|
-
Enabled: true
|
|
161
|
-
|
|
162
|
-
Rails/RefuteMethods:
|
|
163
|
-
Enabled: true
|
|
164
|
-
Include:
|
|
165
|
-
- '**/test/**/*'
|
|
166
|
-
|
|
167
|
-
Rails/RelativeDateConstant:
|
|
168
|
-
Enabled: true
|
|
169
|
-
AutoCorrect: false
|
|
170
|
-
|
|
171
|
-
Rails/RequestReferer:
|
|
172
|
-
Enabled: true
|
|
173
|
-
EnforcedStyle: referer
|
|
174
|
-
|
|
175
|
-
Rails/ReversibleMigration:
|
|
176
|
-
Enabled: true
|
|
177
|
-
Include:
|
|
178
|
-
- db/migrate/*.rb
|
|
179
|
-
|
|
180
|
-
Rails/SafeNavigation:
|
|
181
|
-
Enabled: true
|
|
182
|
-
ConvertTry: false
|
|
183
|
-
|
|
184
|
-
Rails/ScopeArgs:
|
|
185
|
-
Enabled: true
|
|
186
|
-
Include:
|
|
187
|
-
- app/models/**/*.rb
|
|
188
|
-
|
|
189
|
-
Rails/TimeZone:
|
|
190
|
-
Enabled: true
|
|
191
|
-
EnforcedStyle: flexible
|
|
192
|
-
|
|
193
|
-
Rails/UniqBeforePluck:
|
|
194
|
-
Enabled: true
|
|
195
|
-
EnforcedStyle: conservative
|
|
196
|
-
AutoCorrect: false
|
|
197
|
-
|
|
198
|
-
Rails/Validation:
|
|
199
|
-
Enabled: true
|
|
200
|
-
Include:
|
|
201
|
-
- app/models/**/*.rb
|
data/.rubocop_rspec.yml
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
# Copy of Evil Martians config file
|
|
2
|
-
# https://evilmartians.com/chronicles/rubocoping-with-legacy-bring-your-ruby-code-up-to-standard
|
|
3
|
-
# https://gist.github.com/palkan/623c0816b05ed246bfe0cb406050990a
|
|
4
|
-
|
|
5
|
-
require:
|
|
6
|
-
- rubocop-rspec
|
|
7
|
-
|
|
8
|
-
RSpec/Focus:
|
|
9
|
-
Enabled: true
|
|
10
|
-
|
|
11
|
-
RSpec/EmptyExampleGroup:
|
|
12
|
-
Enabled: true
|
|
13
|
-
|
|
14
|
-
RSpec/EmptyLineAfterExampleGroup:
|
|
15
|
-
Enabled: true
|
|
16
|
-
|
|
17
|
-
RSpec/EmptyLineAfterFinalLet:
|
|
18
|
-
Enabled: true
|
|
19
|
-
|
|
20
|
-
RSpec/EmptyLineAfterHook:
|
|
21
|
-
Enabled: true
|
|
22
|
-
|
|
23
|
-
RSpec/EmptyLineAfterSubject:
|
|
24
|
-
Enabled: true
|
|
25
|
-
|
|
26
|
-
RSpec/HookArgument:
|
|
27
|
-
Enabled: true
|
|
28
|
-
|
|
29
|
-
RSpec/HooksBeforeExamples:
|
|
30
|
-
Enabled: true
|
|
31
|
-
|
|
32
|
-
RSpec/ImplicitExpect:
|
|
33
|
-
Enabled: true
|
|
34
|
-
|
|
35
|
-
RSpec/IteratedExpectation:
|
|
36
|
-
Enabled: true
|
|
37
|
-
|
|
38
|
-
RSpec/LetBeforeExamples:
|
|
39
|
-
Enabled: true
|
|
40
|
-
|
|
41
|
-
RSpec/MissingExampleGroupArgument:
|
|
42
|
-
Enabled: true
|
|
43
|
-
|
|
44
|
-
RSpec/ReceiveCounts:
|
|
45
|
-
Enabled: true
|
|
46
|
-
|
|
47
|
-
RSpec/Capybara:
|
|
48
|
-
Enabled: true
|
|
49
|
-
|
|
50
|
-
RSpec/FactoryBot:
|
|
51
|
-
Enabled: true
|
|
52
|
-
|
|
53
|
-
RSpec/NestedGroups:
|
|
54
|
-
Max: 5
|
|
55
|
-
|
|
56
|
-
RSpec/ExampleLength:
|
|
57
|
-
Max: 20
|
|
58
|
-
|
|
59
|
-
RSpec/MultipleExpectations:
|
|
60
|
-
Max: 10
|
|
61
|
-
|
|
62
|
-
# disabled as using expect_any_instance_of(ActiveRecord::Relation)
|
|
63
|
-
# to check for calls to :includes and :preload etc
|
|
64
|
-
RSpec/AnyInstance:
|
|
65
|
-
Enabled: false
|
|
66
|
-
|
|
67
|
-
RSpec/DescribedClass:
|
|
68
|
-
Enabled: false
|