From 5407ef5b377a205f6012b2d6725b810eff93d9e6 Mon Sep 17 00:00:00 2001 From: Azul Date: Wed, 23 Mar 2016 21:31:33 +0100 Subject: upgrade: drop active_resource in config/application --- config/application.rb | 1 - 1 file changed, 1 deletion(-) (limited to 'config/application.rb') diff --git a/config/application.rb b/config/application.rb index b13c7d9..4771f89 100644 --- a/config/application.rb +++ b/config/application.rb @@ -4,7 +4,6 @@ require File.expand_path('../boot', __FILE__) # require "active_record/railtie" require "action_controller/railtie" require "action_mailer/railtie" -require "active_resource/railtie" require "sprockets/railtie" require "rails/test_unit/railtie" -- cgit v1.2.3 From 54661746ffa9f113c6b489a4d5ba170a27874ad1 Mon Sep 17 00:00:00 2001 From: Azul Date: Thu, 24 Mar 2016 11:10:48 +0100 Subject: 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. --- config/application.rb | 57 +++++++-------------------------------------------- 1 file changed, 7 insertions(+), 50 deletions(-) (limited to 'config/application.rb') 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 -- cgit v1.2.3 From 00fba5114ae2c6176c88ff0ea152576c5bff657d Mon Sep 17 00:00:00 2001 From: Azul Date: Fri, 25 Mar 2016 11:06:55 +0100 Subject: upgrade: {File,Dir}.exists? -> exist? exists? is deprecated in ruby 2.1 --- config/application.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config/application.rb') diff --git a/config/application.rb b/config/application.rb index 4a70b04..0e00356 100644 --- a/config/application.rb +++ b/config/application.rb @@ -13,7 +13,7 @@ Bundler.require(*Rails.groups) APP_CONFIG = ["defaults.yml", "config.yml"].inject({}) {|config, file| filepath = File.expand_path(file, File.dirname(__FILE__)) - if File.exists?(filepath) && settings = YAML.load_file(filepath)[Rails.env] + if File.exist?(filepath) && settings = YAML.load_file(filepath)[Rails.env] config.merge(settings) else config -- cgit v1.2.3