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.
- checksums.yaml +4 -4
- data/Gemfile.lock +13 -14
- data/config/locales/{thecore_settings.it.yml → it.yml} +0 -0
- data/db/migrate/{20161227101954_create_rails_admin_settings.rb → 20161227101955_create_thecore_settings.rb} +1 -1
- data/db/migrate/20210825113515_migrate_from_rails_admin_settings_to_thecore_settings.rb +22 -0
- data/lib/thecore_settings/engine.rb +11 -10
- data/lib/thecore_settings.rb +1 -1
- metadata +5 -145
- data/app/assets/config/thecore_settings_manifest.js +0 -0
- data/app/assets/images/thecore_settings/.keep +0 -0
- data/app/assets/javascripts/thecore_settings/.keep +0 -0
- data/app/assets/stylesheets/rich/editor.css +0 -20
- data/app/assets/stylesheets/thecore_settings/.keep +0 -0
- data/app/controllers/.keep +0 -0
- data/app/helpers/.keep +0 -0
- data/app/mailers/.keep +0 -0
- data/assets/javascripts/rails_admin/custom/thecore_settings.rb +0 -2
- data/config/initializers/rails_admin_requirements.rb +0 -22
- data/config/initializers/thecore_settings_abilities.rb +0 -22
- data/config/initializers/thecore_settings_post_init.rb +0 -4
- data/config/routes.rb +0 -3
- data/db/migrate/20161227101956_add_app_name.rb +0 -5
- data/lib/generators/thecore_settings/templates/db/migrate/20161227101954_create_thecore_settings.rb +0 -29
- data/lib/tasks/thecore_settings_tasks.rake +0 -4
- data/log/development.log +0 -0
- data/test/dummy/Rakefile +0 -6
- data/test/dummy/app/assets/config/manifest.js +0 -4
- data/test/dummy/app/assets/images/.keep +0 -0
- data/test/dummy/app/assets/javascripts/application.js +0 -13
- data/test/dummy/app/assets/javascripts/cable.js +0 -13
- data/test/dummy/app/assets/javascripts/channels/.keep +0 -0
- data/test/dummy/app/assets/stylesheets/application.css +0 -15
- data/test/dummy/app/channels/application_cable/channel.rb +0 -4
- data/test/dummy/app/channels/application_cable/connection.rb +0 -4
- data/test/dummy/app/controllers/application_controller.rb +0 -3
- data/test/dummy/app/controllers/concerns/.keep +0 -0
- data/test/dummy/app/helpers/application_helper.rb +0 -2
- data/test/dummy/app/jobs/application_job.rb +0 -2
- data/test/dummy/app/mailers/application_mailer.rb +0 -4
- data/test/dummy/app/models/application_record.rb +0 -3
- data/test/dummy/app/models/concerns/.keep +0 -0
- data/test/dummy/app/views/layouts/application.html.erb +0 -14
- data/test/dummy/app/views/layouts/mailer.html.erb +0 -13
- data/test/dummy/app/views/layouts/mailer.text.erb +0 -1
- data/test/dummy/bin/bundle +0 -3
- data/test/dummy/bin/rails +0 -4
- data/test/dummy/bin/rake +0 -4
- data/test/dummy/bin/setup +0 -34
- data/test/dummy/bin/update +0 -29
- data/test/dummy/config/application.rb +0 -15
- data/test/dummy/config/boot.rb +0 -5
- data/test/dummy/config/cable.yml +0 -9
- data/test/dummy/config/database.yml +0 -25
- data/test/dummy/config/environment.rb +0 -5
- data/test/dummy/config/environments/development.rb +0 -54
- data/test/dummy/config/environments/production.rb +0 -86
- data/test/dummy/config/environments/test.rb +0 -42
- data/test/dummy/config/initializers/application_controller_renderer.rb +0 -6
- data/test/dummy/config/initializers/assets.rb +0 -11
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/test/dummy/config/initializers/cookies_serializer.rb +0 -5
- data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
- data/test/dummy/config/initializers/inflections.rb +0 -16
- data/test/dummy/config/initializers/mime_types.rb +0 -4
- data/test/dummy/config/initializers/new_framework_defaults.rb +0 -24
- data/test/dummy/config/initializers/session_store.rb +0 -3
- data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/test/dummy/config/locales/en.yml +0 -23
- data/test/dummy/config/puma.rb +0 -47
- data/test/dummy/config/routes.rb +0 -3
- data/test/dummy/config/secrets.yml +0 -22
- data/test/dummy/config/spring.rb +0 -6
- data/test/dummy/config.ru +0 -5
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/lib/assets/.keep +0 -0
- data/test/dummy/log/.keep +0 -0
- data/test/dummy/log/development.log +0 -16
- data/test/dummy/public/404.html +0 -67
- data/test/dummy/public/422.html +0 -67
- data/test/dummy/public/500.html +0 -66
- data/test/dummy/public/apple-touch-icon-precomposed.png +0 -0
- data/test/dummy/public/apple-touch-icon.png +0 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/tmp/.keep +0 -0
- data/test/integration/navigation_test.rb +0 -8
- data/test/test_helper.rb +0 -19
- data/test/thecore_settings_test.rb +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0fbb95cf02a044f75c3e5ccda3540068836c14dac1576fa32f0401f6389e47a
|
4
|
+
data.tar.gz: 4dd06053f1661529b953859ab5ecf5c7e9f46fa89566411e8387cf298c9ee73c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
200
|
+
rubocop-ast (1.12.0)
|
201
201
|
parser (>= 3.0.1.1)
|
202
|
-
rubocop-rspec (2.
|
203
|
-
rubocop (~> 1.
|
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.
|
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
|
@@ -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
|
data/lib/thecore_settings.rb
CHANGED
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
|
+
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:
|
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
|
-
-
|
368
|
-
-
|
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
|
data/app/controllers/.keep
DELETED
File without changes
|
data/app/helpers/.keep
DELETED
File without changes
|
data/app/mailers/.keep
DELETED
File without changes
|
@@ -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)
|
data/config/routes.rb
DELETED
data/lib/generators/thecore_settings/templates/db/migrate/20161227101954_create_thecore_settings.rb
DELETED
@@ -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
|
-
|
data/log/development.log
DELETED
File without changes
|
data/test/dummy/Rakefile
DELETED
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
|
-
*/
|
File without changes
|
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>
|