Sha256: c3a4da8b1c59cc45a89bea7574f3c7abb99e858f51e103cda2a4fc1b33362f62

Contents?: true

Size: 781 Bytes

Versions: 4

Compression:

Stored size: 781 Bytes

Contents

require 'warden'
module Cadenero
  # Defines Cadenero as a Rails Engine using the passworf strategy as default for Warden
  class Engine < ::Rails::Engine
    isolate_namespace Cadenero
    config.middleware.use Warden::Manager do |manager|
      manager.default_strategies :password
    end

    config.generators do |g|
      g.test_framework :rspec, view_specs: false
      g.integration_tool :rspec
    end

    config.to_prepare do
      root = Cadenero::Engine.root
      extenders_path = root + "app/extenders/**/*.rb"
      Dir.glob(extenders_path) do |file|
        Rails.configuration.cache_classes ? require(file) : load(file)
      end
    end

    config.middleware.use ActionDispatch::Cookies
    config.middleware.use ActionDispatch::Session::CookieStore

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
cadenero-0.0.2.b10 lib/cadenero/engine.rb
cadenero-0.0.2.b8 lib/cadenero/engine.rb
cadenero-0.0.2.b7 lib/cadenero/engine.rb
cadenero-0.0.2.b6 lib/cadenero/engine.rb