diff --git a/config.ru b/config.ru index fdae919..88b28b7 100644 --- a/config.ru +++ b/config.ru @@ -1,3 +1,3 @@ require ::File.expand_path('../config/environment', __FILE__) -run Ensl::Application +run Rails.application diff --git a/config/environments/development.rb b/config/environments/development.rb index 43fd377..a785593 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -1,4 +1,4 @@ -Ensl::Application.configure do +Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb # In the development environment your application's code is reloaded on @@ -27,10 +27,7 @@ Ensl::Application.configure do # Expands the lines which load the assets config.assets.debug = true - - # Use a different cache store - config.cache_store = :dalli_store, 'memcached' - + # Enable threaded mode # config.threadsafe! config.eager_load = false diff --git a/config/environments/production.rb b/config/environments/production.rb index d18732a..f027b7e 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -1,19 +1,22 @@ -Ensl::Application.configure do +Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb + # Load app models at start + config.eager_load = true + # Code is not reloaded between requests config.cache_classes = true + config.action_controller.perform_caching = true # Full error reports are disabled and caching is turned on config.consider_all_requests_local = false - config.action_controller.perform_caching = true # Disable Rails's static asset server (Apache or nginx will already do this) - config.serve_static_assets = false + config.serve_static_assets = true # Compress JavaScripts and CSS config.assets.compress = true - # config.assets.js_compressor = :uglifier + # config.assets.js_compressor = Uglifier.new(harmony: true) # Don't fallback to assets pipeline if a precompiled asset is missed config.assets.compile = true @@ -21,55 +24,18 @@ Ensl::Application.configure do # Generate digests for assets URLs config.assets.digest = true - # Defaults to Rails.root.join("public/assets") - # config.assets.manifest = YOUR_PATH - - # Specifies the header that your server uses for sending files - # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache - config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx - # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - # config.force_ssl = true + config.force_ssl = false # See everything in the log (default is :info) config.log_level = :error - # Use a different logger for distributed setups - config.logger = Logger.new(Rails.root.join("log", Rails.env + ".log" ), 5 , 10 * 1024 * 1024) - - # Use a different cache store in production - config.cache_store = :dalli_store, 'memcached:11211', 'localhost' - - # Enable serving of images, stylesheets, and JavaScripts from an asset server - # config.action_controller.asset_host = "http://assets.example.com" - - # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added) - # config.assets.precompile += %w( search.js ) - # Disable delivery errors, bad email addresses will be ignored - # config.action_mailer.raise_delivery_errors = false + config.action_mailer.raise_delivery_errors = false - # Use smtp-Server - config.action_mailer.delivery_method = :smtp - config.action_mailer.smtp_settings = { - address: 'smtp', - domain: 'ensl.org' - } + # Send email + config.action_mailer.perform_deliveries = true - config.action_mailer.raise_delivery_errors = true - - # Enable threaded mode - # config.threadsafe! - - # Enable locale fallbacks for I18n (makes lookups for any locale fall back to - # the I18n.default_locale when a translation can not be found) - config.i18n.fallbacks = true - - # Send deprecation notices to registered listeners - config.active_support.deprecation = :notify - - # Custom Session Store config to allow gathers.staging.ensl.org - # config.session_store :cookie_store, key: '_ENSL_session_key', expire_after: 30.days.to_i, domain: "gathers.ensl.org" - - config.eager_load = true + # Do not dump schema after migrations. + config.active_record.dump_schema_after_migration = false end diff --git a/config/environments/staging.rb b/config/environments/staging.rb index a665c36..1d3b4d6 100644 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -1,19 +1,22 @@ -Ensl::Application.configure do +Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb + # Load app models at start + config.eager_load = true + # Code is not reloaded between requests config.cache_classes = true + config.action_controller.perform_caching = true # Full error reports are disabled and caching is turned on config.consider_all_requests_local = false - config.action_controller.perform_caching = true # Disable Rails's static asset server (Apache or nginx will already do this) config.serve_static_assets = true # Compress JavaScripts and CSS config.assets.compress = true - # config.assets.js_compressor = :uglifier + # config.assets.js_compressor = Uglifier.new(harmony: true) # Don't fallback to assets pipeline if a precompiled asset is missed config.assets.compile = true @@ -21,52 +24,18 @@ Ensl::Application.configure do # Generate digests for assets URLs config.assets.digest = true - # Defaults to Rails.root.join("public/assets") - # config.assets.manifest = YOUR_PATH - - # Specifies the header that your server uses for sending files - # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache - config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx - # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - # config.force_ssl = true + config.force_ssl = false # See everything in the log (default is :info) - config.log_level = :error - - # Use a different logger for distrwt ibuted setups - # config.logger = SyslogLogger.new - - # Use a different cache store in production - config.cache_store = :dalli_store, 'memcached:11211', 'localhost' - - # Enable serving of images, stylesheets, and JavaScripts from an asset server - # config.action_controller.asset_host = "http://assets.example.com" - - # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added) - # config.assets.precompile += %w( search.js ) + config.log_level = :info # Disable delivery errors, bad email addresses will be ignored - # config.action_mailer.raise_delivery_errors = false + config.action_mailer.raise_delivery_errors = false - # Use sendmail - config.action_mailer.delivery_method = :sendmail - config.action_mailer.raise_delivery_errors = true - config.action_mailer.smtp_settings = { - address: 'smtp', - domain: 'ensl.org' - } + # Send email + config.action_mailer.perform_deliveries = true - # Enable locale fallbacks for I18n (makes lookups for any locale fall back to - # the I18n.default_locale when a translation can not be found) - config.i18n.fallbacks = true - - # Send deprecation notices to registered listeners - config.active_support.deprecation = :notify - - # Custom Session Store config to allow gathers.staging.ensl.org - config.session_store :cookie_store, key: "_ENSL_session_key_staging", expire_after: 30.days.to_i - - # Load all models auto - config.eager_load = true + # Do not dump schema after migrations. + config.active_record.dump_schema_after_migration = false end diff --git a/config/environments/test.rb b/config/environments/test.rb index e4a2c83..758b66b 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -1,4 +1,4 @@ -Ensl::Application.configure do +Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb # The test environment is used exclusively to run your application's diff --git a/config/initializers/legacy.rb b/config/initializers/legacy.rb index f645ea7..3970972 100644 --- a/config/initializers/legacy.rb +++ b/config/initializers/legacy.rb @@ -10,7 +10,7 @@ Dir.glob(File.join(Rails.root, "lib/plugins/*")).sort.each do |directory| initializer = File.join(directory, "init.rb") if File.file?(initializer) - config = Ensl::Application.config + config = Rails.application.config eval(File.read(initializer), binding, initializer) end end