application.rb 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. require_relative 'boot'
  2. require 'rails/all'
  3. # Require the gems listed in Gemfile, including any gems
  4. # you've limited to :test, :development, or :production.
  5. Bundler.require(*Rails.groups)
  6. module Huginn
  7. class Application < Rails::Application
  8. Dotenv.overload File.expand_path('../../spec/env.test', __FILE__) if Rails.env.test?
  9. # Settings in config/environments/* take precedence over those specified here.
  10. # Application configuration should go into files in config/initializers
  11. # -- all .rb files in that directory are automatically loaded.
  12. # Custom directories with classes and modules you want to be autoloadable.
  13. config.autoload_paths += %W(#{config.root}/lib #{config.root}/app/presenters #{config.root}/app/jobs)
  14. # Activate observers that should always be running.
  15. # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
  16. # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
  17. # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
  18. config.time_zone = ENV['TIMEZONE'].presence || "Pacific Time (US & Canada)"
  19. # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
  20. # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
  21. # config.i18n.default_locale = :de
  22. # Configure the default encoding used in templates for Ruby 1.9.
  23. config.encoding = "utf-8"
  24. # Enable escaping HTML in JSON.
  25. config.active_support.escape_html_entities_in_json = true
  26. # Use SQL instead of Active Record's schema dumper when creating the database.
  27. # This is necessary if your schema can't be completely dumped by the schema dumper,
  28. # like if you have constraints or database-specific column types
  29. # config.active_record.schema_format = :sql
  30. config.active_job.queue_adapter = :delayed_job
  31. end
  32. end