summaryrefslogtreecommitdiff
path: root/config/application.rb
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2016-03-24 11:10:48 +0100
committerAzul <azul@riseup.net>2016-05-02 08:28:42 -0300
commit54661746ffa9f113c6b489a4d5ba170a27874ad1 (patch)
treeb4edf1d9804c1a77e6f738cf745563cc410d7427 /config/application.rb
parent464c2b463522cdb5e4577b1b9ab7ffb890788d94 (diff)
upgrade: migrate config
environment.rb boot.rb application.rb -> adopted according to http://railsdiff.org/3.2.22.2/4.2.6 Also dropped quite_assets - not sure if this is still needed with rails 4.2. If it is we can bring it back.
Diffstat (limited to 'config/application.rb')
-rw-r--r--config/application.rb57
1 files changed, 7 insertions, 50 deletions
diff --git a/config/application.rb b/config/application.rb
index 4771f89..4a70b04 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -7,12 +7,9 @@ require "action_mailer/railtie"
require "sprockets/railtie"
require "rails/test_unit/railtie"
-if defined?(Bundler)
- # If you precompile assets before deploying to production, use this line
- Bundler.require(*Rails.groups(:assets => %w(development test)))
- # If you want your assets lazily compiled in production, use this line
- # Bundler.require(:default, :assets, Rails.env)
-end
+# Require the gems listed in Gemfile, including any gems
+# you've limited to :test, :development, or :production.
+Bundler.require(*Rails.groups)
APP_CONFIG = ["defaults.yml", "config.yml"].inject({}) {|config, file|
filepath = File.expand_path(file, File.dirname(__FILE__))
@@ -29,16 +26,6 @@ module LeapWeb
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
- # Custom directories with classes and modules you want to be autoloadable.
- # config.autoload_paths += %W(#{config.root}/extras)
-
- # Only load the plugins named here, in the order given (default is alphabetical).
- # :all can be used as a placeholder for all plugins not explicitly named.
- # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
-
- # Activate observers that should always be running.
- # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
-
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
# config.time_zone = 'Central Time (US & Canada)'
@@ -47,48 +34,18 @@ module LeapWeb
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de
- # Configure the default encoding used in templates for Ruby 1.9.
- config.encoding = "utf-8"
-
- # Configure sensitive parameters which will be filtered from the log file.
- config.filter_parameters += [:password]
-
if APP_CONFIG[:logfile].present?
config.logger = Logger.new(APP_CONFIG[:logfile])
end
- # Enable escaping HTML in JSON.
- config.active_support.escape_html_entities_in_json = true
-
- # Use SQL instead of Active Record's schema dumper when creating the database.
- # This is necessary if your schema can't be completely dumped by the schema dumper,
- # like if you have constraints or database-specific column types
- # config.active_record.schema_format = :sql
-
- # Enforce whitelist mode for mass assignment.
- # This will create an empty whitelist of attributes available for mass-assignment for all models
- # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
- # parameters by using an attr_accessible or attr_protected declaration.
- # config.active_record.whitelist_attributes = true
-
- ##
- ## ASSETS
- ##
-
- # Enable the asset pipeline
- config.assets.enabled = true
- config.assets.initialize_on_precompile = true # don't change this (see customization.rb)
-
- # Version of your assets, change this if you want to expire all your assets
- config.assets.version = '1.0'
-
- # Set to false in order to see asset requests in the log
- config.quiet_assets = true
-
##
## CUSTOMIZATION
## see initializers/customization.rb
##
+
+ # don't change this (see customization.rb)
+ config.assets.initialize_on_precompile = true
+
if APP_CONFIG["customization_directory"]
custom_view_path = (Pathname.new(APP_CONFIG["customization_directory"]).relative_path_from(Rails.root) + 'views').to_s
else