refactor: repo (#1070)
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# ApplicationController.renderer.defaults.merge!(
|
||||
# http_host: 'example.org',
|
||||
# https: false
|
||||
# )
|
||||
6
packages/web-server/config/initializers/assets.rb
Normal file
6
packages/web-server/config/initializers/assets.rb
Normal file
@@ -0,0 +1,6 @@
|
||||
# Version of your assets, change this if you want to expire all your assets.
|
||||
Rails.application.config.assets.version = '1.1'
|
||||
|
||||
Rails.application.config.assets.paths << Rails.root.join('..', 'web', 'dist')
|
||||
|
||||
Rails.application.config.assets.precompile += ['app.js', 'app.css']
|
||||
@@ -0,0 +1,7 @@
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
||||
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
||||
|
||||
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
||||
# Rails.backtrace_cleaner.remove_silencers!
|
||||
@@ -0,0 +1,5 @@
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# Specify a serializer for the signed and encrypted cookie jars.
|
||||
# Valid options are :json, :marshal, and :hybrid.
|
||||
Rails.application.config.action_dispatch.cookies_serializer = :json
|
||||
@@ -0,0 +1,4 @@
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# Configure sensitive parameters which will be filtered from the log file.
|
||||
Rails.application.config.filter_parameters += [:password]
|
||||
16
packages/web-server/config/initializers/inflections.rb
Normal file
16
packages/web-server/config/initializers/inflections.rb
Normal file
@@ -0,0 +1,16 @@
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# Add new inflection rules using the following format. Inflections
|
||||
# are locale specific, and you may define rules for as many different
|
||||
# locales as you wish. All of these examples are active by default:
|
||||
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
||||
# inflect.plural /^(ox)$/i, '\1en'
|
||||
# inflect.singular /^(ox)en/i, '\1'
|
||||
# inflect.irregular 'person', 'people'
|
||||
# inflect.uncountable %w( fish sheep )
|
||||
# end
|
||||
|
||||
# These inflection rules are supported but not enabled by default:
|
||||
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
||||
# inflect.acronym 'RESTful'
|
||||
# end
|
||||
9
packages/web-server/config/initializers/json.rb
Normal file
9
packages/web-server/config/initializers/json.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
# fix for JSON deprecation warnings. See: https://github.com/flori/json/issues/399#issuecomment-734863279
|
||||
|
||||
module JSON
|
||||
module_function
|
||||
|
||||
def parse(source, opts = {})
|
||||
Parser.new(source, **opts).parse
|
||||
end
|
||||
end
|
||||
7
packages/web-server/config/initializers/lograge.rb
Normal file
7
packages/web-server/config/initializers/lograge.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
Rails.application.configure do
|
||||
config.lograge.enabled = true
|
||||
|
||||
# Generate log in JSON
|
||||
config.lograge.formatter = Lograge::Formatters::Json.new
|
||||
config.lograge.ignore_actions = ['HealthCheckController#index']
|
||||
end
|
||||
4
packages/web-server/config/initializers/mime_types.rb
Normal file
4
packages/web-server/config/initializers/mime_types.rb
Normal file
@@ -0,0 +1,4 @@
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# Add new mime types for use in respond_to blocks:
|
||||
# Mime::Type.register "text/richtext", :rtf
|
||||
@@ -0,0 +1,23 @@
|
||||
# Be sure to restart your server when you modify this file.
|
||||
#
|
||||
# This file contains migration options to ease your Rails 5.0 upgrade.
|
||||
#
|
||||
# Once upgraded flip defaults one by one to migrate to the new default.
|
||||
#
|
||||
# Read the Rails 5.0 release notes for more info on each option.
|
||||
|
||||
# Enable per-form CSRF tokens. Previous versions had false.
|
||||
Rails.application.config.action_controller.per_form_csrf_tokens = false
|
||||
|
||||
# Enable origin-checking CSRF mitigation. Previous versions had false.
|
||||
Rails.application.config.action_controller.forgery_protection_origin_check = false
|
||||
|
||||
# Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`.
|
||||
# Previous versions had false.
|
||||
ActiveSupport.to_time_preserves_timezone = false
|
||||
|
||||
# Require `belongs_to` associations by default. Previous versions had false.
|
||||
# Rails.application.config.active_record.belongs_to_required_by_default = false
|
||||
|
||||
# Do not halt callback chains when a callback returns false. Previous versions had true.
|
||||
ActiveSupport.halt_callback_chains_on_return_false = true
|
||||
3
packages/web-server/config/initializers/session_store.rb
Normal file
3
packages/web-server/config/initializers/session_store.rb
Normal file
@@ -0,0 +1,3 @@
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
Rails.application.config.session_store :cookie_store, key: '_sn_session'
|
||||
14
packages/web-server/config/initializers/wrap_parameters.rb
Normal file
14
packages/web-server/config/initializers/wrap_parameters.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# This file contains settings for ActionController::ParamsWrapper which
|
||||
# is enabled by default.
|
||||
|
||||
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
||||
ActiveSupport.on_load(:action_controller) do
|
||||
wrap_parameters format: [:json]
|
||||
end
|
||||
|
||||
# To enable root element in JSON for ActiveRecord objects.
|
||||
# ActiveSupport.on_load(:active_record) do
|
||||
# self.include_root_in_json = true
|
||||
# end
|
||||
Reference in New Issue
Block a user