2019-08-17 00:54:17 +02:00
|
|
|
require_relative 'boot'
|
2018-05-23 10:32:04 +02:00
|
|
|
|
|
|
|
require "rails"
|
|
|
|
# Pick the frameworks you want:
|
|
|
|
require "active_model/railtie"
|
|
|
|
require "active_job/railtie"
|
|
|
|
require "active_record/railtie"
|
|
|
|
require "active_storage/engine"
|
|
|
|
require "action_controller/railtie"
|
2019-08-17 00:54:17 +02:00
|
|
|
# require "action_mailbox/engine"
|
|
|
|
# require "action_text/engine"
|
2018-05-23 10:32:04 +02:00
|
|
|
require "action_mailer/railtie"
|
|
|
|
require "action_view/railtie"
|
|
|
|
# require "action_cable/engine"
|
|
|
|
require "sprockets/railtie"
|
|
|
|
require "rails/test_unit/railtie"
|
|
|
|
|
|
|
|
# Require the gems listed in Gemfile, including any gems
|
|
|
|
# you've limited to :test, :development, or :production.
|
|
|
|
Bundler.require(*Rails.groups)
|
|
|
|
|
|
|
|
module Chexpire
|
|
|
|
class Application < Rails::Application
|
|
|
|
# Initialize configuration defaults for originally generated Rails version.
|
2019-03-02 20:10:46 +01:00
|
|
|
config.load_defaults 6.0
|
2018-05-23 10:32:04 +02:00
|
|
|
|
|
|
|
# Settings in config/environments/* take precedence over those specified here.
|
|
|
|
# Application configuration can go into files in config/initializers
|
|
|
|
# -- all .rb files in that directory are automatically loaded after loading
|
|
|
|
# the framework and any gems in your application.
|
2018-05-23 11:55:58 +02:00
|
|
|
config.generators do |g|
|
|
|
|
g.assets false
|
|
|
|
end
|
|
|
|
|
|
|
|
config.time_zone = "Europe/Paris"
|
2018-05-23 16:23:34 +02:00
|
|
|
|
2018-08-01 18:38:02 +02:00
|
|
|
unless Rails.root.join("config", "chexpire.yml").readable?
|
|
|
|
fail "Missing Chexpire configuration file.
|
|
|
|
You have to create the config/chexpire.yml file and set at least the required values.
|
|
|
|
Look at config/chexpire.defaults.yml and INSTALL.md for more information"
|
|
|
|
end
|
|
|
|
|
|
|
|
config.chexpire = Hashie::Mash.new(config_for(:"chexpire.defaults").deep_merge(config_for(:chexpire)))
|
2018-05-23 10:32:04 +02:00
|
|
|
end
|
|
|
|
end
|
2019-03-04 13:32:24 +01:00
|
|
|
|
|
|
|
### Uncomment this to have zeitwerk debug log printed in stdout.
|
|
|
|
# Rails.autoloaders.logger = method(:puts)
|