"Fossies" - the Fresh Open Source Software Archive

Member "redmine-4.1.1/config/application.rb" (6 Apr 2020, 3596 Bytes) of package /linux/www/redmine-4.1.1.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "application.rb": 4.1.0_vs_4.1.1.

    1 # frozen_string_literal: true
    2 
    3 require File.expand_path('../boot', __FILE__)
    4 
    5 require 'rails'
    6 # Pick the frameworks you want:
    7 require 'active_model/railtie'
    8 require 'active_job/railtie'
    9 require 'active_record/railtie'
   10 require 'active_storage/engine'
   11 require 'action_controller/railtie'
   12 require 'action_mailer/railtie'
   13 require 'action_view/railtie'
   14 require 'action_cable/engine'
   15 # require 'sprockets/railtie'
   16 require 'rails/test_unit/railtie'
   17 
   18 Bundler.require(*Rails.groups)
   19 
   20 module RedmineApp
   21   class Application < Rails::Application
   22     # Settings in config/environments/* take precedence over those specified here.
   23     # Application configuration should go into files in config/initializers
   24     # -- all .rb files in that directory are automatically loaded.
   25 
   26     # Custom directories with classes and modules you want to be autoloadable.
   27     config.autoload_paths += %W(#{config.root}/lib)
   28 
   29     # Only load the plugins named here, in the order given (default is alphabetical).
   30     # :all can be used as a placeholder for all plugins not explicitly named.
   31     # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
   32 
   33     config.active_record.store_full_sti_class = true
   34     config.active_record.default_timezone = :local
   35 
   36     # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
   37     # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
   38     # config.time_zone = 'Central Time (US & Canada)'
   39 
   40     # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
   41     # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
   42     # config.i18n.default_locale = :de
   43 
   44     config.i18n.enforce_available_locales = true
   45     config.i18n.fallbacks = true
   46     config.i18n.default_locale = 'en'
   47 
   48     # Configure the default encoding used in templates for Ruby 1.9.
   49     config.encoding = "utf-8"
   50 
   51     # Configure sensitive parameters which will be filtered from the log file.
   52     config.filter_parameters += [:password]
   53 
   54     config.action_mailer.perform_deliveries = false
   55 
   56     # Do not include all helpers
   57     config.action_controller.include_all_helpers = false
   58 
   59     # Since Redmine 4.0, boolean values are stored in sqlite3 databases as 1 and 0
   60     config.active_record.sqlite3.represent_boolean_as_integer = true
   61 
   62     # Sets the Content-Length header on responses with fixed-length bodies
   63     config.middleware.insert_before Rack::Sendfile, Rack::ContentLength
   64 
   65     # Verify validity of user sessions
   66     config.redmine_verify_sessions = true
   67 
   68     # Specific cache for search results, the default file store cache is not
   69     # a good option as it could grow fast. A memory store (32MB max) is used
   70     # as the default. If you're running multiple server processes, it's
   71     # recommended to switch to a shared cache store (eg. mem_cache_store).
   72     # See http://guides.rubyonrails.org/caching_with_rails.html#cache-stores
   73     # for more options (same options as config.cache_store).
   74     config.redmine_search_cache_store = :memory_store
   75 
   76     # Configure log level here so that additional environment file
   77     # can change it (environments/ENV.rb would take precedence over it)
   78     config.log_level = Rails.env.production? ? :info : :debug
   79 
   80     config.session_store :cookie_store,
   81       :key => '_redmine_session',
   82       :path => config.relative_url_root || '/'
   83 
   84     if File.exists?(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
   85       instance_eval File.read(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
   86     end
   87   end
   88 end