themes 0.0.5 → 0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (189) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +52 -10
  3. data/lib/generators/themes/templates/theme_loader.rb.erb +3 -4
  4. data/lib/themes.rb +42 -5
  5. data/lib/themes/base_loader.rb +22 -0
  6. data/lib/themes/default_loader.rb +18 -0
  7. data/lib/themes/engine.rb +32 -15
  8. data/lib/themes/helpers.rb +2 -2
  9. data/lib/themes/middleware.rb +13 -0
  10. data/lib/themes/version.rb +1 -1
  11. data/spec/config/themes/test2_loader.rb +7 -0
  12. data/spec/config/themes/test_loader.rb +7 -0
  13. data/spec/configdb/themes/testdb2_loader.rb +5 -0
  14. data/spec/configdb/themes/testdb_loader.rb +5 -0
  15. data/spec/dummy3/config/themes +1 -0
  16. data/spec/dummy3/log/test.log +441 -0
  17. data/spec/dummy3db/README.rdoc +261 -0
  18. data/spec/dummy3db/Rakefile +7 -0
  19. data/spec/dummy3db/app +1 -0
  20. data/spec/dummy3db/config.ru +4 -0
  21. data/spec/dummy3db/config/application.rb +60 -0
  22. data/spec/dummy3db/config/boot.rb +10 -0
  23. data/spec/dummy3db/config/database.yml +26 -0
  24. data/spec/dummy3db/config/environment.rb +5 -0
  25. data/spec/dummy3db/config/environments/development.rb +37 -0
  26. data/spec/dummy3db/config/environments/production.rb +67 -0
  27. data/spec/dummy3db/config/environments/test.rb +37 -0
  28. data/spec/dummy3db/config/initializers/backtrace_silencers.rb +7 -0
  29. data/spec/dummy3db/config/initializers/inflections.rb +15 -0
  30. data/spec/dummy3db/config/initializers/mime_types.rb +5 -0
  31. data/spec/dummy3db/config/initializers/secret_token.rb +7 -0
  32. data/spec/dummy3db/config/initializers/session_store.rb +8 -0
  33. data/spec/dummy3db/config/initializers/wrap_parameters.rb +14 -0
  34. data/spec/dummy3db/config/locales/en.yml +5 -0
  35. data/spec/dummy3db/config/routes.rb +58 -0
  36. data/spec/dummy3db/config/themes +1 -0
  37. data/spec/dummy3db/log/test.log +764 -0
  38. data/spec/dummy3db/public/404.html +26 -0
  39. data/spec/dummy3db/public/422.html +26 -0
  40. data/spec/dummy3db/public/500.html +25 -0
  41. data/spec/{dummy/log/test.log → dummy3db/public/favicon.ico} +0 -0
  42. data/spec/dummy3db/script/rails +6 -0
  43. data/spec/dummy4/config/themes +1 -0
  44. data/spec/dummy4/log/test.log +322 -0
  45. data/spec/dummy4db/README.rdoc +261 -0
  46. data/spec/dummy4db/Rakefile +7 -0
  47. data/spec/dummy4db/app +1 -0
  48. data/spec/dummy4db/bin/bundle +3 -0
  49. data/spec/dummy4db/bin/rails +4 -0
  50. data/spec/dummy4db/bin/rake +4 -0
  51. data/spec/dummy4db/bin/setup +29 -0
  52. data/spec/dummy4db/config.ru +4 -0
  53. data/spec/dummy4db/config/application.rb +27 -0
  54. data/spec/dummy4db/config/boot.rb +3 -0
  55. data/spec/dummy4db/config/database.yml +26 -0
  56. data/spec/dummy4db/config/environment.rb +5 -0
  57. data/spec/dummy4db/config/environments/development.rb +41 -0
  58. data/spec/dummy4db/config/environments/production.rb +79 -0
  59. data/spec/dummy4db/config/environments/test.rb +42 -0
  60. data/spec/dummy4db/config/initializers/assets.rb +11 -0
  61. data/spec/dummy4db/config/initializers/backtrace_silencers.rb +7 -0
  62. data/spec/dummy4db/config/initializers/cookies_serializer.rb +3 -0
  63. data/spec/dummy4db/config/initializers/filter_parameter_logging.rb +4 -0
  64. data/spec/dummy4db/config/initializers/inflections.rb +16 -0
  65. data/spec/dummy4db/config/initializers/mime_types.rb +4 -0
  66. data/spec/dummy4db/config/initializers/secret_token.rb +12 -0
  67. data/spec/dummy4db/config/initializers/session_store.rb +3 -0
  68. data/spec/dummy4db/config/initializers/wrap_parameters.rb +14 -0
  69. data/spec/dummy4db/config/locales/en.yml +23 -0
  70. data/spec/dummy4db/config/routes.rb +57 -0
  71. data/spec/dummy4db/config/secrets.yml +22 -0
  72. data/spec/dummy4db/config/themes +1 -0
  73. data/spec/dummy4db/log/test.log +550 -0
  74. data/spec/dummy4db/public/404.html +26 -0
  75. data/spec/dummy4db/public/422.html +26 -0
  76. data/spec/dummy4db/public/500.html +25 -0
  77. data/spec/dummy4db/public/favicon.ico +0 -0
  78. data/spec/dummy4db/script/rails +6 -0
  79. data/spec/dummy5/config/themes +1 -0
  80. data/spec/dummy5/log/test.log +380 -0
  81. data/spec/dummy5db/README.rdoc +261 -0
  82. data/spec/dummy5db/Rakefile +7 -0
  83. data/spec/dummy5db/app +1 -0
  84. data/spec/dummy5db/bin/bundle +3 -0
  85. data/spec/dummy5db/bin/rails +4 -0
  86. data/spec/dummy5db/bin/rake +4 -0
  87. data/spec/dummy5db/bin/setup +36 -0
  88. data/spec/dummy5db/bin/update +31 -0
  89. data/spec/dummy5db/bin/yarn +11 -0
  90. data/spec/dummy5db/config.ru +4 -0
  91. data/spec/dummy5db/config/application.rb +20 -0
  92. data/spec/dummy5db/config/boot.rb +4 -0
  93. data/spec/dummy5db/config/cable.yml +10 -0
  94. data/spec/dummy5db/config/database.yml +26 -0
  95. data/spec/dummy5db/config/environment.rb +5 -0
  96. data/spec/dummy5db/config/environments/development.rb +61 -0
  97. data/spec/dummy5db/config/environments/production.rb +94 -0
  98. data/spec/dummy5db/config/environments/test.rb +46 -0
  99. data/spec/dummy5db/config/initializers/application_controller_renderer.rb +8 -0
  100. data/spec/dummy5db/config/initializers/assets.rb +14 -0
  101. data/spec/dummy5db/config/initializers/backtrace_silencers.rb +7 -0
  102. data/spec/dummy5db/config/initializers/content_security_policy.rb +25 -0
  103. data/spec/dummy5db/config/initializers/cookies_serializer.rb +5 -0
  104. data/spec/dummy5db/config/initializers/filter_parameter_logging.rb +4 -0
  105. data/spec/dummy5db/config/initializers/inflections.rb +16 -0
  106. data/spec/dummy5db/config/initializers/mime_types.rb +4 -0
  107. data/spec/dummy5db/config/initializers/new_framework_defaults_5_2.rb +38 -0
  108. data/spec/dummy5db/config/initializers/secret_token.rb +12 -0
  109. data/spec/dummy5db/config/initializers/session_store.rb +3 -0
  110. data/spec/dummy5db/config/initializers/wrap_parameters.rb +14 -0
  111. data/spec/dummy5db/config/locales/en.yml +33 -0
  112. data/spec/dummy5db/config/routes.rb +4 -0
  113. data/spec/dummy5db/config/secrets.yml +22 -0
  114. data/spec/dummy5db/config/storage.yml +34 -0
  115. data/spec/dummy5db/config/themes +1 -0
  116. data/spec/dummy5db/log/test.log +756 -0
  117. data/spec/dummy5db/public/404.html +26 -0
  118. data/spec/dummy5db/public/422.html +26 -0
  119. data/spec/dummy5db/public/500.html +25 -0
  120. data/spec/dummy5db/public/favicon.ico +0 -0
  121. data/spec/dummy5db/script/rails +6 -0
  122. data/spec/dummy6/config/themes +1 -0
  123. data/spec/dummy6/log/development.log +8 -0
  124. data/spec/dummy6/log/test.log +1555 -0
  125. data/spec/dummy6db/README.rdoc +261 -0
  126. data/spec/dummy6db/Rakefile +7 -0
  127. data/spec/dummy6db/app +1 -0
  128. data/spec/dummy6db/bin/bundle +3 -0
  129. data/spec/dummy6db/bin/rails +4 -0
  130. data/spec/dummy6db/bin/rake +4 -0
  131. data/spec/dummy6db/bin/setup +36 -0
  132. data/spec/dummy6db/bin/update +31 -0
  133. data/spec/dummy6db/bin/yarn +11 -0
  134. data/spec/dummy6db/config.ru +4 -0
  135. data/spec/dummy6db/config/application.rb +20 -0
  136. data/spec/dummy6db/config/boot.rb +3 -0
  137. data/spec/dummy6db/config/cable.yml +10 -0
  138. data/spec/dummy6db/config/database.yml +26 -0
  139. data/spec/dummy6db/config/environment.rb +5 -0
  140. data/spec/dummy6db/config/environments/development.rb +62 -0
  141. data/spec/dummy6db/config/environments/production.rb +112 -0
  142. data/spec/dummy6db/config/environments/test.rb +48 -0
  143. data/spec/dummy6db/config/initializers/application_controller_renderer.rb +8 -0
  144. data/spec/dummy6db/config/initializers/assets.rb +14 -0
  145. data/spec/dummy6db/config/initializers/backtrace_silencers.rb +7 -0
  146. data/spec/dummy6db/config/initializers/content_security_policy.rb +30 -0
  147. data/spec/dummy6db/config/initializers/cookies_serializer.rb +5 -0
  148. data/spec/dummy6db/config/initializers/filter_parameter_logging.rb +4 -0
  149. data/spec/dummy6db/config/initializers/inflections.rb +16 -0
  150. data/spec/dummy6db/config/initializers/mime_types.rb +4 -0
  151. data/spec/dummy6db/config/initializers/new_framework_defaults_5_2.rb +38 -0
  152. data/spec/dummy6db/config/initializers/new_framework_defaults_6_0.rb +45 -0
  153. data/spec/dummy6db/config/initializers/secret_token.rb +12 -0
  154. data/spec/dummy6db/config/initializers/session_store.rb +3 -0
  155. data/spec/dummy6db/config/initializers/wrap_parameters.rb +14 -0
  156. data/spec/dummy6db/config/locales/en.yml +33 -0
  157. data/spec/dummy6db/config/routes.rb +3 -0
  158. data/spec/dummy6db/config/secrets.yml +22 -0
  159. data/spec/dummy6db/config/storage.yml +34 -0
  160. data/spec/dummy6db/config/themes +1 -0
  161. data/spec/dummy6db/log/development.log +8 -0
  162. data/spec/dummy6db/log/test.log +2340 -0
  163. data/spec/dummy6db/public/404.html +26 -0
  164. data/spec/dummy6db/public/422.html +26 -0
  165. data/spec/dummy6db/public/500.html +25 -0
  166. data/spec/dummy6db/public/favicon.ico +0 -0
  167. data/spec/dummy6db/script/rails +6 -0
  168. data/spec/dummy_app_folder/models/theme_store.rb +10 -0
  169. data/spec/dummy_app_folder/views/themes/test2/layouts/application.html.erb +7 -0
  170. data/spec/dummy_app_folder/views/themes/test2/notifier/wellcome_message.html.erb +3 -0
  171. data/spec/dummy_app_folder/views/themes/test2/posts/index.html.erb +1 -0
  172. data/spec/dummy_app_folder/views/themes/testdb/layouts/application.html.erb +7 -0
  173. data/spec/dummy_app_folder/views/themes/testdb/notifier/wellcome_message.html.erb +3 -0
  174. data/spec/dummy_app_folder/views/themes/testdb/posts/index.html.erb +4 -0
  175. data/spec/dummy_app_folder/views/themes/testdb2/layouts/application.html.erb +7 -0
  176. data/spec/dummy_app_folder/views/themes/testdb2/notifier/wellcome_message.html.erb +3 -0
  177. data/spec/dummy_app_folder/views/themes/testdb2/posts/index.html.erb +4 -0
  178. data/spec/features/posts_controller_spec.rb +57 -12
  179. data/spec/generators/new_theme_generator_spec.rb +3 -4
  180. data/spec/mailer/notifier_spec.rb +13 -5
  181. data/spec/spec_helper.rb +1 -0
  182. data/spec/themes_engine_spec.rb +10 -5
  183. data/spec/tmp/config/themes/brand_new_theme.rb +3 -4
  184. metadata +329 -13
  185. data/lib/themes/loader.rb +0 -3
  186. data/spec/dummy3/config/themes/test.rb +0 -8
  187. data/spec/dummy4/config/themes/test.rb +0 -8
  188. data/spec/dummy5/config/themes/test.rb +0 -8
  189. data/spec/dummy6/config/themes/test.rb +0 -8
@@ -0,0 +1,62 @@
1
+ Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # In the development environment your application's code is reloaded on
5
+ # every request. This slows down response time but is perfect for development
6
+ # since you don't have to restart the web server when you make code changes.
7
+ config.cache_classes = false
8
+
9
+ # Do not eager load code on boot.
10
+ config.eager_load = false
11
+
12
+ # Show full error reports.
13
+ config.consider_all_requests_local = true
14
+
15
+ # Enable/disable caching. By default caching is disabled.
16
+ # Run rails dev:cache to toggle caching.
17
+ if Rails.root.join('tmp', 'caching-dev.txt').exist?
18
+ config.action_controller.perform_caching = true
19
+ config.action_controller.enable_fragment_cache_logging = true
20
+
21
+ config.cache_store = :memory_store
22
+ config.public_file_server.headers = {
23
+ 'Cache-Control' => "public, max-age=#{2.days.to_i}"
24
+ }
25
+ else
26
+ config.action_controller.perform_caching = false
27
+
28
+ config.cache_store = :null_store
29
+ end
30
+
31
+ # Store uploaded files on the local file system (see config/storage.yml for options).
32
+ config.active_storage.service = :local
33
+
34
+ # Don't care if the mailer can't send.
35
+ config.action_mailer.raise_delivery_errors = false
36
+
37
+ config.action_mailer.perform_caching = false
38
+
39
+ # Print deprecation notices to the Rails logger.
40
+ config.active_support.deprecation = :log
41
+
42
+ # Raise an error on page load if there are pending migrations.
43
+ config.active_record.migration_error = :page_load
44
+
45
+ # Highlight code that triggered database queries in logs.
46
+ config.active_record.verbose_query_logs = true
47
+
48
+ # Debug mode disables concatenation and preprocessing of assets.
49
+ # This option may cause significant delays in view rendering with a large
50
+ # number of complex assets.
51
+ config.assets.debug = true
52
+
53
+ # Suppress logger output for asset requests.
54
+ config.assets.quiet = true
55
+
56
+ # Raises error for missing translations.
57
+ # config.action_view.raise_on_missing_translations = true
58
+
59
+ # Use an evented file watcher to asynchronously detect changes in source code,
60
+ # routes, locales, etc. This feature depends on the listen gem.
61
+ config.file_watcher = ActiveSupport::EventedFileUpdateChecker
62
+ end
@@ -0,0 +1,112 @@
1
+ Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # Code is not reloaded between requests.
5
+ config.cache_classes = true
6
+
7
+ # Eager load code on boot. This eager loads most of Rails and
8
+ # your application in memory, allowing both threaded web servers
9
+ # and those relying on copy on write to perform better.
10
+ # Rake tasks automatically ignore this option for performance.
11
+ config.eager_load = true
12
+
13
+ # Full error reports are disabled and caching is turned on.
14
+ config.consider_all_requests_local = false
15
+ config.action_controller.perform_caching = true
16
+
17
+ # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
18
+ # or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
19
+ # config.require_master_key = true
20
+
21
+ # Disable serving static files from the `/public` folder by default since
22
+ # Apache or NGINX already handles this.
23
+ config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
24
+
25
+ # Compress CSS using a preprocessor.
26
+ # config.assets.css_compressor = :sass
27
+
28
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
29
+ config.assets.compile = false
30
+
31
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
32
+ # config.action_controller.asset_host = 'http://assets.example.com'
33
+
34
+ # Specifies the header that your server uses for sending files.
35
+ # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
36
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
37
+
38
+ # Store uploaded files on the local file system (see config/storage.yml for options).
39
+ config.active_storage.service = :local
40
+
41
+ # Mount Action Cable outside main process or domain.
42
+ # config.action_cable.mount_path = nil
43
+ # config.action_cable.url = 'wss://example.com/cable'
44
+ # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
45
+
46
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
47
+ # config.force_ssl = true
48
+
49
+ # Use the lowest log level to ensure availability of diagnostic information
50
+ # when problems arise.
51
+ config.log_level = :debug
52
+
53
+ # Prepend all log lines with the following tags.
54
+ config.log_tags = [ :request_id ]
55
+
56
+ # Use a different cache store in production.
57
+ # config.cache_store = :mem_cache_store
58
+
59
+ # Use a real queuing backend for Active Job (and separate queues per environment).
60
+ # config.active_job.queue_adapter = :resque
61
+ # config.active_job.queue_name_prefix = "dummy_production"
62
+
63
+ config.action_mailer.perform_caching = false
64
+
65
+ # Ignore bad email addresses and do not raise email delivery errors.
66
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
67
+ # config.action_mailer.raise_delivery_errors = false
68
+
69
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
70
+ # the I18n.default_locale when a translation cannot be found).
71
+ config.i18n.fallbacks = true
72
+
73
+ # Send deprecation notices to registered listeners.
74
+ config.active_support.deprecation = :notify
75
+
76
+ # Use default logging formatter so that PID and timestamp are not suppressed.
77
+ config.log_formatter = ::Logger::Formatter.new
78
+
79
+ # Use a different logger for distributed setups.
80
+ # require 'syslog/logger'
81
+ # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
82
+
83
+ if ENV["RAILS_LOG_TO_STDOUT"].present?
84
+ logger = ActiveSupport::Logger.new(STDOUT)
85
+ logger.formatter = config.log_formatter
86
+ config.logger = ActiveSupport::TaggedLogging.new(logger)
87
+ end
88
+
89
+ # Do not dump schema after migrations.
90
+ config.active_record.dump_schema_after_migration = false
91
+
92
+ # Inserts middleware to perform automatic connection switching.
93
+ # The `database_selector` hash is used to pass options to the DatabaseSelector
94
+ # middleware. The `delay` is used to determine how long to wait after a write
95
+ # to send a subsequent read to the primary.
96
+ #
97
+ # The `database_resolver` class is used by the middleware to determine which
98
+ # database is appropriate to use based on the time delay.
99
+ #
100
+ # The `database_resolver_context` class is used by the middleware to set
101
+ # timestamps for the last write to the primary. The resolver uses the context
102
+ # class timestamps to determine how long to wait before reading from the
103
+ # replica.
104
+ #
105
+ # By default Rails will store a last write timestamp in the session. The
106
+ # DatabaseSelector middleware is designed as such you can define your own
107
+ # strategy for connection switching and pass that into the middleware through
108
+ # these configuration options.
109
+ # config.active_record.database_selector = { delay: 2.seconds }
110
+ # config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver
111
+ # config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session
112
+ end
@@ -0,0 +1,48 @@
1
+ # The test environment is used exclusively to run your application's
2
+ # test suite. You never need to work with it otherwise. Remember that
3
+ # your test database is "scratch space" for the test suite and is wiped
4
+ # and recreated between test runs. Don't rely on the data there!
5
+
6
+ Rails.application.configure do
7
+ # Settings specified here will take precedence over those in config/application.rb.
8
+
9
+ config.cache_classes = true
10
+
11
+ # Do not eager load code on boot. This avoids loading your whole application
12
+ # just for the purpose of running a single test. If you are using a tool that
13
+ # preloads Rails for running tests, you may have to set it to true.
14
+ config.eager_load = false
15
+
16
+ # Configure public file server for tests with Cache-Control for performance.
17
+ config.public_file_server.enabled = true
18
+ config.public_file_server.headers = {
19
+ 'Cache-Control' => "public, max-age=#{1.hour.to_i}"
20
+ }
21
+
22
+ # Show full error reports and disable caching.
23
+ config.consider_all_requests_local = true
24
+ config.action_controller.perform_caching = false
25
+ config.cache_store = :null_store
26
+
27
+ # Raise exceptions instead of rendering exception templates.
28
+ config.action_dispatch.show_exceptions = false
29
+
30
+ # Disable request forgery protection in test environment.
31
+ config.action_controller.allow_forgery_protection = false
32
+
33
+ # Store uploaded files on the local file system in a temporary directory.
34
+ config.active_storage.service = :test
35
+
36
+ config.action_mailer.perform_caching = false
37
+
38
+ # Tell Action Mailer not to deliver emails to the real world.
39
+ # The :test delivery method accumulates sent emails in the
40
+ # ActionMailer::Base.deliveries array.
41
+ config.action_mailer.delivery_method = :test
42
+
43
+ # Print deprecation notices to the stderr.
44
+ config.active_support.deprecation = :stderr
45
+
46
+ # Raises error for missing translations.
47
+ # config.action_view.raise_on_missing_translations = true
48
+ end
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # ActiveSupport::Reloader.to_prepare do
4
+ # ApplicationController.renderer.defaults.merge!(
5
+ # http_host: 'example.org',
6
+ # https: false
7
+ # )
8
+ # end
@@ -0,0 +1,14 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Version of your assets, change this if you want to expire all your assets.
4
+ Rails.application.config.assets.version = '1.0'
5
+
6
+ # Add additional assets to the asset load path.
7
+ # Rails.application.config.assets.paths << Emoji.images_path
8
+ # Add Yarn node_modules folder to the asset load path.
9
+ Rails.application.config.assets.paths << Rails.root.join('node_modules')
10
+
11
+ # Precompile additional assets.
12
+ # application.js, application.css, and all non-JS/CSS in the app/assets
13
+ # folder are already added.
14
+ # Rails.application.config.assets.precompile += %w( admin.js admin.css )
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
+ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
+
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
+ # Rails.backtrace_cleaner.remove_silencers!
@@ -0,0 +1,30 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Define an application-wide content security policy
4
+ # For further information see the following documentation
5
+ # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
6
+
7
+ # Rails.application.config.content_security_policy do |policy|
8
+ # policy.default_src :self, :https
9
+ # policy.font_src :self, :https, :data
10
+ # policy.img_src :self, :https, :data
11
+ # policy.object_src :none
12
+ # policy.script_src :self, :https
13
+ # policy.style_src :self, :https
14
+ # # If you are using webpack-dev-server then specify webpack-dev-server host
15
+ # policy.connect_src :self, :https, "http://localhost:3035", "ws://localhost:3035" if Rails.env.development?
16
+
17
+ # # Specify URI for violation reports
18
+ # # policy.report_uri "/csp-violation-report-endpoint"
19
+ # end
20
+
21
+ # If you are using UJS then enable automatic nonce generation
22
+ # Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) }
23
+
24
+ # Set the nonce only to specific directives
25
+ # Rails.application.config.content_security_policy_nonce_directives = %w(script-src)
26
+
27
+ # Report CSP violations to a specified URI
28
+ # For further information see the following documentation:
29
+ # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
30
+ # Rails.application.config.content_security_policy_report_only = true
@@ -0,0 +1,5 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Specify a serializer for the signed and encrypted cookie jars.
4
+ # Valid options are :json, :marshal, and :hybrid.
5
+ Rails.application.config.action_dispatch.cookies_serializer = :json
@@ -0,0 +1,4 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Configure sensitive parameters which will be filtered from the log file.
4
+ Rails.application.config.filter_parameters += [:password]
@@ -0,0 +1,16 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format. Inflections
4
+ # are locale specific, and you may define rules for as many different
5
+ # locales as you wish. All of these examples are active by default:
6
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
7
+ # inflect.plural /^(ox)$/i, '\1en'
8
+ # inflect.singular /^(ox)en/i, '\1'
9
+ # inflect.irregular 'person', 'people'
10
+ # inflect.uncountable %w( fish sheep )
11
+ # end
12
+
13
+ # These inflection rules are supported but not enabled by default:
14
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
15
+ # inflect.acronym 'RESTful'
16
+ # end
@@ -0,0 +1,4 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
@@ -0,0 +1,38 @@
1
+ # Be sure to restart your server when you modify this file.
2
+ #
3
+ # This file contains migration options to ease your Rails 5.2 upgrade.
4
+ #
5
+ # Once upgraded flip defaults one by one to migrate to the new default.
6
+ #
7
+ # Read the Guide for Upgrading Ruby on Rails for more info on each option.
8
+
9
+ # Make Active Record use stable #cache_key alongside new #cache_version method.
10
+ # This is needed for recyclable cache keys.
11
+ # Rails.application.config.active_record.cache_versioning = true
12
+
13
+ # Use AES-256-GCM authenticated encryption for encrypted cookies.
14
+ # Also, embed cookie expiry in signed or encrypted cookies for increased security.
15
+ #
16
+ # This option is not backwards compatible with earlier Rails versions.
17
+ # It's best enabled when your entire app is migrated and stable on 5.2.
18
+ #
19
+ # Existing cookies will be converted on read then written with the new scheme.
20
+ # Rails.application.config.action_dispatch.use_authenticated_cookie_encryption = true
21
+
22
+ # Use AES-256-GCM authenticated encryption as default cipher for encrypting messages
23
+ # instead of AES-256-CBC, when use_authenticated_message_encryption is set to true.
24
+ # Rails.application.config.active_support.use_authenticated_message_encryption = true
25
+
26
+ # Add default protection from forgery to ActionController::Base instead of in
27
+ # ApplicationController.
28
+ # Rails.application.config.action_controller.default_protect_from_forgery = true
29
+
30
+ # Store boolean values are in sqlite3 databases as 1 and 0 instead of 't' and
31
+ # 'f' after migrating old data.
32
+ # Rails.application.config.active_record.sqlite3.represent_boolean_as_integer = true
33
+
34
+ # Use SHA-1 instead of MD5 to generate non-sensitive digests, such as the ETag header.
35
+ # Rails.application.config.active_support.use_sha1_digests = true
36
+
37
+ # Make `form_with` generate id attributes for any generated HTML tags.
38
+ # Rails.application.config.action_view.form_with_generates_ids = true
@@ -0,0 +1,45 @@
1
+ # Be sure to restart your server when you modify this file.
2
+ #
3
+ # This file contains migration options to ease your Rails 6.0 upgrade.
4
+ #
5
+ # Once upgraded flip defaults one by one to migrate to the new default.
6
+ #
7
+ # Read the Guide for Upgrading Ruby on Rails for more info on each option.
8
+
9
+ # Don't force requests from old versions of IE to be UTF-8 encoded.
10
+ # Rails.application.config.action_view.default_enforce_utf8 = false
11
+
12
+ # Embed purpose and expiry metadata inside signed and encrypted
13
+ # cookies for increased security.
14
+ #
15
+ # This option is not backwards compatible with earlier Rails versions.
16
+ # It's best enabled when your entire app is migrated and stable on 6.0.
17
+ # Rails.application.config.action_dispatch.use_cookies_with_metadata = true
18
+
19
+ # Change the return value of `ActionDispatch::Response#content_type` to Content-Type header without modification.
20
+ # Rails.application.config.action_dispatch.return_only_media_type_on_content_type = false
21
+
22
+ # Return false instead of self when enqueuing is aborted from a callback.
23
+ # Rails.application.config.active_job.return_false_on_aborted_enqueue = true
24
+
25
+ # Send Active Storage analysis and purge jobs to dedicated queues.
26
+ # Rails.application.config.active_storage.queues.analysis = :active_storage_analysis
27
+ # Rails.application.config.active_storage.queues.purge = :active_storage_purge
28
+
29
+ # When assigning to a collection of attachments declared via `has_many_attached`, replace existing
30
+ # attachments instead of appending. Use #attach to add new attachments without replacing existing ones.
31
+ # Rails.application.config.active_storage.replace_on_assign_to_many = true
32
+
33
+ # Use ActionMailer::MailDeliveryJob for sending parameterized and normal mail.
34
+ #
35
+ # The default delivery jobs (ActionMailer::Parameterized::DeliveryJob, ActionMailer::DeliveryJob),
36
+ # will be removed in Rails 6.1. This setting is not backwards compatible with earlier Rails versions.
37
+ # If you send mail in the background, job workers need to have a copy of
38
+ # MailDeliveryJob to ensure all delivery jobs are processed properly.
39
+ # Make sure your entire app is migrated and stable on 6.0 before using this setting.
40
+ # Rails.application.config.action_mailer.delivery_job = "ActionMailer::MailDeliveryJob"
41
+
42
+ # Enable the same cache key to be reused when the object being cached of type
43
+ # `ActiveRecord::Relation` changes by moving the volatile information (max updated at and count)
44
+ # of the relation's cache key into the cache version to support recycling cache key.
45
+ # Rails.application.config.active_record.collection_cache_versioning = true
@@ -0,0 +1,12 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key is used for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+
6
+ # Make sure the secret is at least 30 characters and all random,
7
+ # no regular words or you'll be exposed to dictionary attacks.
8
+ # You can use `rake secret` to generate a secure secret key.
9
+
10
+ # Make sure your secret_key_base is kept private
11
+ # if you're sharing your code publicly.
12
+ Dummy::Application.config.secret_key_base = '21eb9ba70ea7174e26cd1795bf9b89266e855c21e92518f29aeae429cc7f21bc02ab111b7f048ad146eebc8900358d492f8b4c651e9020d723402c5d6fa4226d'
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Rails.application.config.session_store :cookie_store, key: '_dummy_session'
@@ -0,0 +1,14 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # This file contains settings for ActionController::ParamsWrapper which
4
+ # is enabled by default.
5
+
6
+ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
+ ActiveSupport.on_load(:action_controller) do
8
+ wrap_parameters format: [:json]
9
+ end
10
+
11
+ # To enable root element in JSON for ActiveRecord objects.
12
+ # ActiveSupport.on_load(:active_record) do
13
+ # self.include_root_in_json = true
14
+ # end