para 0.5.4 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/para/admin/async-progress.coffee +29 -0
  3. data/app/assets/javascripts/para/admin/filters-form.coffee +1 -1
  4. data/app/assets/javascripts/para/admin/importers.coffee +38 -0
  5. data/app/assets/javascripts/para/admin/table.coffee +1 -1
  6. data/app/assets/javascripts/para/admin/tabs.coffee +1 -1
  7. data/app/assets/javascripts/para/admin/theme_actions.coffee +1 -1
  8. data/app/assets/javascripts/para/admin/tree.coffee +5 -5
  9. data/app/assets/javascripts/para/admin.coffee +2 -1
  10. data/app/assets/javascripts/para/inputs/nested_many.coffee +1 -1
  11. data/app/assets/javascripts/para/lib/remote-file-forms.coffee +60 -0
  12. data/app/assets/javascripts/para/lib/turbolinks-loading.coffee +1 -1
  13. data/app/assets/javascripts/para/lib/turbolinks-reloader.coffee +19 -0
  14. data/app/assets/stylesheets/para/admin/src/datetimepicker.sass +3 -1
  15. data/app/assets/stylesheets/para/admin/src/fuelux.sass +4 -2
  16. data/app/assets/stylesheets/para/admin/src/nested_many.sass +5 -0
  17. data/app/assets/stylesheets/para/admin/src/redactor.sass +8 -5
  18. data/app/assets/stylesheets/para/admin/src/selectize.sass +7 -4
  19. data/app/assets/stylesheets/para/admin/theme/_breadcrumb.sass +20 -12
  20. data/app/assets/stylesheets/para/admin/theme/_buttons.sass +6 -2
  21. data/app/assets/stylesheets/para/admin/theme/_checkable.sass +4 -2
  22. data/app/assets/stylesheets/para/admin/theme/_commonds.sass +6 -3
  23. data/app/assets/stylesheets/para/admin/theme/_dropdown.sass +3 -1
  24. data/app/assets/stylesheets/para/admin/theme/_form.sass +4 -2
  25. data/app/assets/stylesheets/para/admin/theme/_list.sass +7 -5
  26. data/app/assets/stylesheets/para/admin/theme/_navigation.sass +12 -66
  27. data/app/assets/stylesheets/para/admin/theme/_navtabs.sass +18 -14
  28. data/app/assets/stylesheets/para/admin/theme/_orderable.sass +7 -3
  29. data/app/assets/stylesheets/para/admin/theme/_panel.sass +19 -13
  30. data/app/assets/stylesheets/para/admin/theme/_tree.sass +4 -2
  31. data/app/assets/stylesheets/para/overrides/theme.sass +14 -10
  32. data/app/controllers/para/admin/base_controller.rb +0 -5
  33. data/app/controllers/para/admin/crud_resources_controller.rb +5 -19
  34. data/app/controllers/para/admin/{singleton_resources_controller.rb → form_resources_controller.rb} +4 -4
  35. data/app/controllers/para/admin/imports_controller.rb +68 -0
  36. data/app/controllers/para/admin/resources_controller.rb +0 -1
  37. data/app/decorators/para/component/base_decorator.rb +6 -18
  38. data/app/decorators/para/component/crud_decorator.rb +3 -3
  39. data/app/decorators/para/component/{singleton_resource_decorator.rb → form_decorator.rb} +6 -6
  40. data/app/helpers/para/admin/components_helper.rb +12 -1
  41. data/app/helpers/para/admin/decorators_helper.rb +13 -0
  42. data/app/helpers/para/markup_helper.rb +4 -0
  43. data/app/helpers/para/search_helper.rb +1 -4
  44. data/app/models/para/component/base.rb +17 -14
  45. data/app/models/para/component/crud.rb +17 -0
  46. data/app/models/para/component/form.rb +36 -0
  47. data/app/models/para/component/resource.rb +9 -20
  48. data/app/models/para/component/settings.rb +1 -1
  49. data/app/models/para/library/file.rb +23 -0
  50. data/app/models/para/library.rb +5 -0
  51. data/app/views/para/admin/form_resources/show.html.haml +4 -0
  52. data/app/views/para/admin/imports/_completed.html.haml +16 -0
  53. data/app/views/para/admin/imports/_failed.html.haml +7 -0
  54. data/app/views/para/admin/imports/_progress.html.haml +5 -0
  55. data/app/views/para/admin/imports/new.html.haml +14 -0
  56. data/app/views/para/admin/imports/show.html.haml +10 -0
  57. data/app/views/para/admin/resources/_fields.html.haml +1 -4
  58. data/app/views/para/admin/resources/_imports_menu.html.haml +17 -20
  59. data/app/views/para/admin/resources/_tree.html.haml +1 -1
  60. data/app/views/para/admin/shared/_breadcrumbs.html.haml +1 -4
  61. data/app/views/para/admin/shared/_navigation.html.haml +2 -2
  62. data/app/views/para/form/_tabs.html.haml +1 -1
  63. data/config/locales/en.yml +10 -0
  64. data/config/locales/fr.yml +12 -2
  65. data/db/migrate/20160905134106_create_para_library_files.rb +9 -0
  66. data/lib/generators/para/importer/templates/base_importer.rb +8 -1
  67. data/lib/generators/para/install/install_generator.rb +1 -2
  68. data/lib/generators/para/install/templates/components.rb +9 -5
  69. data/lib/generators/para/tree_item/tree_item_generator.rb +17 -0
  70. data/lib/para/attribute_field/base.rb +12 -4
  71. data/lib/para/attribute_field/enum.rb +7 -3
  72. data/lib/para/component/importable.rb +4 -4
  73. data/lib/para/component.rb +1 -1
  74. data/lib/para/components_cleaner.rb +66 -0
  75. data/lib/para/components_configuration.rb +3 -1
  76. data/lib/para/engine.rb +36 -3
  77. data/lib/para/ext/active_job_status.rb +13 -0
  78. data/lib/para/ext/paperclip.rb +10 -0
  79. data/lib/para/ext/simple_form_extension.rb +6 -0
  80. data/lib/para/ext.rb +1 -0
  81. data/lib/para/form_builder/nested_form.rb +5 -2
  82. data/lib/para/importer/base.rb +84 -7
  83. data/lib/para/inputs/nested_many_input.rb +1 -1
  84. data/lib/para/logging/active_job_log_subscriber.rb +48 -0
  85. data/lib/para/logging.rb +8 -0
  86. data/lib/para/markup/resources_table.rb +2 -4
  87. data/lib/para/model_field_parsers/enums.rb +19 -0
  88. data/lib/para/model_field_parsers/relations.rb +1 -1
  89. data/lib/para/model_field_parsers/store.rb +1 -1
  90. data/lib/para/model_field_parsers.rb +1 -0
  91. data/lib/para/plugins/routes.rb +2 -4
  92. data/lib/para/postgres_extensions_checker.rb +30 -0
  93. data/lib/para/routes.rb +5 -4
  94. data/lib/para/routing/component_controller_constraint.rb +36 -0
  95. data/lib/para/routing.rb +7 -0
  96. data/lib/para/sti/root_model.rb +8 -2
  97. data/lib/para/version.rb +1 -1
  98. data/lib/para.rb +10 -0
  99. data/lib/rails/routing_mapper.rb +59 -27
  100. data/lib/tasks/para_tasks.rake +21 -11
  101. metadata +73 -15
  102. data/app/models/para/component/singleton_resource.rb +0 -35
  103. data/app/views/para/admin/singleton_resources/show.html.haml +0 -4
data/lib/para.rb CHANGED
@@ -1,3 +1,4 @@
1
+ require 'rails-i18n'
1
2
  require 'devise'
2
3
  require 'paperclip'
3
4
  require 'simple_form'
@@ -9,15 +10,22 @@ require 'cocoon'
9
10
  require 'cancan'
10
11
  require 'request_store'
11
12
  require 'roo'
13
+ require 'activejob-status'
14
+ require 'deep_cloneable'
12
15
 
13
16
  require 'sass-rails'
14
17
  require 'selectize-rails'
15
18
  require 'bootstrap-sass'
19
+ require 'compass-rails'
16
20
  require 'font-awesome-rails'
17
21
 
22
+ require 'vertebra'
23
+
18
24
  require 'rails/routing_mapper'
19
25
  require 'rails/relation_length_validator'
20
26
 
27
+ require 'para/postgres_extensions_checker'
28
+
21
29
  require 'para/ext'
22
30
  require 'para/errors'
23
31
  require 'para/config'
@@ -44,9 +52,11 @@ module Para
44
52
  autoload :Config
45
53
  autoload :Component
46
54
  autoload :Generators
55
+ autoload :Routing
47
56
  autoload :Routes
48
57
  autoload :Plugins
49
58
  autoload :Breadcrumbs
59
+ autoload :Logging
50
60
  end
51
61
 
52
62
  def self.config(&block)
@@ -19,52 +19,84 @@ module ActionDispatch
19
19
  component_name, options
20
20
  )
21
21
 
22
- get endpoint => "#{ controller }#show", as: as
22
+ actions = options.fetch(:actions, [:show])
23
23
 
24
- scope(endpoint, as: component_name) do
25
- instance_eval(&block) if block
26
- add_extensions_for(:component)
24
+ namespace :admin do
25
+ resource endpoint, controller: controller, as: as
26
+
27
+ scope(endpoint, as: component_name) do
28
+ instance_eval(&block) if block
29
+ add_extensions_for(:component)
30
+ end
27
31
  end
28
32
  end
29
33
 
30
- def crud_component(component_name, options = {}, &block)
34
+ def crud_component(component_name = nil, options = {}, &block)
35
+ if !component_name || Hash === component_name
36
+ options = component_name || {}
37
+ component_name = :crud
38
+ options[:scope] ||= ':model'
39
+ end
40
+
31
41
  as, controller, endpoint = component_informations_from(
32
42
  component_name, options
33
43
  )
34
44
 
35
- controller = [component_name.to_s.singularize, 'resources'].join('_')
36
-
37
- scope endpoint, as: as do
38
- scope options[:scope] do
39
- resources :resources, controller: controller do
40
- collection do
41
- patch :order
42
- patch :tree
43
- get :export
44
- post :import
45
- end
46
-
47
- member do
48
- post :clone
45
+ # By default, use absolute paths to para default controllers, avoiding
46
+ # namespacing issues in plugins and other module namespaced scenarios
47
+ #
48
+ controller = options.fetch(:controller, '/para/admin/crud_resources')
49
+ imports_controller = options.fetch(:imports_controller, '/para/admin/imports')
50
+
51
+ namespace :admin do
52
+ constraints Para::Routing::ComponentControllerConstraint.new(controller) do
53
+ scope endpoint, as: as do
54
+ scope options[:scope] do
55
+ resources :resources, controller: controller do
56
+ collection do
57
+ patch :order
58
+ patch :tree
59
+ get :export
60
+ end
61
+
62
+ member do
63
+ post :clone
64
+ end
65
+
66
+ instance_eval(&block) if block
67
+ add_extensions_for(:crud_component)
68
+ end
69
+
70
+ scope ':importer' do
71
+ resources :imports, controller: imports_controller
72
+ end
49
73
  end
50
-
51
- instance_eval(&block) if block
52
- add_extensions_for(:crud_component)
53
74
  end
54
75
  end
55
76
  end
56
77
  end
57
78
 
58
- def singleton_resource_component(component_name, options = {}, &block)
79
+ def form_component(component_name = nil, options = {}, &block)
80
+ if !component_name || Hash === component_name
81
+ options = component_name || {}
82
+ component_name = :form
83
+ options[:scope] ||= ':model'
84
+ end
85
+
59
86
  as, _, endpoint = component_informations_from(
60
87
  component_name, options
61
88
  )
62
89
 
63
- controller = [component_name, 'resources'].join('_')
90
+ controller = options.fetch(:controller, '/para/admin/form_resources')
64
91
 
65
- scope endpoint, as: as do
66
- resource :resource, controller: controller, only: [:show, :create, :update]
67
- add_extensions_for(:singleton_resource_component)
92
+ namespace :admin do
93
+ constraints Para::Routing::ComponentControllerConstraint.new(controller) do
94
+ scope endpoint, as: as do
95
+ resource :resource, controller: controller, only: [:show, :create, :update] do
96
+ add_extensions_for(:form_component)
97
+ end
98
+ end
99
+ end
68
100
  end
69
101
  end
70
102
 
@@ -1,4 +1,23 @@
1
1
  namespace :para do
2
+ namespace :upgrade do
3
+ desc <<-DESC
4
+ Update database from SingletonResource to Form component without losing data
5
+ DESC
6
+
7
+ task singleton_to_form: :environment do
8
+ class Para::Component::SingletonResource < Para::Component::Base
9
+ end
10
+
11
+ Para::Component::Base.where(type: 'Para::Component::SingletonResource').pluck(:identifier, :id).each do |identifier, id|
12
+ Para::ComponentResource.where(component_id: id).update_all(
13
+ component_id: Para::Component::Form.find_by_identifier(identifier: identifier).id
14
+ )
15
+
16
+ Para::Component::Base.where(id: id).destroy_all
17
+ end
18
+ end
19
+ end
20
+
2
21
  namespace :components do
3
22
  desc <<-DESC
4
23
  Remove all components that are no longer referenced in the components.rb
@@ -6,17 +25,8 @@ namespace :para do
6
25
  DESC
7
26
 
8
27
  task clean: :environment do
9
- Para::Component::Base.find_each do |component|
10
- unless Para.components.component_for(component.identifier)
11
- component.destroy
12
- end
13
- end
14
-
15
- Para::ComponentSection.find_each do |section|
16
- unless Para.components.section_for(section.identifier)
17
- section.destroy
18
- end
19
- end
28
+ require 'para/components_cleaner'
29
+ Para::ComponentsCleaner.run
20
30
  end
21
31
  end
22
32
  end
metadata CHANGED
@@ -1,29 +1,49 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: para
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Valentin Ballestrino
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-14 00:00:00.000000000 Z
11
+ date: 2016-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '4.0'
20
+ - - "<="
21
+ - !ruby/object:Gem::Version
22
+ version: '6.0'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
25
28
  - !ruby/object:Gem::Version
26
29
  version: '4.0'
30
+ - - "<="
31
+ - !ruby/object:Gem::Version
32
+ version: '6.0'
33
+ - !ruby/object:Gem::Dependency
34
+ name: rails-i18n
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
27
47
  - !ruby/object:Gem::Dependency
28
48
  name: devise
29
49
  requirement: !ruby/object:Gem::Requirement
@@ -162,14 +182,14 @@ dependencies:
162
182
  requirements:
163
183
  - - "~>"
164
184
  - !ruby/object:Gem::Version
165
- version: 2.1.1
185
+ version: 2.2.1
166
186
  type: :runtime
167
187
  prerelease: false
168
188
  version_requirements: !ruby/object:Gem::Requirement
169
189
  requirements:
170
190
  - - "~>"
171
191
  - !ruby/object:Gem::Version
172
- version: 2.1.1
192
+ version: 2.2.1
173
193
  - !ruby/object:Gem::Dependency
174
194
  name: request_store
175
195
  requirement: !ruby/object:Gem::Requirement
@@ -212,6 +232,20 @@ dependencies:
212
232
  - - ">="
213
233
  - !ruby/object:Gem::Version
214
234
  version: '0'
235
+ - !ruby/object:Gem::Dependency
236
+ name: activejob-status
237
+ requirement: !ruby/object:Gem::Requirement
238
+ requirements:
239
+ - - ">="
240
+ - !ruby/object:Gem::Version
241
+ version: '0'
242
+ type: :runtime
243
+ prerelease: false
244
+ version_requirements: !ruby/object:Gem::Requirement
245
+ requirements:
246
+ - - ">="
247
+ - !ruby/object:Gem::Version
248
+ version: '0'
215
249
  - !ruby/object:Gem::Dependency
216
250
  name: bootstrap-sass
217
251
  requirement: !ruby/object:Gem::Requirement
@@ -241,7 +275,7 @@ dependencies:
241
275
  - !ruby/object:Gem::Version
242
276
  version: 4.0.0
243
277
  - !ruby/object:Gem::Dependency
244
- name: selectize-rails
278
+ name: haml-rails
245
279
  requirement: !ruby/object:Gem::Requirement
246
280
  requirements:
247
281
  - - ">="
@@ -255,7 +289,7 @@ dependencies:
255
289
  - !ruby/object:Gem::Version
256
290
  version: '0'
257
291
  - !ruby/object:Gem::Dependency
258
- name: haml-rails
292
+ name: sass-rails
259
293
  requirement: !ruby/object:Gem::Requirement
260
294
  requirements:
261
295
  - - ">="
@@ -269,7 +303,7 @@ dependencies:
269
303
  - !ruby/object:Gem::Version
270
304
  version: '0'
271
305
  - !ruby/object:Gem::Dependency
272
- name: sass-rails
306
+ name: font-awesome-sass
273
307
  requirement: !ruby/object:Gem::Requirement
274
308
  requirements:
275
309
  - - ">="
@@ -283,7 +317,7 @@ dependencies:
283
317
  - !ruby/object:Gem::Version
284
318
  version: '0'
285
319
  - !ruby/object:Gem::Dependency
286
- name: font-awesome-sass
320
+ name: compass-rails
287
321
  requirement: !ruby/object:Gem::Requirement
288
322
  requirements:
289
323
  - - ">="
@@ -297,7 +331,7 @@ dependencies:
297
331
  - !ruby/object:Gem::Version
298
332
  version: '0'
299
333
  - !ruby/object:Gem::Dependency
300
- name: autoprefixer-rails
334
+ name: vertebra
301
335
  requirement: !ruby/object:Gem::Requirement
302
336
  requirements:
303
337
  - - ">="
@@ -352,7 +386,9 @@ files:
352
386
  - app/assets/images/para/admin/loading-spinner.gif
353
387
  - app/assets/javascripts/admin/app.coffee
354
388
  - app/assets/javascripts/para/admin.coffee
389
+ - app/assets/javascripts/para/admin/async-progress.coffee
355
390
  - app/assets/javascripts/para/admin/filters-form.coffee
391
+ - app/assets/javascripts/para/admin/importers.coffee
356
392
  - app/assets/javascripts/para/admin/table.coffee
357
393
  - app/assets/javascripts/para/admin/tabs.coffee
358
394
  - app/assets/javascripts/para/admin/theme_actions.coffee
@@ -360,14 +396,17 @@ files:
360
396
  - app/assets/javascripts/para/application.js
361
397
  - app/assets/javascripts/para/inputs/nested_many.coffee
362
398
  - app/assets/javascripts/para/lib/ajax.coffee
399
+ - app/assets/javascripts/para/lib/remote-file-forms.coffee
363
400
  - app/assets/javascripts/para/lib/turbolinks-forms.coffee
364
401
  - app/assets/javascripts/para/lib/turbolinks-loading.coffee
402
+ - app/assets/javascripts/para/lib/turbolinks-reloader.coffee
365
403
  - app/assets/stylesheets/admin/app.sass
366
404
  - app/assets/stylesheets/admin/theme.sass
367
405
  - app/assets/stylesheets/para/admin.sass
368
406
  - app/assets/stylesheets/para/admin/src/datetimepicker.sass
369
407
  - app/assets/stylesheets/para/admin/src/fuelux.sass
370
408
  - app/assets/stylesheets/para/admin/src/jasny.bootstrap.sass
409
+ - app/assets/stylesheets/para/admin/src/nested_many.sass
371
410
  - app/assets/stylesheets/para/admin/src/page-loading.sass
372
411
  - app/assets/stylesheets/para/admin/src/page-top-bar.sass
373
412
  - app/assets/stylesheets/para/admin/src/redactor.sass
@@ -399,19 +438,21 @@ files:
399
438
  - app/controllers/para/admin/base_controller.rb
400
439
  - app/controllers/para/admin/component_controller.rb
401
440
  - app/controllers/para/admin/crud_resources_controller.rb
441
+ - app/controllers/para/admin/form_resources_controller.rb
442
+ - app/controllers/para/admin/imports_controller.rb
402
443
  - app/controllers/para/admin/main_controller.rb
403
444
  - app/controllers/para/admin/resources_controller.rb
404
445
  - app/controllers/para/admin/settings_component_controller.rb
405
- - app/controllers/para/admin/singleton_resources_controller.rb
406
446
  - app/controllers/para/application_controller.rb
407
447
  - app/decorators/para/component/base_decorator.rb
408
448
  - app/decorators/para/component/crud_decorator.rb
449
+ - app/decorators/para/component/form_decorator.rb
409
450
  - app/decorators/para/component/settings_decorator.rb
410
- - app/decorators/para/component/singleton_resource_decorator.rb
411
451
  - app/decorators/para/component_section_decorator.rb
412
452
  - app/helpers/para/admin/base_helper.rb
413
453
  - app/helpers/para/admin/component_groups_helper.rb
414
454
  - app/helpers/para/admin/components_helper.rb
455
+ - app/helpers/para/admin/decorators_helper.rb
415
456
  - app/helpers/para/admin/page_helper.rb
416
457
  - app/helpers/para/admin/resources_helper.rb
417
458
  - app/helpers/para/application_helper.rb
@@ -428,16 +469,24 @@ files:
428
469
  - app/models/para/ability.rb
429
470
  - app/models/para/component/base.rb
430
471
  - app/models/para/component/crud.rb
472
+ - app/models/para/component/form.rb
431
473
  - app/models/para/component/resource.rb
432
474
  - app/models/para/component/settings.rb
433
- - app/models/para/component/singleton_resource.rb
434
475
  - app/models/para/component_resource.rb
435
476
  - app/models/para/component_section.rb
477
+ - app/models/para/library.rb
478
+ - app/models/para/library/file.rb
436
479
  - app/models/para/page/section.rb
437
480
  - app/views/layouts/para/admin.html.haml
438
481
  - app/views/layouts/para/application.html.erb
439
482
  - app/views/para/admin/crud_resources/index.html.haml
440
483
  - app/views/para/admin/dashboard.html.haml
484
+ - app/views/para/admin/form_resources/show.html.haml
485
+ - app/views/para/admin/imports/_completed.html.haml
486
+ - app/views/para/admin/imports/_failed.html.haml
487
+ - app/views/para/admin/imports/_progress.html.haml
488
+ - app/views/para/admin/imports/new.html.haml
489
+ - app/views/para/admin/imports/show.html.haml
441
490
  - app/views/para/admin/main/index.html.haml
442
491
  - app/views/para/admin/resources/_actions.html.haml
443
492
  - app/views/para/admin/resources/_add_button.html.haml
@@ -457,7 +506,6 @@ files:
457
506
  - app/views/para/admin/shared/_breadcrumbs.html.haml
458
507
  - app/views/para/admin/shared/_header.html.haml
459
508
  - app/views/para/admin/shared/_navigation.html.haml
460
- - app/views/para/admin/singleton_resources/show.html.haml
461
509
  - app/views/para/form/_tabs.html.haml
462
510
  - app/views/para/inputs/_nested_many.html.haml
463
511
  - app/views/para/inputs/_nested_one.html.haml
@@ -476,6 +524,7 @@ files:
476
524
  - db/migrate/20160304113055_add_json_equality_operator_patch_to_postgres.rb
477
525
  - db/migrate/20160419145254_create_para_page_sections.rb
478
526
  - db/migrate/20160613172154_create_unaccent_extension.rb
527
+ - db/migrate/20160905134106_create_para_library_files.rb
479
528
  - lib/generators/para/admin_user/admin_user_generator.rb
480
529
  - lib/generators/para/component/component_generator.rb
481
530
  - lib/generators/para/component/crud/crud_generator.rb
@@ -506,6 +555,7 @@ files:
506
555
  - lib/generators/para/resource/templates/resource_controller.rb
507
556
  - lib/generators/para/table/table_generator.rb
508
557
  - lib/generators/para/table/templates/_table.html.haml
558
+ - lib/generators/para/tree_item/tree_item_generator.rb
509
559
  - lib/para.rb
510
560
  - lib/para/attribute_field.rb
511
561
  - lib/para/attribute_field/base.rb
@@ -532,6 +582,7 @@ files:
532
582
  - lib/para/component/exportable.rb
533
583
  - lib/para/component/importable.rb
534
584
  - lib/para/component/subclassable.rb
585
+ - lib/para/components_cleaner.rb
535
586
  - lib/para/components_configuration.rb
536
587
  - lib/para/config.rb
537
588
  - lib/para/engine.rb
@@ -540,6 +591,7 @@ files:
540
591
  - lib/para/exporter/base.rb
541
592
  - lib/para/exporter/csv.rb
542
593
  - lib/para/ext.rb
594
+ - lib/para/ext/active_job_status.rb
543
595
  - lib/para/ext/cancan.rb
544
596
  - lib/para/ext/paperclip.rb
545
597
  - lib/para/ext/simple_form_extension.rb
@@ -560,6 +612,8 @@ files:
560
612
  - lib/para/inputs.rb
561
613
  - lib/para/inputs/nested_many_input.rb
562
614
  - lib/para/inputs/nested_one_input.rb
615
+ - lib/para/logging.rb
616
+ - lib/para/logging/active_job_log_subscriber.rb
563
617
  - lib/para/markup.rb
564
618
  - lib/para/markup/alert.rb
565
619
  - lib/para/markup/component.rb
@@ -570,6 +624,7 @@ files:
570
624
  - lib/para/model_field_parsers.rb
571
625
  - lib/para/model_field_parsers/base.rb
572
626
  - lib/para/model_field_parsers/devise.rb
627
+ - lib/para/model_field_parsers/enums.rb
573
628
  - lib/para/model_field_parsers/globalize.rb
574
629
  - lib/para/model_field_parsers/orderable.rb
575
630
  - lib/para/model_field_parsers/paperclip.rb
@@ -581,7 +636,10 @@ files:
581
636
  - lib/para/page/model.rb
582
637
  - lib/para/plugins.rb
583
638
  - lib/para/plugins/routes.rb
639
+ - lib/para/postgres_extensions_checker.rb
584
640
  - lib/para/routes.rb
641
+ - lib/para/routing.rb
642
+ - lib/para/routing/component_controller_constraint.rb
585
643
  - lib/para/search.rb
586
644
  - lib/para/search/distinct.rb
587
645
  - lib/para/sti.rb
@@ -1,35 +0,0 @@
1
- module Para
2
- module Component
3
- class SingletonResource < Para::Component::Resource
4
- register :singleton_resource, self
5
-
6
- configurable_on :model_type, as: :selectize, collection: :available_models
7
-
8
- has_one :component_resource, class_name: 'Para::ComponentResource',
9
- foreign_key: :component_id, autosave: true, dependent: :destroy
10
-
11
- def resource
12
- build_component_resource(resource: model.new) unless component_resource
13
- component_resource.resource ||= model.new
14
- end
15
-
16
- def resource=(value)
17
- build_component_resource(resource: value) unless component_resource
18
- end
19
-
20
- def default_form_actions
21
- [:submit]
22
- end
23
-
24
- def model_name
25
- ModelName.new(self)
26
- end
27
-
28
- class ModelName < ActiveModel::Name
29
- def singular_route_key
30
- 'singleton'
31
- end
32
- end
33
- end
34
- end
35
- end
@@ -1,4 +0,0 @@
1
- = page_top_bar(title: @component.name, type: 'singleton_resource/show')
2
-
3
- .page-content-wrap
4
- = render find_partial_for(resource, :form)