Sha256: 8b45c8b8b59573f64877f0ac3d9a67667bea0568d8b2c35b6ba0784eae824be3

Contents?: true

Size: 915 Bytes

Versions: 1

Compression:

Stored size: 915 Bytes

Contents

module Auther
  class Engine < ::Rails::Engine
    isolate_namespace Auther

    # Set defaults. Can be overwritten in app config.
    config.auther_settings = {}

    initializer "auther.initialize" do |app|
      # Add jQuery assets.
      jquery_gem_path = Gem.loaded_specs["jquery-rails"].full_gem_path
      app.config.assets.paths << "#{jquery_gem_path}/vendor/assets/javascripts"

      # Add Zurb Foundation assets.
      foundation_gem_path = Gem.loaded_specs["foundation-rails"].full_gem_path
      app.config.assets.paths << "#{foundation_gem_path}/vendor/assets/stylesheets"
      app.config.assets.paths << "#{foundation_gem_path}/vendor/assets/javascripts"

      # Configure log filter parameters.
      app.config.filter_parameters += [:login, :password]

      # Initialize Gatekeeper middleware.
      app.config.app_middleware.use Auther::Gatekeeper, app.config.auther_settings
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
auther-1.2.0 lib/auther/engine.rb