Sha256: 2c5e9fcf2a4ab5ea05671f7a42fcd7ddbedbcc13f0ae366eaf3d57c8a18f9d9a

Contents?: true

Size: 1.39 KB

Versions: 14

Compression:

Stored size: 1.39 KB

Contents

require File.join(File.dirname(__FILE__), '../middleware/flash_session_cookie')
require File.join(File.dirname(__FILE__), 'authentication_helpers')

module Alchemy
  class Engine < Rails::Engine

    isolate_namespace Alchemy
    engine_name 'alchemy'
    config.mount_at = '/'

    # Enabling assets precompiling
    initializer 'alchemy.assets' do |app|
      app.config.assets.precompile += [
        "alchemy/alchemy.js",
        "alchemy/preview.js",
        "alchemy/admin.css",
        "alchemy/menubar.css",
        "alchemy/menubar.js",
        "alchemy/print.css",
        "alchemy/tinymce_content.css",
        "alchemy/tinymce_dialog.css",
        "tiny_mce/*"
      ]
    end

    initializer 'alchemy.flash_cookie' do |config|
      config.middleware.insert_after(
        'ActionDispatch::Cookies',
        Alchemy::Middleware::FlashSessionCookie,
        ::Rails.configuration.session_options[:key]
      )
    end

    # filter sensitive information during logging
    initializer "alchemy.params.filter" do |app|
      app.config.filter_parameters += [:password, :password_confirmation]
    end

    initializer "alchemy.add_authorization_rules" do
      Alchemy::AuthEngine.get_instance.load(File.join(File.dirname(__FILE__), '../..', 'config/authorization_rules.rb'))
    end

    config.after_initialize do
      #ApplicationController.send :include, Alchemy::AuthenticationHelpers
    end

  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
alchemy_cms-2.6.3 lib/alchemy/engine.rb
alchemy_cms-2.6.2.1 lib/alchemy/engine.rb
alchemy_cms-2.6.2 lib/alchemy/engine.rb
alchemy_cms-2.6.1 lib/alchemy/engine.rb
alchemy_cms-2.6.0 lib/alchemy/engine.rb
alchemy_cms-2.6.0.rc5 lib/alchemy/engine.rb
alchemy_cms-2.5.3.1 lib/alchemy/engine.rb
alchemy_cms-2.5.3 lib/alchemy/engine.rb
alchemy_cms-2.5.2.2 lib/alchemy/engine.rb
alchemy_cms-2.5.2.1 lib/alchemy/engine.rb
alchemy_cms-2.5.2 lib/alchemy/engine.rb
alchemy_cms-2.5.1 lib/alchemy/engine.rb
alchemy_cms-2.5.0 lib/alchemy/engine.rb
alchemy_cms-2.5.0.rc3 lib/alchemy/engine.rb