thecore_settings 2.0.4 → 2.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +13 -14
  3. data/config/locales/{thecore_settings.it.yml → it.yml} +0 -0
  4. data/db/migrate/{20161227101954_create_rails_admin_settings.rb → 20161227101955_create_thecore_settings.rb} +1 -1
  5. data/db/migrate/20210825113515_migrate_from_rails_admin_settings_to_thecore_settings.rb +22 -0
  6. data/lib/thecore_settings/engine.rb +11 -10
  7. data/lib/thecore_settings.rb +1 -1
  8. metadata +5 -145
  9. data/app/assets/config/thecore_settings_manifest.js +0 -0
  10. data/app/assets/images/thecore_settings/.keep +0 -0
  11. data/app/assets/javascripts/thecore_settings/.keep +0 -0
  12. data/app/assets/stylesheets/rich/editor.css +0 -20
  13. data/app/assets/stylesheets/thecore_settings/.keep +0 -0
  14. data/app/controllers/.keep +0 -0
  15. data/app/helpers/.keep +0 -0
  16. data/app/mailers/.keep +0 -0
  17. data/assets/javascripts/rails_admin/custom/thecore_settings.rb +0 -2
  18. data/config/initializers/rails_admin_requirements.rb +0 -22
  19. data/config/initializers/thecore_settings_abilities.rb +0 -22
  20. data/config/initializers/thecore_settings_post_init.rb +0 -4
  21. data/config/routes.rb +0 -3
  22. data/db/migrate/20161227101956_add_app_name.rb +0 -5
  23. data/lib/generators/thecore_settings/templates/db/migrate/20161227101954_create_thecore_settings.rb +0 -29
  24. data/lib/tasks/thecore_settings_tasks.rake +0 -4
  25. data/log/development.log +0 -0
  26. data/test/dummy/Rakefile +0 -6
  27. data/test/dummy/app/assets/config/manifest.js +0 -4
  28. data/test/dummy/app/assets/images/.keep +0 -0
  29. data/test/dummy/app/assets/javascripts/application.js +0 -13
  30. data/test/dummy/app/assets/javascripts/cable.js +0 -13
  31. data/test/dummy/app/assets/javascripts/channels/.keep +0 -0
  32. data/test/dummy/app/assets/stylesheets/application.css +0 -15
  33. data/test/dummy/app/channels/application_cable/channel.rb +0 -4
  34. data/test/dummy/app/channels/application_cable/connection.rb +0 -4
  35. data/test/dummy/app/controllers/application_controller.rb +0 -3
  36. data/test/dummy/app/controllers/concerns/.keep +0 -0
  37. data/test/dummy/app/helpers/application_helper.rb +0 -2
  38. data/test/dummy/app/jobs/application_job.rb +0 -2
  39. data/test/dummy/app/mailers/application_mailer.rb +0 -4
  40. data/test/dummy/app/models/application_record.rb +0 -3
  41. data/test/dummy/app/models/concerns/.keep +0 -0
  42. data/test/dummy/app/views/layouts/application.html.erb +0 -14
  43. data/test/dummy/app/views/layouts/mailer.html.erb +0 -13
  44. data/test/dummy/app/views/layouts/mailer.text.erb +0 -1
  45. data/test/dummy/bin/bundle +0 -3
  46. data/test/dummy/bin/rails +0 -4
  47. data/test/dummy/bin/rake +0 -4
  48. data/test/dummy/bin/setup +0 -34
  49. data/test/dummy/bin/update +0 -29
  50. data/test/dummy/config/application.rb +0 -15
  51. data/test/dummy/config/boot.rb +0 -5
  52. data/test/dummy/config/cable.yml +0 -9
  53. data/test/dummy/config/database.yml +0 -25
  54. data/test/dummy/config/environment.rb +0 -5
  55. data/test/dummy/config/environments/development.rb +0 -54
  56. data/test/dummy/config/environments/production.rb +0 -86
  57. data/test/dummy/config/environments/test.rb +0 -42
  58. data/test/dummy/config/initializers/application_controller_renderer.rb +0 -6
  59. data/test/dummy/config/initializers/assets.rb +0 -11
  60. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
  61. data/test/dummy/config/initializers/cookies_serializer.rb +0 -5
  62. data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  63. data/test/dummy/config/initializers/inflections.rb +0 -16
  64. data/test/dummy/config/initializers/mime_types.rb +0 -4
  65. data/test/dummy/config/initializers/new_framework_defaults.rb +0 -24
  66. data/test/dummy/config/initializers/session_store.rb +0 -3
  67. data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
  68. data/test/dummy/config/locales/en.yml +0 -23
  69. data/test/dummy/config/puma.rb +0 -47
  70. data/test/dummy/config/routes.rb +0 -3
  71. data/test/dummy/config/secrets.yml +0 -22
  72. data/test/dummy/config/spring.rb +0 -6
  73. data/test/dummy/config.ru +0 -5
  74. data/test/dummy/db/development.sqlite3 +0 -0
  75. data/test/dummy/lib/assets/.keep +0 -0
  76. data/test/dummy/log/.keep +0 -0
  77. data/test/dummy/log/development.log +0 -16
  78. data/test/dummy/public/404.html +0 -67
  79. data/test/dummy/public/422.html +0 -67
  80. data/test/dummy/public/500.html +0 -66
  81. data/test/dummy/public/apple-touch-icon-precomposed.png +0 -0
  82. data/test/dummy/public/apple-touch-icon.png +0 -0
  83. data/test/dummy/public/favicon.ico +0 -0
  84. data/test/dummy/tmp/.keep +0 -0
  85. data/test/integration/navigation_test.rb +0 -8
  86. data/test/test_helper.rb +0 -19
  87. data/test/thecore_settings_test.rb +0 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9fffe406c1ac27ced75d6a8afe8d21dc28e1df165cc33b947aa10d17b86d3dde
4
- data.tar.gz: b1fe75965bbaebc4e3687fdf6c469ad32a2432ce1b7123d093e2908d3c4374ba
3
+ metadata.gz: d0fbb95cf02a044f75c3e5ccda3540068836c14dac1576fa32f0401f6389e47a
4
+ data.tar.gz: 4dd06053f1661529b953859ab5ecf5c7e9f46fa89566411e8387cf298c9ee73c
5
5
  SHA512:
6
- metadata.gz: 8b539c1e5ab12dec985d19a01a5e692dce5847d90865f2f4236542b50e65d2684b77c95a9232c987784dc2cb058dd91ae13a8413910dc14997a0cc249235f516
7
- data.tar.gz: 72b7fd28f0d8967b0a7bd9f5524e3b60fb5e7ca1f8649c8c571f8529bd69f5d89a804d4b6a52797e47ddef5305a7868d3e1fa88b1b859d1fa03f3c06b3f01b73
6
+ metadata.gz: a7ca42c534ab5b6eea5fbb8b117901c9fea431339847f15eee44ce2daa6d6762148a0435ee7acbf263fd93cffce877fdcac79a16c0431a4a284aa636aa1af7f8
7
+ data.tar.gz: bc5173798cfe9fd02c9af33647020155e4e4bb0607e52410ed85074fb04ffa65076cf29211f3357472a6c875c3668395669e377d8d3c4ef9a2e2a51165068b29
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- thecore_settings (2.0.0)
4
+ thecore_settings (2.0.6)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -77,12 +77,12 @@ GEM
77
77
  database_cleaner-core (2.0.1)
78
78
  diff-lcs (1.4.4)
79
79
  docile (1.4.0)
80
- down (5.2.3)
80
+ down (5.2.4)
81
81
  addressable (~> 2.8)
82
82
  erubi (1.10.0)
83
83
  factory_bot (6.2.0)
84
84
  activesupport (>= 5.0.0)
85
- ffi (1.15.3)
85
+ ffi (1.15.4)
86
86
  geocoder (1.6.7)
87
87
  globalid (0.5.2)
88
88
  activesupport (>= 5.0)
@@ -96,11 +96,11 @@ GEM
96
96
  nokogiri (>= 1.5.9)
97
97
  mail (2.7.1)
98
98
  mini_mime (>= 0.1.1)
99
- marcel (1.0.1)
99
+ marcel (1.0.2)
100
100
  method_source (1.0.0)
101
101
  mime-types (3.3.1)
102
102
  mime-types-data (~> 3.2015)
103
- mime-types-data (3.2021.0704)
103
+ mime-types-data (3.2021.0901)
104
104
  mimemagic (0.3.10)
105
105
  nokogiri (~> 1)
106
106
  rake
@@ -108,7 +108,7 @@ GEM
108
108
  mini_mime (1.1.1)
109
109
  mini_portile2 (2.6.1)
110
110
  minitest (5.14.4)
111
- mongo (2.15.0)
111
+ mongo (2.15.1)
112
112
  bson (>= 4.8.2, < 5.0.0)
113
113
  mongoid (6.4.8)
114
114
  activemodel (>= 5.1, < 6.0.0)
@@ -130,7 +130,7 @@ GEM
130
130
  rspec-expectations (~> 3.3)
131
131
  rspec-mocks (~> 3.3)
132
132
  nio4r (2.5.8)
133
- nokogiri (1.12.3)
133
+ nokogiri (1.12.5)
134
134
  mini_portile2 (~> 2.6.1)
135
135
  racc (~> 1.4)
136
136
  paperclip (6.1.0)
@@ -139,7 +139,7 @@ GEM
139
139
  mime-types
140
140
  mimemagic (~> 0.3.0)
141
141
  terrapin (~> 0.6.0)
142
- parallel (1.20.1)
142
+ parallel (1.21.0)
143
143
  parser (3.0.2.0)
144
144
  ast (~> 2.4.1)
145
145
  public_suffix (4.0.6)
@@ -188,7 +188,7 @@ GEM
188
188
  diff-lcs (>= 1.2.0, < 2.0)
189
189
  rspec-support (~> 3.10.0)
190
190
  rspec-support (3.10.2)
191
- rubocop (1.19.1)
191
+ rubocop (1.21.0)
192
192
  parallel (~> 1.10)
193
193
  parser (>= 3.0.0.0)
194
194
  rainbow (>= 2.2.2, < 4.0)
@@ -197,11 +197,10 @@ GEM
197
197
  rubocop-ast (>= 1.9.1, < 2.0)
198
198
  ruby-progressbar (~> 1.7)
199
199
  unicode-display_width (>= 1.4.0, < 3.0)
200
- rubocop-ast (1.11.0)
200
+ rubocop-ast (1.12.0)
201
201
  parser (>= 3.0.1.1)
202
- rubocop-rspec (2.4.0)
203
- rubocop (~> 1.0)
204
- rubocop-ast (>= 1.1.0)
202
+ rubocop-rspec (2.5.0)
203
+ rubocop (~> 1.19)
205
204
  ruby-progressbar (1.11.0)
206
205
  ruby-vips (2.1.3)
207
206
  ffi (~> 1.12)
@@ -236,7 +235,7 @@ GEM
236
235
  thread_safe (0.3.6)
237
236
  tzinfo (1.2.9)
238
237
  thread_safe (~> 0.1)
239
- unicode-display_width (2.0.0)
238
+ unicode-display_width (2.1.0)
240
239
  validates_email_format_of (1.6.3)
241
240
  i18n
242
241
  websocket-driver (0.7.5)
File without changes
@@ -1,4 +1,4 @@
1
- class CreateThecoreSettings < ActiveRecord::Migration[5.0]
1
+ class CreateThecoreSettings < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  create_table :thecore_settings do |t|
4
4
  t.boolean :enabled, default: true
@@ -0,0 +1,22 @@
1
+ class MigrateFromRailsAdminSettingsToThecoreSettings < ActiveRecord::Migration[5.2]
2
+
3
+ module RailsAdminSettings
4
+ class Setting < ActiveRecord::Base
5
+ self.table_name = "rails_admin_settings"
6
+ end
7
+ end
8
+
9
+ def change
10
+ if RailsAdminSettings::Setting.table_exists?
11
+ puts "Table Exists, trying to migrate older values to new ThecoreSettings::Setting Table"
12
+ RailsAdminSettings::Setting.all.each do |old_setting|
13
+ new_setting = ThecoreSettings::Setting.find_or_initialize_by old_setting.attributes.except("id", "created_at", "updated_at")
14
+ unless new_setting.save
15
+ puts new_setting.errors.full_messages.join("\n")
16
+ end
17
+ end
18
+ else
19
+ puts "Table Does not Exists, nothing to do! Yay"
20
+ end
21
+ end
22
+ end
@@ -1,9 +1,19 @@
1
1
  module ThecoreSettings
2
2
  class Engine < ::Rails::Engine
3
+
4
+ initializer 'ThecoreSettings.add_to_migrations' do |app|
5
+ unless app.root.to_s.match root.to_s
6
+ # APPEND TO MAIN APP MIGRATIONS FROM THIS GEM
7
+ config.paths['db/migrate'].expanded.each do |expanded_path|
8
+ app.config.paths['db/migrate'] << expanded_path
9
+ end
10
+ end
11
+ end
12
+
3
13
  rake_tasks do
4
14
  require File.expand_path('../tasks', __FILE__)
5
15
  end
6
-
16
+
7
17
  initializer 'ThecoreSettings.install_after_action' do |app|
8
18
  require File.dirname(__FILE__) + '/../../app/models/thecore_settings/setting.rb'
9
19
 
@@ -13,14 +23,5 @@ module ThecoreSettings
13
23
  end
14
24
  end
15
25
  end
16
-
17
- initializer 'ThecoreSettings.add_to_migrations' do |app|
18
- unless app.root.to_s.match root.to_s
19
- # APPEND TO MAIN APP MIGRATIONS FROM THIS GEM
20
- config.paths['db/migrate'].expanded.each do |expanded_path|
21
- app.config.paths['db/migrate'] << expanded_path
22
- end
23
- end
24
- end
25
26
  end
26
27
  end
@@ -1,4 +1,4 @@
1
- require "thecore_settings/version"
1
+ # require "thecore_settings/version"
2
2
 
3
3
  module ThecoreSettings
4
4
  if defined?(Rails) && defined?(Rails::Html) && defined?(Rails::Html::WhiteListSanitizer)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thecore_settings
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.4
4
+ version: 2.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-08-25 00:00:00.000000000 Z
12
+ date: 2022-05-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mongoid
@@ -344,36 +344,21 @@ files:
344
344
  - README.md
345
345
  - README.rdoc
346
346
  - Rakefile
347
- - app/assets/config/thecore_settings_manifest.js
348
- - app/assets/images/thecore_settings/.keep
349
- - app/assets/javascripts/thecore_settings/.keep
350
- - app/assets/stylesheets/rich/editor.css
351
- - app/assets/stylesheets/thecore_settings/.keep
352
- - app/controllers/.keep
353
- - app/helpers/.keep
354
- - app/mailers/.keep
355
347
  - app/models/.keep
356
348
  - app/models/thecore_settings/setting.rb
357
349
  - app/views/.keep
358
350
  - app/views/rails_admin/main/_setting_value.html.haml
359
- - assets/javascripts/rails_admin/custom/thecore_settings.rb
360
351
  - bin/rails
361
- - config/initializers/rails_admin_requirements.rb
362
- - config/initializers/thecore_settings_abilities.rb
363
- - config/initializers/thecore_settings_post_init.rb
364
352
  - config/locales/en.yml
353
+ - config/locales/it.yml
365
354
  - config/locales/pt-BR.yml
366
355
  - config/locales/ru.yml
367
- - config/locales/thecore_settings.it.yml
368
- - config/routes.rb
369
- - db/migrate/20161227101954_create_rails_admin_settings.rb
370
- - db/migrate/20161227101956_add_app_name.rb
356
+ - db/migrate/20161227101955_create_thecore_settings.rb
357
+ - db/migrate/20210825113515_migrate_from_rails_admin_settings_to_thecore_settings.rb
371
358
  - gemfiles/mongoid-6.0.gemfile
372
359
  - gemfiles/mongoid-6.3.gemfile
373
360
  - lib/generators/thecore_settings/migration_generator.rb
374
- - lib/generators/thecore_settings/templates/db/migrate/20161227101954_create_thecore_settings.rb
375
361
  - lib/generators/thecore_settings/templates/migration.rb
376
- - lib/tasks/thecore_settings_tasks.rake
377
362
  - lib/thecore_settings.rb
378
363
  - lib/thecore_settings/determine_mime_type.rb
379
364
  - lib/thecore_settings/dumper.rb
@@ -393,7 +378,6 @@ files:
393
378
  - lib/thecore_settings/uploads.rb
394
379
  - lib/thecore_settings/validation.rb
395
380
  - lib/thecore_settings/version.rb
396
- - log/development.log
397
381
  - spec/advanced_usage_spec.rb
398
382
  - spec/carrierwave_spec.rb
399
383
  - spec/database_trickery_spec.rb
@@ -415,68 +399,6 @@ files:
415
399
  - spec/support/mongoid.rb
416
400
  - spec/support/mongoid.yml
417
401
  - spec/types_spec.rb
418
- - test/dummy/Rakefile
419
- - test/dummy/app/assets/config/manifest.js
420
- - test/dummy/app/assets/images/.keep
421
- - test/dummy/app/assets/javascripts/application.js
422
- - test/dummy/app/assets/javascripts/cable.js
423
- - test/dummy/app/assets/javascripts/channels/.keep
424
- - test/dummy/app/assets/stylesheets/application.css
425
- - test/dummy/app/channels/application_cable/channel.rb
426
- - test/dummy/app/channels/application_cable/connection.rb
427
- - test/dummy/app/controllers/application_controller.rb
428
- - test/dummy/app/controllers/concerns/.keep
429
- - test/dummy/app/helpers/application_helper.rb
430
- - test/dummy/app/jobs/application_job.rb
431
- - test/dummy/app/mailers/application_mailer.rb
432
- - test/dummy/app/models/application_record.rb
433
- - test/dummy/app/models/concerns/.keep
434
- - test/dummy/app/views/layouts/application.html.erb
435
- - test/dummy/app/views/layouts/mailer.html.erb
436
- - test/dummy/app/views/layouts/mailer.text.erb
437
- - test/dummy/bin/bundle
438
- - test/dummy/bin/rails
439
- - test/dummy/bin/rake
440
- - test/dummy/bin/setup
441
- - test/dummy/bin/update
442
- - test/dummy/config.ru
443
- - test/dummy/config/application.rb
444
- - test/dummy/config/boot.rb
445
- - test/dummy/config/cable.yml
446
- - test/dummy/config/database.yml
447
- - test/dummy/config/environment.rb
448
- - test/dummy/config/environments/development.rb
449
- - test/dummy/config/environments/production.rb
450
- - test/dummy/config/environments/test.rb
451
- - test/dummy/config/initializers/application_controller_renderer.rb
452
- - test/dummy/config/initializers/assets.rb
453
- - test/dummy/config/initializers/backtrace_silencers.rb
454
- - test/dummy/config/initializers/cookies_serializer.rb
455
- - test/dummy/config/initializers/filter_parameter_logging.rb
456
- - test/dummy/config/initializers/inflections.rb
457
- - test/dummy/config/initializers/mime_types.rb
458
- - test/dummy/config/initializers/new_framework_defaults.rb
459
- - test/dummy/config/initializers/session_store.rb
460
- - test/dummy/config/initializers/wrap_parameters.rb
461
- - test/dummy/config/locales/en.yml
462
- - test/dummy/config/puma.rb
463
- - test/dummy/config/routes.rb
464
- - test/dummy/config/secrets.yml
465
- - test/dummy/config/spring.rb
466
- - test/dummy/db/development.sqlite3
467
- - test/dummy/lib/assets/.keep
468
- - test/dummy/log/.keep
469
- - test/dummy/log/development.log
470
- - test/dummy/public/404.html
471
- - test/dummy/public/422.html
472
- - test/dummy/public/500.html
473
- - test/dummy/public/apple-touch-icon-precomposed.png
474
- - test/dummy/public/apple-touch-icon.png
475
- - test/dummy/public/favicon.ico
476
- - test/dummy/tmp/.keep
477
- - test/integration/navigation_test.rb
478
- - test/test_helper.rb
479
- - test/thecore_settings_test.rb
480
402
  - thecore_settings.gemspec
481
403
  homepage: https://github.com/gabrieletassoni/thecore_settings
482
404
  licenses:
@@ -523,65 +445,3 @@ test_files:
523
445
  - spec/support/mongoid.rb
524
446
  - spec/support/mongoid.yml
525
447
  - spec/types_spec.rb
526
- - test/dummy/Rakefile
527
- - test/dummy/app/assets/config/manifest.js
528
- - test/dummy/app/assets/images/.keep
529
- - test/dummy/app/assets/javascripts/application.js
530
- - test/dummy/app/assets/javascripts/cable.js
531
- - test/dummy/app/assets/javascripts/channels/.keep
532
- - test/dummy/app/assets/stylesheets/application.css
533
- - test/dummy/app/channels/application_cable/channel.rb
534
- - test/dummy/app/channels/application_cable/connection.rb
535
- - test/dummy/app/controllers/application_controller.rb
536
- - test/dummy/app/controllers/concerns/.keep
537
- - test/dummy/app/helpers/application_helper.rb
538
- - test/dummy/app/jobs/application_job.rb
539
- - test/dummy/app/mailers/application_mailer.rb
540
- - test/dummy/app/models/application_record.rb
541
- - test/dummy/app/models/concerns/.keep
542
- - test/dummy/app/views/layouts/application.html.erb
543
- - test/dummy/app/views/layouts/mailer.html.erb
544
- - test/dummy/app/views/layouts/mailer.text.erb
545
- - test/dummy/bin/bundle
546
- - test/dummy/bin/rails
547
- - test/dummy/bin/rake
548
- - test/dummy/bin/setup
549
- - test/dummy/bin/update
550
- - test/dummy/config.ru
551
- - test/dummy/config/application.rb
552
- - test/dummy/config/boot.rb
553
- - test/dummy/config/cable.yml
554
- - test/dummy/config/database.yml
555
- - test/dummy/config/environment.rb
556
- - test/dummy/config/environments/development.rb
557
- - test/dummy/config/environments/production.rb
558
- - test/dummy/config/environments/test.rb
559
- - test/dummy/config/initializers/application_controller_renderer.rb
560
- - test/dummy/config/initializers/assets.rb
561
- - test/dummy/config/initializers/backtrace_silencers.rb
562
- - test/dummy/config/initializers/cookies_serializer.rb
563
- - test/dummy/config/initializers/filter_parameter_logging.rb
564
- - test/dummy/config/initializers/inflections.rb
565
- - test/dummy/config/initializers/mime_types.rb
566
- - test/dummy/config/initializers/new_framework_defaults.rb
567
- - test/dummy/config/initializers/session_store.rb
568
- - test/dummy/config/initializers/wrap_parameters.rb
569
- - test/dummy/config/locales/en.yml
570
- - test/dummy/config/puma.rb
571
- - test/dummy/config/routes.rb
572
- - test/dummy/config/secrets.yml
573
- - test/dummy/config/spring.rb
574
- - test/dummy/db/development.sqlite3
575
- - test/dummy/lib/assets/.keep
576
- - test/dummy/log/.keep
577
- - test/dummy/log/development.log
578
- - test/dummy/public/404.html
579
- - test/dummy/public/422.html
580
- - test/dummy/public/500.html
581
- - test/dummy/public/apple-touch-icon-precomposed.png
582
- - test/dummy/public/apple-touch-icon.png
583
- - test/dummy/public/favicon.ico
584
- - test/dummy/tmp/.keep
585
- - test/integration/navigation_test.rb
586
- - test/test_helper.rb
587
- - test/thecore_settings_test.rb
File without changes
File without changes
File without changes
@@ -1,20 +0,0 @@
1
- /*
2
- This file defines the default set of CSS styles available in the Rich editor
3
- */
4
-
5
- p.caption {
6
- font-style: italic;
7
- color: grey;
8
- }
9
-
10
- span.highlight {
11
- background: yellow;
12
- }
13
-
14
- img.left {
15
- float: left;
16
- }
17
-
18
- img.right {
19
- float: right;
20
- }
File without changes
File without changes
data/app/helpers/.keep DELETED
File without changes
data/app/mailers/.keep DELETED
File without changes
@@ -1,2 +0,0 @@
1
- //= require rich/base
2
-
@@ -1,22 +0,0 @@
1
- module ThecoreSettings
2
- module RailsAdminExtensionConfig
3
- def self.included(base)
4
- # IMPORTANT: To extend rails admin section in model, directly, instead of using concerns, I can
5
- # extend the included method. Be sure to use a different module name, otherwis it will be overwritten
6
- # See thecore_settings_rails_admin_model_extensions.rb initializer for a reference
7
- # on how to extend rails_admin section of a model previously defined (say it's defined in another gem)
8
- if base.respond_to?(:rails_admin)
9
- base.rails_admin do
10
- navigation_icon 'fa fa-cogs'
11
- end
12
- end
13
-
14
- def display_name
15
- "#{I18n.t "settings.namespaces.#{ns}", default: ns.titleize}: #{I18n.t "settings.names.#{name}", default: name.titleize}"
16
- end
17
- end
18
- end
19
- end
20
-
21
- # include the extension (loving mixins)
22
- ThecoreSettings::Setting.send(:include, ThecoreSettings::RailsAdminExtensionConfig)
@@ -1,22 +0,0 @@
1
- require 'active_support/concern'
2
-
3
- module TheCoreSettingsAbilitiesConcern
4
- extend ActiveSupport::Concern
5
- included do
6
- def thecore_settings_abilities user
7
- # Rails.logger.debug "Cannot Create"
8
- cannot :create, ThecoreSettings::Setting
9
- # Rails.logger.debug "Cannot Delete"
10
- cannot :destroy, ThecoreSettings::Setting
11
- cannot :show, ThecoreSettings::Setting
12
-
13
- # cannot :manage, [ThecoreSettings::Setting]
14
- # cannot :dashboard, [ThecoreSettings::Setting]
15
- # # Pay attention to this errorTypeError (can't convert Class to Array (Class#to_ary gives String)):
16
- # can [:index, :update], [ThecoreSettings::Setting] if user && user.admin?
17
- end
18
- end
19
- end
20
-
21
- # include the extension
22
- TheCoreAbilities.send(:include, TheCoreSettingsAbilitiesConcern)
@@ -1,4 +0,0 @@
1
- Rails.application.configure do
2
- config.after_initialize do
3
- end
4
- end
data/config/routes.rb DELETED
@@ -1,3 +0,0 @@
1
- Rails.application.routes.draw do
2
- # mount Rich::Engine => '/rich', :as => 'rich'
3
- end
@@ -1,5 +0,0 @@
1
- class AddAppName < ActiveRecord::Migration[5.0]
2
- def change
3
- Settings.app_name = "The Core by Gabriele Tassoni"
4
- end
5
- end
@@ -1,29 +0,0 @@
1
- class CreateThecoreSettings < ActiveRecord::Migration[5.0]
2
- def change
3
- create_table :thecore_settings do |t|
4
- t.boolean :enabled, default: true
5
- t.string :kind, null: false, default: 'string'
6
- t.string :ns, default: 'main'
7
- t.string :key, null: false
8
- if Object.const_defined?('Geocoder')
9
- t.float :latitude
10
- t.float :longitude
11
- end
12
- t.text :raw
13
- t.string :label
14
- if defined?(Paperclip)
15
- t.attachment :file
16
- elsif defined?(CarrierWave)
17
- t.string :file
18
- elsif defined?(Shrine)
19
- t.text :file_data
20
-
21
- end
22
- t.timestamps
23
- end
24
-
25
- add_index :thecore_settings, :key
26
- add_index :thecore_settings, [:ns, :key], unique: true
27
- end
28
- end
29
-
@@ -1,4 +0,0 @@
1
- # desc "Explaining what the task does"
2
- # task :thecore_settings do
3
- # # Task goes here
4
- # end
data/log/development.log DELETED
File without changes
data/test/dummy/Rakefile DELETED
@@ -1,6 +0,0 @@
1
- # Add your own tasks in files placed in lib/tasks ending in .rake,
2
- # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
-
4
- require_relative 'config/application'
5
-
6
- Rails.application.load_tasks
@@ -1,4 +0,0 @@
1
-
2
- //= link_tree ../images
3
- //= link_directory ../javascripts .js
4
- //= link_directory ../stylesheets .css
File without changes
@@ -1,13 +0,0 @@
1
- // This is a manifest file that'll be compiled into application.js, which will include all the files
2
- // listed below.
3
- //
4
- // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
- // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6
- //
7
- // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
- // compiled file. JavaScript code in this file should be added after the last require_* statement.
9
- //
10
- // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
- // about supported directives.
12
- //
13
- //= require_tree .
@@ -1,13 +0,0 @@
1
- // Action Cable provides the framework to deal with WebSockets in Rails.
2
- // You can generate new channels where WebSocket features live using the rails generate channel command.
3
- //
4
- //= require action_cable
5
- //= require_self
6
- //= require_tree ./channels
7
-
8
- (function() {
9
- this.App || (this.App = {});
10
-
11
- App.cable = ActionCable.createConsumer();
12
-
13
- }).call(this);
File without changes
@@ -1,15 +0,0 @@
1
- /*
2
- * This is a manifest file that'll be compiled into application.css, which will include all the files
3
- * listed below.
4
- *
5
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
- * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
- *
8
- * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
- * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
10
- * files in this directory. Styles in this file should be added after the last require_* statement.
11
- * It is generally better to create a new file per style scope.
12
- *
13
- *= require_tree .
14
- *= require_self
15
- */
@@ -1,4 +0,0 @@
1
- module ApplicationCable
2
- class Channel < ActionCable::Channel::Base
3
- end
4
- end
@@ -1,4 +0,0 @@
1
- module ApplicationCable
2
- class Connection < ActionCable::Connection::Base
3
- end
4
- end
@@ -1,3 +0,0 @@
1
- class ApplicationController < ActionController::Base
2
- protect_from_forgery with: :exception
3
- end
File without changes
@@ -1,2 +0,0 @@
1
- module ApplicationHelper
2
- end
@@ -1,2 +0,0 @@
1
- class ApplicationJob < ActiveJob::Base
2
- end
@@ -1,4 +0,0 @@
1
- class ApplicationMailer < ActionMailer::Base
2
- default from: 'from@example.com'
3
- layout 'mailer'
4
- end
@@ -1,3 +0,0 @@
1
- class ApplicationRecord < ActiveRecord::Base
2
- self.abstract_class = true
3
- end
File without changes
@@ -1,14 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Dummy</title>
5
- <%= csrf_meta_tags %>
6
-
7
- <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
8
- <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
9
- </head>
10
-
11
- <body>
12
- <%= yield %>
13
- </body>
14
- </html>