Sha256: c870b3c0cafe0be62e5f3caadb9690a1de18492a04c35788236840ea79e6f079

Contents?: true

Size: 1.37 KB

Versions: 2

Compression:

Stored size: 1.37 KB

Contents

require 'devise'
require 'refinerycms-core'
require 'friendly_id'

module Refinery
  module Authentication

    class Engine < ::Rails::Engine

      initializer 'serve static assets' do |app|
        app.middleware.insert_after ::ActionDispatch::Static, ::ActionDispatch::Static, "#{root}/public"
      end

      config.autoload_paths += %W( #{config.root}/lib )

      config.after_initialize do
        ::Refinery::Plugin.register do |plugin|
          plugin.name = 'refinery_users'
          plugin.version = %q{0.9.9.21}
          plugin.menu_match = /(refinery|admin)\/users$/
          plugin.activity = {
            :class => User,
            :title => 'username'
          }
          plugin.url = {:controller => '/admin/users'}
        end
      end

      refinery.before_inclusion do
        [::Refinery::ApplicationController, ::Refinery::ApplicationHelper].each do |c|
          c.send :require, File.expand_path('../authenticated_system', __FILE__)
          c.send :include, AuthenticatedSystem
        end
      end
    end

    class << self
      attr_accessor :root
      def root
        @root ||= Pathname.new(File.expand_path('../../', __FILE__))
      end
    end
  end

  class << self
    attr_accessor :authentication_login_field
    def authentication_login_field
      @authentication_login_field ||= 'login'
    end
  end
end

::Refinery.engines << 'authentication'

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
refinerycms-authentication-0.9.9.22 lib/refinerycms-authentication.rb
refinerycms-authentication-0.9.9.21 lib/refinerycms-authentication.rb