godmin 1.3.1 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. checksums.yaml +5 -5
  2. data/.codeclimate.yml +0 -2
  3. data/.gitignore +1 -0
  4. data/.travis.yml +9 -10
  5. data/Appraisals +4 -4
  6. data/CHANGELOG.md +84 -2
  7. data/Gemfile +1 -2
  8. data/README.md +119 -10
  9. data/Rakefile +2 -2
  10. data/app/views/godmin/resource/_breadcrumb.html.erb +12 -24
  11. data/app/views/godmin/resource/_breadcrumb_actions.html.erb +41 -0
  12. data/app/views/godmin/resource/_button_actions.html.erb +1 -1
  13. data/app/views/godmin/resource/_pagination.html.erb +4 -4
  14. data/app/views/godmin/resource/_table.html.erb +3 -0
  15. data/app/views/godmin/resource/columns/_actions.html.erb +4 -4
  16. data/app/views/godmin/resource/show.html.erb +1 -1
  17. data/config/locales/en.yml +2 -0
  18. data/config/locales/pt-BR.yml +2 -0
  19. data/config/locales/sv.yml +2 -0
  20. data/gemfiles/rails_5.gemfile +3 -4
  21. data/gemfiles/rails_6.gemfile +8 -0
  22. data/godmin.gemspec +18 -16
  23. data/lib/generators/godmin/resource/resource_generator.rb +7 -1
  24. data/lib/generators/godmin/resource/templates/resource_model.rb +4 -0
  25. data/lib/godmin/application_controller.rb +10 -11
  26. data/lib/godmin/authentication.rb +11 -11
  27. data/lib/godmin/authentication/sessions_controller.rb +2 -1
  28. data/lib/godmin/authorization.rb +34 -14
  29. data/lib/godmin/engine_wrapper.rb +10 -1
  30. data/lib/godmin/generators/base.rb +4 -4
  31. data/lib/godmin/generators/named_base.rb +4 -4
  32. data/lib/godmin/helpers/application.rb +3 -3
  33. data/lib/godmin/helpers/batch_actions.rb +1 -1
  34. data/lib/godmin/helpers/forms.rb +5 -1
  35. data/lib/godmin/paginator.rb +12 -4
  36. data/lib/godmin/resolver.rb +20 -5
  37. data/lib/godmin/resources/resource_controller.rb +24 -5
  38. data/lib/godmin/resources/resource_controller/batch_actions.rb +1 -1
  39. data/lib/godmin/resources/resource_service.rb +8 -7
  40. data/lib/godmin/resources/resource_service/associations.rb +23 -0
  41. data/lib/godmin/version.rb +1 -1
  42. data/template.rb +17 -3
  43. data/test/dummy/admin/app/controllers/admin/authorized_articles_controller.rb +29 -0
  44. data/test/dummy/admin/app/models/admin/article.rb +4 -0
  45. data/test/dummy/admin/app/models/admin/magazine.rb +4 -0
  46. data/test/dummy/admin/app/policies/admin/article_policy.rb +11 -0
  47. data/test/dummy/admin/app/policies/admin/magazine_policy.rb +4 -0
  48. data/test/dummy/admin/app/views/admin/shared/_navigation.html.erb +5 -0
  49. data/test/dummy/admin/config/routes.rb +1 -0
  50. data/test/dummy/app/assets/config/manifest.js +4 -0
  51. data/test/dummy/app/controllers/another_admin_sessions_controller.rb +8 -0
  52. data/test/dummy/app/controllers/comments_controller.rb +3 -0
  53. data/test/dummy/app/models/another_admin_user.rb +7 -0
  54. data/test/dummy/app/models/article.rb +1 -0
  55. data/test/dummy/app/models/comment.rb +7 -0
  56. data/test/dummy/app/models/magazine.rb +2 -0
  57. data/test/dummy/app/services/article_service.rb +2 -0
  58. data/test/dummy/app/services/comment_service.rb +7 -0
  59. data/test/dummy/bin/rails +1 -1
  60. data/test/dummy/config/application.rb +2 -14
  61. data/test/dummy/config/locales/en.yml +9 -0
  62. data/test/dummy/config/routes.rb +6 -1
  63. data/test/dummy/db/migrate/20150717121532_create_articles.rb +1 -1
  64. data/test/dummy/db/migrate/20150907133753_create_admin_users.rb +1 -1
  65. data/test/dummy/db/migrate/20160713134238_create_comment.rb +9 -0
  66. data/test/dummy/db/migrate/20170207081043_create_another_admin_user.rb +10 -0
  67. data/test/dummy/db/migrate/20210519215502_create_magazines.rb +9 -0
  68. data/test/dummy/db/schema.rb +38 -16
  69. data/test/fakes/article.rb +1 -1
  70. data/test/fakes/article_service.rb +3 -7
  71. data/test/generators/resource_generator_test.rb +78 -0
  72. data/test/integration/authentication_test.rb +8 -0
  73. data/test/integration/authorization_test.rb +13 -0
  74. data/test/integration/nested_resources_test.rb +47 -0
  75. data/test/test_helper.rb +1 -4
  76. data/test/{lib/godmin → unit}/engine_wrapper_test.rb +1 -1
  77. data/test/{lib/godmin → unit}/helpers/filters_test.rb +0 -0
  78. data/test/{lib/godmin → unit}/paginator_test.rb +11 -0
  79. data/test/{lib/godmin → unit}/resolver_test.rb +0 -0
  80. data/test/{lib/godmin → unit}/resources/resource_service/batch_actions_test.rb +1 -1
  81. data/test/{lib/godmin → unit}/resources/resource_service/filters_test.rb +1 -1
  82. data/test/{lib/godmin → unit}/resources/resource_service/ordering_test.rb +1 -1
  83. data/test/{lib/godmin → unit}/resources/resource_service/pagination_test.rb +0 -0
  84. data/test/{lib/godmin → unit}/resources/resource_service/scopes_test.rb +0 -0
  85. data/test/{lib/godmin → unit}/resources/resource_service_test.rb +0 -0
  86. metadata +175 -108
  87. data/gemfiles/rails_4.gemfile +0 -9
  88. data/lib/godmin/authorization/policy_finder.rb +0 -31
  89. data/lib/tasks/godmin_tasks.rake +0 -4
  90. data/test/lib/godmin/policy_finder_test.rb +0 -55
data/test/test_helper.rb CHANGED
@@ -1,8 +1,6 @@
1
- require "codeclimate-test-reporter"
2
- CodeClimate::TestReporter.start
3
-
4
1
  # Configure Rails Environment
5
2
  ENV["RAILS_ENV"] = "test"
3
+ ENV["DISABLE_DATABASE_ENVIRONMENT_CHECK"] = "1"
6
4
 
7
5
  require File.expand_path("../dummy/config/environment.rb", __FILE__)
8
6
  require "rails/test_help"
@@ -11,7 +9,6 @@ require "capybara/poltergeist"
11
9
  require "minitest/reporters"
12
10
  require "pry"
13
11
 
14
- # TODO: what to call these?
15
12
  require File.expand_path("../fakes/article.rb", __FILE__)
16
13
  require File.expand_path("../fakes/article_service.rb", __FILE__)
17
14
 
@@ -22,7 +22,7 @@ module Godmin
22
22
 
23
23
  def test_default_namespace
24
24
  engine_wrapper = EngineWrapper.new(Controller)
25
- assert_equal nil, engine_wrapper.namespace
25
+ assert_nil engine_wrapper.namespace
26
26
  end
27
27
 
28
28
  def test_default_namespaced?
File without changes
@@ -80,5 +80,16 @@ module Godmin
80
80
  paginator = Paginator.new(@resources)
81
81
  assert_equal 50, paginator.total_resources
82
82
  end
83
+
84
+ def test_total_resource_with_grouped_count
85
+ resources_class = Class.new do
86
+ def count
87
+ { 1 => 1, 2 => 2 }
88
+ end
89
+ end
90
+
91
+ paginator = Paginator.new(resources_class.new)
92
+ assert_equal 2, paginator.total_resources
93
+ end
83
94
  end
84
95
  end
File without changes
@@ -14,7 +14,7 @@ module Godmin
14
14
 
15
15
  def test_batch_action_when_it_does_not_exist
16
16
  assert_not @article_service.batch_action(:foobar, [:foo, :bar])
17
- assert_equal nil, @article_service.called_methods[:batch_actions][:foobar]
17
+ assert_nil @article_service.called_methods[:batch_actions][:foobar]
18
18
  end
19
19
 
20
20
  def test_batch_action_exists
@@ -25,7 +25,7 @@ module Godmin
25
25
 
26
26
  def test_does_not_call_filter_when_empty_multiselect
27
27
  @article_service.apply_filters({ tags: [""] }, :resources)
28
- assert_equal nil, @article_service.called_methods[:filters][:tags]
28
+ assert_nil @article_service.called_methods[:filters][:tags]
29
29
  end
30
30
 
31
31
  def test_filter_map_with_default_options
@@ -25,7 +25,7 @@ module Godmin
25
25
  def test_apply_order_without_order
26
26
  resources = @resources_class.new
27
27
  @article_service.apply_order("", resources)
28
- assert_equal nil, resources.order_param
28
+ assert_nil resources.order_param
29
29
  end
30
30
 
31
31
  def test_apply_order_with_custom_ordering_method
metadata CHANGED
@@ -1,45 +1,37 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: godmin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jens Ljungblad
8
8
  - Linus Pettersson
9
9
  - Varvet
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-09-27 00:00:00.000000000 Z
13
+ date: 2021-05-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bcrypt
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
- - - "~>"
20
- - !ruby/object:Gem::Version
21
- version: '3.1'
22
- type: :runtime
23
- prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- requirements:
26
- - - "~>"
19
+ - - ">="
27
20
  - !ruby/object:Gem::Version
28
- version: '3.1'
29
- - !ruby/object:Gem::Dependency
30
- name: bootstrap_form
31
- requirement: !ruby/object:Gem::Requirement
32
- requirements:
33
- - - "~>"
21
+ version: '3.0'
22
+ - - "<"
34
23
  - !ruby/object:Gem::Version
35
- version: '2.4'
24
+ version: '4.0'
36
25
  type: :runtime
37
26
  prerelease: false
38
27
  version_requirements: !ruby/object:Gem::Requirement
39
28
  requirements:
40
- - - "~>"
29
+ - - ">="
41
30
  - !ruby/object:Gem::Version
42
- version: '2.4'
31
+ version: '3.0'
32
+ - - "<"
33
+ - !ruby/object:Gem::Version
34
+ version: '4.0'
43
35
  - !ruby/object:Gem::Dependency
44
36
  name: bootstrap-sass
45
37
  requirement: !ruby/object:Gem::Requirement
@@ -55,25 +47,19 @@ dependencies:
55
47
  - !ruby/object:Gem::Version
56
48
  version: '3.3'
57
49
  - !ruby/object:Gem::Dependency
58
- name: coffee-rails
50
+ name: bootstrap_form
59
51
  requirement: !ruby/object:Gem::Requirement
60
52
  requirements:
61
- - - ">="
62
- - !ruby/object:Gem::Version
63
- version: '4.0'
64
- - - "<"
53
+ - - "~>"
65
54
  - !ruby/object:Gem::Version
66
- version: '6.0'
55
+ version: '2.4'
67
56
  type: :runtime
68
57
  prerelease: false
69
58
  version_requirements: !ruby/object:Gem::Requirement
70
59
  requirements:
71
- - - ">="
72
- - !ruby/object:Gem::Version
73
- version: '4.0'
74
- - - "<"
60
+ - - "~>"
75
61
  - !ruby/object:Gem::Version
76
- version: '6.0'
62
+ version: '2.4'
77
63
  - !ruby/object:Gem::Dependency
78
64
  name: csv_builder
79
65
  requirement: !ruby/object:Gem::Requirement
@@ -94,7 +80,7 @@ dependencies:
94
80
  requirements:
95
81
  - - ">="
96
82
  - !ruby/object:Gem::Version
97
- version: '3.0'
83
+ version: '4.0'
98
84
  - - "<"
99
85
  - !ruby/object:Gem::Version
100
86
  version: '5.0'
@@ -104,7 +90,7 @@ dependencies:
104
90
  requirements:
105
91
  - - ">="
106
92
  - !ruby/object:Gem::Version
107
- version: '3.0'
93
+ version: '4.0'
108
94
  - - "<"
109
95
  - !ruby/object:Gem::Version
110
96
  version: '5.0'
@@ -122,46 +108,66 @@ dependencies:
122
108
  - - "~>"
123
109
  - !ruby/object:Gem::Version
124
110
  version: '2.8'
111
+ - !ruby/object:Gem::Dependency
112
+ name: pundit
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '1.1'
118
+ - - "<"
119
+ - !ruby/object:Gem::Version
120
+ version: '2.0'
121
+ type: :runtime
122
+ prerelease: false
123
+ version_requirements: !ruby/object:Gem::Requirement
124
+ requirements:
125
+ - - ">="
126
+ - !ruby/object:Gem::Version
127
+ version: '1.1'
128
+ - - "<"
129
+ - !ruby/object:Gem::Version
130
+ version: '2.0'
125
131
  - !ruby/object:Gem::Dependency
126
132
  name: rails
127
133
  requirement: !ruby/object:Gem::Requirement
128
134
  requirements:
129
135
  - - ">="
130
136
  - !ruby/object:Gem::Version
131
- version: '4.0'
137
+ version: '5.0'
132
138
  - - "<"
133
139
  - !ruby/object:Gem::Version
134
- version: '6.0'
140
+ version: '7.0'
135
141
  type: :runtime
136
142
  prerelease: false
137
143
  version_requirements: !ruby/object:Gem::Requirement
138
144
  requirements:
139
145
  - - ">="
140
146
  - !ruby/object:Gem::Version
141
- version: '4.0'
147
+ version: '5.0'
142
148
  - - "<"
143
149
  - !ruby/object:Gem::Version
144
- version: '6.0'
150
+ version: '7.0'
145
151
  - !ruby/object:Gem::Dependency
146
152
  name: sass-rails
147
153
  requirement: !ruby/object:Gem::Requirement
148
154
  requirements:
149
155
  - - ">="
150
156
  - !ruby/object:Gem::Version
151
- version: '4.0'
157
+ version: '5.0'
152
158
  - - "<"
153
159
  - !ruby/object:Gem::Version
154
- version: '6.0'
160
+ version: '7.0'
155
161
  type: :runtime
156
162
  prerelease: false
157
163
  version_requirements: !ruby/object:Gem::Requirement
158
164
  requirements:
159
165
  - - ">="
160
166
  - !ruby/object:Gem::Version
161
- version: '4.0'
167
+ version: '5.0'
162
168
  - - "<"
163
169
  - !ruby/object:Gem::Version
164
- version: '6.0'
170
+ version: '7.0'
165
171
  - !ruby/object:Gem::Dependency
166
172
  name: selectize-rails
167
173
  requirement: !ruby/object:Gem::Requirement
@@ -180,115 +186,143 @@ dependencies:
180
186
  name: appraisal
181
187
  requirement: !ruby/object:Gem::Requirement
182
188
  requirements:
183
- - - "~>"
189
+ - - ">="
184
190
  - !ruby/object:Gem::Version
185
- version: '2.1'
191
+ version: '0'
186
192
  type: :development
187
193
  prerelease: false
188
194
  version_requirements: !ruby/object:Gem::Requirement
189
195
  requirements:
190
- - - "~>"
196
+ - - ">="
191
197
  - !ruby/object:Gem::Version
192
- version: '2.1'
198
+ version: '0'
193
199
  - !ruby/object:Gem::Dependency
194
- name: capybara
200
+ name: bootsnap
195
201
  requirement: !ruby/object:Gem::Requirement
196
202
  requirements:
197
- - - "~>"
203
+ - - ">="
198
204
  - !ruby/object:Gem::Version
199
- version: '2.4'
205
+ version: '0'
200
206
  type: :development
201
207
  prerelease: false
202
208
  version_requirements: !ruby/object:Gem::Requirement
203
209
  requirements:
204
- - - "~>"
210
+ - - ">="
205
211
  - !ruby/object:Gem::Version
206
- version: '2.4'
212
+ version: '0'
207
213
  - !ruby/object:Gem::Dependency
208
- name: m
214
+ name: byebug
209
215
  requirement: !ruby/object:Gem::Requirement
210
216
  requirements:
211
- - - "~>"
217
+ - - ">="
212
218
  - !ruby/object:Gem::Version
213
- version: '1.3'
219
+ version: '0'
214
220
  type: :development
215
221
  prerelease: false
216
222
  version_requirements: !ruby/object:Gem::Requirement
217
223
  requirements:
218
- - - "~>"
224
+ - - ">="
219
225
  - !ruby/object:Gem::Version
220
- version: '1.3'
226
+ version: '0'
221
227
  - !ruby/object:Gem::Dependency
222
- name: minitest-reporters
228
+ name: capybara
223
229
  requirement: !ruby/object:Gem::Requirement
224
230
  requirements:
225
- - - "~>"
231
+ - - ">="
226
232
  - !ruby/object:Gem::Version
227
- version: '1.0'
233
+ version: '0'
228
234
  type: :development
229
235
  prerelease: false
230
236
  version_requirements: !ruby/object:Gem::Requirement
231
237
  requirements:
232
- - - "~>"
238
+ - - ">="
233
239
  - !ruby/object:Gem::Version
234
- version: '1.0'
240
+ version: '0'
235
241
  - !ruby/object:Gem::Dependency
236
242
  name: minitest
237
243
  requirement: !ruby/object:Gem::Requirement
238
244
  requirements:
239
- - - "~>"
245
+ - - ">="
240
246
  - !ruby/object:Gem::Version
241
- version: '5.5'
247
+ version: '0'
242
248
  type: :development
243
249
  prerelease: false
244
250
  version_requirements: !ruby/object:Gem::Requirement
245
251
  requirements:
246
- - - "~>"
252
+ - - ">="
247
253
  - !ruby/object:Gem::Version
248
- version: '5.5'
254
+ version: '0'
255
+ - !ruby/object:Gem::Dependency
256
+ name: minitest-reporters
257
+ requirement: !ruby/object:Gem::Requirement
258
+ requirements:
259
+ - - ">="
260
+ - !ruby/object:Gem::Version
261
+ version: '0'
262
+ type: :development
263
+ prerelease: false
264
+ version_requirements: !ruby/object:Gem::Requirement
265
+ requirements:
266
+ - - ">="
267
+ - !ruby/object:Gem::Version
268
+ version: '0'
249
269
  - !ruby/object:Gem::Dependency
250
270
  name: poltergeist
251
271
  requirement: !ruby/object:Gem::Requirement
252
272
  requirements:
253
- - - "~>"
273
+ - - ">="
254
274
  - !ruby/object:Gem::Version
255
- version: '1.7'
275
+ version: '0'
256
276
  type: :development
257
277
  prerelease: false
258
278
  version_requirements: !ruby/object:Gem::Requirement
259
279
  requirements:
260
- - - "~>"
280
+ - - ">="
261
281
  - !ruby/object:Gem::Version
262
- version: '1.7'
282
+ version: '0'
263
283
  - !ruby/object:Gem::Dependency
264
284
  name: pry
265
285
  requirement: !ruby/object:Gem::Requirement
266
286
  requirements:
267
- - - "~>"
287
+ - - ">="
268
288
  - !ruby/object:Gem::Version
269
- version: '0.10'
289
+ version: '0'
270
290
  type: :development
271
291
  prerelease: false
272
292
  version_requirements: !ruby/object:Gem::Requirement
273
293
  requirements:
274
- - - "~>"
294
+ - - ">="
275
295
  - !ruby/object:Gem::Version
276
- version: '0.10'
296
+ version: '0'
297
+ - !ruby/object:Gem::Dependency
298
+ name: puma
299
+ requirement: !ruby/object:Gem::Requirement
300
+ requirements:
301
+ - - ">="
302
+ - !ruby/object:Gem::Version
303
+ version: '0'
304
+ type: :development
305
+ prerelease: false
306
+ version_requirements: !ruby/object:Gem::Requirement
307
+ requirements:
308
+ - - ">="
309
+ - !ruby/object:Gem::Version
310
+ version: '0'
277
311
  - !ruby/object:Gem::Dependency
278
312
  name: sqlite3
279
313
  requirement: !ruby/object:Gem::Requirement
280
314
  requirements:
281
- - - "~>"
315
+ - - ">="
282
316
  - !ruby/object:Gem::Version
283
- version: '1.3'
317
+ version: '0'
284
318
  type: :development
285
319
  prerelease: false
286
320
  version_requirements: !ruby/object:Gem::Requirement
287
321
  requirements:
288
- - - "~>"
322
+ - - ">="
289
323
  - !ruby/object:Gem::Version
290
- version: '1.3'
291
- description: Godmin is an admin framework for Rails 4+. Use it to build dedicated
324
+ version: '0'
325
+ description: Godmin is an admin framework for Rails 5+. Use it to build dedicated
292
326
  admin sections for your apps, or stand alone admin apps such as internal tools.
293
327
  email:
294
328
  - info@varvet.se
@@ -318,6 +352,7 @@ files:
318
352
  - app/views/godmin/resource/_actions.html.erb
319
353
  - app/views/godmin/resource/_batch_actions.html.erb
320
354
  - app/views/godmin/resource/_breadcrumb.html.erb
355
+ - app/views/godmin/resource/_breadcrumb_actions.html.erb
321
356
  - app/views/godmin/resource/_button_actions.html.erb
322
357
  - app/views/godmin/resource/_errors.html.erb
323
358
  - app/views/godmin/resource/_export_actions.html.erb
@@ -345,8 +380,8 @@ files:
345
380
  - config/locales/pt-BR.yml
346
381
  - config/locales/sv.yml
347
382
  - config/routes.rb
348
- - gemfiles/rails_4.gemfile
349
383
  - gemfiles/rails_5.gemfile
384
+ - gemfiles/rails_6.gemfile
350
385
  - godmin.gemspec
351
386
  - lib/generators/godmin/authentication/authentication_generator.rb
352
387
  - lib/generators/godmin/authentication/templates/sessions_controller.rb
@@ -355,6 +390,7 @@ files:
355
390
  - lib/generators/godmin/policy/templates/policy.rb
356
391
  - lib/generators/godmin/resource/resource_generator.rb
357
392
  - lib/generators/godmin/resource/templates/resource_controller.rb
393
+ - lib/generators/godmin/resource/templates/resource_model.rb
358
394
  - lib/generators/godmin/resource/templates/resource_service.rb
359
395
  - lib/godmin.rb
360
396
  - lib/godmin/application_controller.rb
@@ -363,7 +399,6 @@ files:
363
399
  - lib/godmin/authentication/user.rb
364
400
  - lib/godmin/authorization.rb
365
401
  - lib/godmin/authorization/policy.rb
366
- - lib/godmin/authorization/policy_finder.rb
367
402
  - lib/godmin/engine.rb
368
403
  - lib/godmin/engine_wrapper.rb
369
404
  - lib/godmin/generators/base.rb
@@ -380,13 +415,13 @@ files:
380
415
  - lib/godmin/resources/resource_controller.rb
381
416
  - lib/godmin/resources/resource_controller/batch_actions.rb
382
417
  - lib/godmin/resources/resource_service.rb
418
+ - lib/godmin/resources/resource_service/associations.rb
383
419
  - lib/godmin/resources/resource_service/batch_actions.rb
384
420
  - lib/godmin/resources/resource_service/filters.rb
385
421
  - lib/godmin/resources/resource_service/ordering.rb
386
422
  - lib/godmin/resources/resource_service/pagination.rb
387
423
  - lib/godmin/resources/resource_service/scopes.rb
388
424
  - lib/godmin/version.rb
389
- - lib/tasks/godmin_tasks.rake
390
425
  - screenshot.png
391
426
  - template.rb
392
427
  - test/dummy/Rakefile
@@ -395,6 +430,11 @@ files:
395
430
  - test/dummy/admin/app/assets/stylesheets/admin/application.css
396
431
  - test/dummy/admin/app/controllers/admin/application_controller.rb
397
432
  - test/dummy/admin/app/controllers/admin/articles_controller.rb
433
+ - test/dummy/admin/app/controllers/admin/authorized_articles_controller.rb
434
+ - test/dummy/admin/app/models/admin/article.rb
435
+ - test/dummy/admin/app/models/admin/magazine.rb
436
+ - test/dummy/admin/app/policies/admin/article_policy.rb
437
+ - test/dummy/admin/app/policies/admin/magazine_policy.rb
398
438
  - test/dummy/admin/app/services/admin/article_service.rb
399
439
  - test/dummy/admin/app/views/admin/articles/.keep
400
440
  - test/dummy/admin/app/views/admin/articles/columns/.keep
@@ -408,18 +448,25 @@ files:
408
448
  - test/dummy/admin/lib/admin.rb
409
449
  - test/dummy/admin/lib/admin/engine.rb
410
450
  - test/dummy/admin/lib/admin/version.rb
451
+ - test/dummy/app/assets/config/manifest.js
411
452
  - test/dummy/app/assets/javascripts/application.js
412
453
  - test/dummy/app/assets/stylesheets/application.css
454
+ - test/dummy/app/controllers/another_admin_sessions_controller.rb
413
455
  - test/dummy/app/controllers/application_controller.rb
414
456
  - test/dummy/app/controllers/articles_controller.rb
415
457
  - test/dummy/app/controllers/authenticated_articles_controller.rb
416
458
  - test/dummy/app/controllers/authorized_articles_controller.rb
459
+ - test/dummy/app/controllers/comments_controller.rb
417
460
  - test/dummy/app/controllers/sessions_controller.rb
418
461
  - test/dummy/app/models/.keep
419
462
  - test/dummy/app/models/admin_user.rb
463
+ - test/dummy/app/models/another_admin_user.rb
420
464
  - test/dummy/app/models/article.rb
465
+ - test/dummy/app/models/comment.rb
466
+ - test/dummy/app/models/magazine.rb
421
467
  - test/dummy/app/policies/article_policy.rb
422
468
  - test/dummy/app/services/article_service.rb
469
+ - test/dummy/app/services/comment_service.rb
423
470
  - test/dummy/app/views/articles/.keep
424
471
  - test/dummy/app/views/articles/columns/.keep
425
472
  - test/dummy/app/views/articles/filters/.keep
@@ -444,9 +491,13 @@ files:
444
491
  - test/dummy/config/initializers/secret_token.rb
445
492
  - test/dummy/config/initializers/session_store.rb
446
493
  - test/dummy/config/initializers/wrap_parameters.rb
494
+ - test/dummy/config/locales/en.yml
447
495
  - test/dummy/config/routes.rb
448
496
  - test/dummy/db/migrate/20150717121532_create_articles.rb
449
497
  - test/dummy/db/migrate/20150907133753_create_admin_users.rb
498
+ - test/dummy/db/migrate/20160713134238_create_comment.rb
499
+ - test/dummy/db/migrate/20170207081043_create_another_admin_user.rb
500
+ - test/dummy/db/migrate/20210519215502_create_magazines.rb
450
501
  - test/dummy/db/schema.rb
451
502
  - test/dummy/lib/assets/.keep
452
503
  - test/dummy/log/.keep
@@ -456,37 +507,38 @@ files:
456
507
  - test/dummy/public/favicon.ico
457
508
  - test/fakes/article.rb
458
509
  - test/fakes/article_service.rb
510
+ - test/generators/resource_generator_test.rb
459
511
  - test/integration/authentication_test.rb
460
512
  - test/integration/authorization_test.rb
461
513
  - test/integration/batch_actions_test.rb
462
514
  - test/integration/column_ordering_test.rb
463
515
  - test/integration/crud_test.rb
464
516
  - test/integration/filters_test.rb
517
+ - test/integration/nested_resources_test.rb
465
518
  - test/integration/scopes_test.rb
466
519
  - test/integration/view_overriding/column_overriding_test.rb
467
520
  - test/integration/view_overriding/filter_overriding_test.rb
468
521
  - test/integration/view_overriding/partial_overriding_test.rb
469
522
  - test/integration/view_overriding/template_overriding_test.rb
470
523
  - test/integration/welcome_test.rb
471
- - test/lib/godmin/engine_wrapper_test.rb
472
- - test/lib/godmin/helpers/filters_test.rb
473
- - test/lib/godmin/paginator_test.rb
474
- - test/lib/godmin/policy_finder_test.rb
475
- - test/lib/godmin/resolver_test.rb
476
- - test/lib/godmin/resources/resource_service/batch_actions_test.rb
477
- - test/lib/godmin/resources/resource_service/filters_test.rb
478
- - test/lib/godmin/resources/resource_service/ordering_test.rb
479
- - test/lib/godmin/resources/resource_service/pagination_test.rb
480
- - test/lib/godmin/resources/resource_service/scopes_test.rb
481
- - test/lib/godmin/resources/resource_service_test.rb
482
524
  - test/test_helper.rb
525
+ - test/unit/engine_wrapper_test.rb
526
+ - test/unit/helpers/filters_test.rb
527
+ - test/unit/paginator_test.rb
528
+ - test/unit/resolver_test.rb
529
+ - test/unit/resources/resource_service/batch_actions_test.rb
530
+ - test/unit/resources/resource_service/filters_test.rb
531
+ - test/unit/resources/resource_service/ordering_test.rb
532
+ - test/unit/resources/resource_service/pagination_test.rb
533
+ - test/unit/resources/resource_service/scopes_test.rb
534
+ - test/unit/resources/resource_service_test.rb
483
535
  - vendor/assets/javascripts/bootstrap-datetimepicker.js
484
536
  - vendor/assets/stylesheets/bootstrap-datetimepicker.css
485
537
  homepage: https://github.com/varvet/godmin
486
538
  licenses:
487
539
  - MIT
488
540
  metadata: {}
489
- post_install_message:
541
+ post_install_message:
490
542
  rdoc_options: []
491
543
  require_paths:
492
544
  - lib
@@ -501,11 +553,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
501
553
  - !ruby/object:Gem::Version
502
554
  version: '0'
503
555
  requirements: []
504
- rubyforge_project:
505
- rubygems_version: 2.4.5
506
- signing_key:
556
+ rubygems_version: 3.1.4
557
+ signing_key:
507
558
  specification_version: 4
508
- summary: Godmin is an admin framework for Rails 4+
559
+ summary: Godmin is an admin framework for Rails 5+
509
560
  test_files:
510
561
  - test/dummy/Rakefile
511
562
  - test/dummy/admin/admin.gemspec
@@ -513,6 +564,11 @@ test_files:
513
564
  - test/dummy/admin/app/assets/stylesheets/admin/application.css
514
565
  - test/dummy/admin/app/controllers/admin/application_controller.rb
515
566
  - test/dummy/admin/app/controllers/admin/articles_controller.rb
567
+ - test/dummy/admin/app/controllers/admin/authorized_articles_controller.rb
568
+ - test/dummy/admin/app/models/admin/article.rb
569
+ - test/dummy/admin/app/models/admin/magazine.rb
570
+ - test/dummy/admin/app/policies/admin/article_policy.rb
571
+ - test/dummy/admin/app/policies/admin/magazine_policy.rb
516
572
  - test/dummy/admin/app/services/admin/article_service.rb
517
573
  - test/dummy/admin/app/views/admin/articles/.keep
518
574
  - test/dummy/admin/app/views/admin/articles/columns/.keep
@@ -526,18 +582,25 @@ test_files:
526
582
  - test/dummy/admin/lib/admin.rb
527
583
  - test/dummy/admin/lib/admin/engine.rb
528
584
  - test/dummy/admin/lib/admin/version.rb
585
+ - test/dummy/app/assets/config/manifest.js
529
586
  - test/dummy/app/assets/javascripts/application.js
530
587
  - test/dummy/app/assets/stylesheets/application.css
588
+ - test/dummy/app/controllers/another_admin_sessions_controller.rb
531
589
  - test/dummy/app/controllers/application_controller.rb
532
590
  - test/dummy/app/controllers/articles_controller.rb
533
591
  - test/dummy/app/controllers/authenticated_articles_controller.rb
534
592
  - test/dummy/app/controllers/authorized_articles_controller.rb
593
+ - test/dummy/app/controllers/comments_controller.rb
535
594
  - test/dummy/app/controllers/sessions_controller.rb
536
595
  - test/dummy/app/models/.keep
537
596
  - test/dummy/app/models/admin_user.rb
597
+ - test/dummy/app/models/another_admin_user.rb
538
598
  - test/dummy/app/models/article.rb
599
+ - test/dummy/app/models/comment.rb
600
+ - test/dummy/app/models/magazine.rb
539
601
  - test/dummy/app/policies/article_policy.rb
540
602
  - test/dummy/app/services/article_service.rb
603
+ - test/dummy/app/services/comment_service.rb
541
604
  - test/dummy/app/views/articles/.keep
542
605
  - test/dummy/app/views/articles/columns/.keep
543
606
  - test/dummy/app/views/articles/filters/.keep
@@ -562,9 +625,13 @@ test_files:
562
625
  - test/dummy/config/initializers/secret_token.rb
563
626
  - test/dummy/config/initializers/session_store.rb
564
627
  - test/dummy/config/initializers/wrap_parameters.rb
628
+ - test/dummy/config/locales/en.yml
565
629
  - test/dummy/config/routes.rb
566
630
  - test/dummy/db/migrate/20150717121532_create_articles.rb
567
631
  - test/dummy/db/migrate/20150907133753_create_admin_users.rb
632
+ - test/dummy/db/migrate/20160713134238_create_comment.rb
633
+ - test/dummy/db/migrate/20170207081043_create_another_admin_user.rb
634
+ - test/dummy/db/migrate/20210519215502_create_magazines.rb
568
635
  - test/dummy/db/schema.rb
569
636
  - test/dummy/lib/assets/.keep
570
637
  - test/dummy/log/.keep
@@ -574,28 +641,28 @@ test_files:
574
641
  - test/dummy/public/favicon.ico
575
642
  - test/fakes/article.rb
576
643
  - test/fakes/article_service.rb
644
+ - test/generators/resource_generator_test.rb
577
645
  - test/integration/authentication_test.rb
578
646
  - test/integration/authorization_test.rb
579
647
  - test/integration/batch_actions_test.rb
580
648
  - test/integration/column_ordering_test.rb
581
649
  - test/integration/crud_test.rb
582
650
  - test/integration/filters_test.rb
651
+ - test/integration/nested_resources_test.rb
583
652
  - test/integration/scopes_test.rb
584
653
  - test/integration/view_overriding/column_overriding_test.rb
585
654
  - test/integration/view_overriding/filter_overriding_test.rb
586
655
  - test/integration/view_overriding/partial_overriding_test.rb
587
656
  - test/integration/view_overriding/template_overriding_test.rb
588
657
  - test/integration/welcome_test.rb
589
- - test/lib/godmin/engine_wrapper_test.rb
590
- - test/lib/godmin/helpers/filters_test.rb
591
- - test/lib/godmin/paginator_test.rb
592
- - test/lib/godmin/policy_finder_test.rb
593
- - test/lib/godmin/resolver_test.rb
594
- - test/lib/godmin/resources/resource_service/batch_actions_test.rb
595
- - test/lib/godmin/resources/resource_service/filters_test.rb
596
- - test/lib/godmin/resources/resource_service/ordering_test.rb
597
- - test/lib/godmin/resources/resource_service/pagination_test.rb
598
- - test/lib/godmin/resources/resource_service/scopes_test.rb
599
- - test/lib/godmin/resources/resource_service_test.rb
600
658
  - test/test_helper.rb
601
- has_rdoc:
659
+ - test/unit/engine_wrapper_test.rb
660
+ - test/unit/helpers/filters_test.rb
661
+ - test/unit/paginator_test.rb
662
+ - test/unit/resolver_test.rb
663
+ - test/unit/resources/resource_service/batch_actions_test.rb
664
+ - test/unit/resources/resource_service/filters_test.rb
665
+ - test/unit/resources/resource_service/ordering_test.rb
666
+ - test/unit/resources/resource_service/pagination_test.rb
667
+ - test/unit/resources/resource_service/scopes_test.rb
668
+ - test/unit/resources/resource_service_test.rb