1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
5 require_relative 'boot'
8 # Pick only the frameworks we need:
9 require "active_model/railtie"
10 require "active_job/railtie"
11 require "active_record/railtie"
12 # Skip ActiveStorage (new in Rails 5.1)
13 # require "active_storage/engine"
14 require "action_controller/railtie"
15 require "action_mailer/railtie"
16 require "action_view/railtie"
17 # Skip ActionCable (new in Rails 5.0) as it adds '/cable' routes that we're not using
18 # require "action_cable/engine"
19 require "sprockets/railtie"
20 require "rails/test_unit/railtie"
22 Bundler.require(:default, Rails.env)
24 if ENV["ARVADOS_RAILS_LOG_TO_STDOUT"]
25 Rails.logger = ActiveSupport::TaggedLogging.new(Logger.new(STDOUT))
28 module ArvadosWorkbench
29 class Application < Rails::Application
31 require_relative "arvados_config.rb"
33 # Initialize configuration defaults for originally generated Rails version.
34 config.load_defaults 5.1
36 # Settings in config/environments/* take precedence over those specified here.
37 # Application configuration should go into files in config/initializers
38 # -- all .rb files in that directory are automatically loaded.
40 # Custom directories with classes and modules you want to be autoloadable.
41 # Autoload paths shouldn't be used anymore since Rails 5.0
42 # See #15258 and https://github.com/rails/rails/issues/13142#issuecomment-74586224
43 # config.autoload_paths += %W(#{config.root}/extras)
45 # Only load the plugins named here, in the order given (default is alphabetical).
46 # :all can be used as a placeholder for all plugins not explicitly named.
47 # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
49 # Activate observers that should always be running.
50 # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
52 # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
53 # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
54 # config.time_zone = 'Central Time (US & Canada)'
56 # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
57 # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
58 # config.i18n.default_locale = :de
60 # Configure the default encoding used in templates for Ruby 1.9.
61 config.encoding = "utf-8"
63 # Configure sensitive parameters which will be filtered from the log file.
64 config.filter_parameters += [:password]
66 # Enable escaping HTML in JSON.
67 config.active_support.escape_html_entities_in_json = true
69 # Use SQL instead of Active Record's schema dumper when creating the database.
70 # This is necessary if your schema can't be completely dumped by the schema dumper,
71 # like if you have constraints or database-specific column types
72 # config.active_record.schema_format = :sql
74 # Enable the asset pipeline
75 config.assets.enabled = true
77 # Version of your assets, change this if you want to expire all your assets
78 config.assets.version = '1.0'
80 # npm-rails loads top-level modules like window.Mithril, but we
81 # also pull in some code from node_modules in application.js, like
82 # mithril/stream/stream.
83 config.assets.paths << Rails.root.join('node_modules')