Sha256: 456f5fea0bd32d34d5a91b5b31058569ec09971d0c46bbb866ba75015d658ce2

Contents?: true

Size: 1 KB

Versions: 15

Compression:

Stored size: 1 KB

Contents

require 'devise'
module Wobauth
  class Engine < ::Rails::Engine
    isolate_namespace Wobauth

    config.generators do |g|
      g.templates.unshift File::expand_path('../../templates', __FILE__)
      g.test_framework :rspec, fixture: false
      g.fixture_replacement :factory_bot, :dir => 'spec/factories'
    end

    config.eager_load_paths += Dir["#{config.root}/lib/concerns"]

    initializer "wobauth.assets.precompile" do |app|
      app.config.assets.precompile += %w(wobauth/authorities.js)
    end

    initializer 'wobauth.action_controller' do |app|
      ActiveSupport.on_load(:action_controller) do
        ::ActionController::Base.helper Wobauth::ApplicationHelper
      end
    end

    config.to_prepare do
      Wobauth::ApplicationController.helper Rails.application.helpers
    end

    initializer "wobauth.factories", :after => "factory_bot.set_factory_paths" do
      FactoryBot.definition_file_paths << File.expand_path('../../../spec/factories', __FILE__) if defined?(FactoryBot)
    end

  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
wobauth-6.0.1 lib/wobauth/engine.rb
wobauth-6.0.0 lib/wobauth/engine.rb
wobauth-5.1.3 lib/wobauth/engine.rb
wobauth-5.1.2 lib/wobauth/engine.rb
wobauth-5.1.1 lib/wobauth/engine.rb
wobauth-5.1.0 lib/wobauth/engine.rb
wobauth-5.0.2 lib/wobauth/engine.rb
wobauth-5.0.1 lib/wobauth/engine.rb
wobauth-5.0.0 lib/wobauth/engine.rb
wobauth-4.0.0 lib/wobauth/engine.rb
wobauth-3.4.8 lib/wobauth/engine.rb
wobauth-3.4.7 lib/wobauth/engine.rb
wobauth-3.4.6 lib/wobauth/engine.rb
wobauth-3.4.5 lib/wobauth/engine.rb
wobauth-3.4.4 lib/wobauth/engine.rb