require File.expand_path("../boot", __FILE__)
require File.expand_path("lib/redirect_to_configuration")

require "rails/all"

Bundler.require(:default, Rails.env)

module Houndapp
  class Application < Rails::Application
    config.autoload_paths += %W(#{config.root}/lib)
    config.encoding = "utf-8"
    config.filter_parameters += [:password]
    config.active_support.escape_html_entities_in_json = true
    config.active_job.queue_adapter = :resque
    config.middleware.insert_before Rack::ETag, Rack::Deflater
    config.middleware.insert_before(
      Rack::ETag,
      RedirectToConfiguration,
    )
    config.exceptions_app = routes

    config.react.jsx_transform_options = {
      optional: ["es7.classProperties"],
    }
    config.react.addons = true
  end
end

require File.expand_path("../boot", __FILE__)
require File.expand_path("lib/redirect_to_configuration")

require "rails/all"

Bundler.require(:default, Rails.env)

module Houndapp
  class Application < Rails::Application
    config.autoload_paths += %W(#{config.root}/lib)
    config.eager_load_paths += %W(#{config.root}/lib)
    config.encoding = "utf-8"
    config.filter_parameters += [:password]
    config.active_support.escape_html_entities_in_json = true
    config.active_job.queue_adapter = :resque
    config.middleware.insert_before Rack::ETag, Rack::Deflater
    config.middleware.insert_before(
      Rack::ETag,
      RedirectToConfiguration,
    )
    config.exceptions_app = routes

    config.react.jsx_transform_options = {
      optional: ["es7.classProperties"],
    }
    config.react.addons = true
  end
end

Add lib to eagerload paths
Add lib to eagerload paths

This fixes lib files not being available in Rails 5 production without
explicitly requiring them.

This comes with the caveat that everything in lib will be loaded when the
application boots, but in our case that's just a few rake tasks so we aren't too
concerned about it for the convenience this provides.
