15003: Merge branch 'master'
[arvados.git] / apps / workbench / config / application.rb
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 require File.expand_path('../boot', __FILE__)
6
7 require "rails"
8 # Pick only the frameworks we need:
9 require "active_model/railtie"
10 require "active_job/railtie"
11 require "active_record/railtie"
12 require "action_controller/railtie"
13 require "action_mailer/railtie"
14 require "action_view/railtie"
15 # Skip ActionCable (new in Rails 5.0) as it adds '/cable' routes that we're not using
16 # require "action_cable/engine"
17 require "sprockets/railtie"
18 require "rails/test_unit/railtie"
19
20 Bundler.require(:default, Rails.env)
21
22 module ArvadosWorkbench
23   class Application < Rails::Application
24     # Settings in config/environments/* take precedence over those specified here.
25     # Application configuration should go into files in config/initializers
26     # -- all .rb files in that directory are automatically loaded.
27
28     # Custom directories with classes and modules you want to be autoloadable.
29     # Autoload paths shouldn't be used anymore since Rails 5.0
30     # See #15258 and https://github.com/rails/rails/issues/13142#issuecomment-74586224
31     # config.autoload_paths += %W(#{config.root}/extras)
32
33     # Only load the plugins named here, in the order given (default is alphabetical).
34     # :all can be used as a placeholder for all plugins not explicitly named.
35     # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
36
37     # Activate observers that should always be running.
38     # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
39
40     # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
41     # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
42     # config.time_zone = 'Central Time (US & Canada)'
43
44     # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
45     # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
46     # config.i18n.default_locale = :de
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     # Enable escaping HTML in JSON.
55     config.active_support.escape_html_entities_in_json = true
56
57     # Use SQL instead of Active Record's schema dumper when creating the database.
58     # This is necessary if your schema can't be completely dumped by the schema dumper,
59     # like if you have constraints or database-specific column types
60     # config.active_record.schema_format = :sql
61
62     # Enable the asset pipeline
63     config.assets.enabled = true
64
65     # Version of your assets, change this if you want to expire all your assets
66     config.assets.version = '1.0'
67
68     # npm-rails loads top-level modules like window.Mithril, but we
69     # also pull in some code from node_modules in application.js, like
70     # mithril/stream/stream.
71     config.assets.paths << Rails.root.join('node_modules')
72   end
73 end
74
75 require File.expand_path('../load_config', __FILE__)