Sha256: ed87f3aa2b602e48682e2575e4db29e6e73f4a0171b950133d7c9ba2e85b5807

Contents?: true

Size: 1.09 KB

Versions: 5

Compression:

Stored size: 1.09 KB

Contents

# frozen_string_literal: true
module Omniauth
  module Rails
    class Engine < ::Rails::Engine
      require "omniauth"
      require "omniauth-google-oauth2"
      isolate_namespace Omniauth::Rails

      initializer "omniauth_rails.action_controller" do |_app|
        ActiveSupport.on_load :action_controller do
          helper Omniauth::Rails::ApplicationHelper
          if Configuration.include_concern_in_application_controller
            ::Rails.logger.info "Autoloading Omniauth::Rails::ControllersConcern into ActionController::Base"
            include Omniauth::Rails::ControllersConcern
          end
        end
      end

      config.after_initialize do
        if Configuration.automount
          ::Rails.logger.info "Mounting Omniauth::Rails::Engine in Rails.application.routes"
          ::Rails.application.routes.prepend do
            mount Omniauth::Rails::Engine => OmniAuth.config.path_prefix
          end
        end
      end

      config.generators do |g|
        g.test_framework :rspec, fixture: false
        g.assets false
        g.helper false
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
omniauth-rails-0.6.0 lib/omniauth/rails/engine.rb
omniauth-rails-0.5.0 lib/omniauth/rails/engine.rb
omniauth-rails-0.4.0 lib/omniauth/rails/engine.rb
omniauth-rails-0.3.0 lib/omniauth/rails/engine.rb
omniauth-rails-0.2.0 lib/omniauth/rails/engine.rb