Sha256: 72c1199e16dd0d1c3d5d3d62067e771474d287a62363b7e7f89724a26470553b

Contents?: true

Size: 1001 Bytes

Versions: 78

Compression:

Stored size: 1001 Bytes

Contents

begin
  require "omniauth"
  require "omniauth/version"
rescue LoadError
  warn "Could not load 'omniauth'. Please ensure you have the omniauth gem >= 1.0.0 installed and listed in your Gemfile."
  raise
end

unless OmniAuth::VERSION =~ /^1\./
  raise "You are using an old OmniAuth version, please ensure you have 1.0.0.pr2 version or later installed."
end

# Clean up the default path_prefix. It will be automatically set by Devise.
OmniAuth.config.path_prefix = nil

OmniAuth.config.on_failure = Proc.new do |env|
  env['devise.mapping'] = Devise::Mapping.find_by_path!(env['PATH_INFO'], :path)
  controller_name  = ActiveSupport::Inflector.camelize(env['devise.mapping'].controllers[:omniauth_callbacks])
  controller_klass = ActiveSupport::Inflector.constantize("#{controller_name}Controller")
  controller_klass.action(:failure).call(env)
end

module Devise
  module OmniAuth
    autoload :Config,      "devise/omniauth/config"
    autoload :UrlHelpers,  "devise/omniauth/url_helpers"
  end
end

Version data entries

78 entries across 78 versions & 13 rubygems

Version Path
devise-4.3.0 lib/devise/omniauth.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/devise-4.2.1/lib/devise/omniauth.rb
devise-4.2.1 lib/devise/omniauth.rb
devise-4.2.0 lib/devise/omniauth.rb
devise-3.5.10 lib/devise/omniauth.rb
devise-4.0.3 lib/devise/omniauth.rb
devise-4.1.1 lib/devise/omniauth.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/devise-4.1.0/lib/devise/omniauth.rb
devise-4.1.0 lib/devise/omniauth.rb
devise-3.5.9 lib/devise/omniauth.rb
devise-4.0.2 lib/devise/omniauth.rb
devise-4.0.1 lib/devise/omniauth.rb
devise-3.5.8 lib/devise/omniauth.rb
devise-3.5.7 lib/devise/omniauth.rb
devise-4.0.0 lib/devise/omniauth.rb
devise-4.0.0.rc2 lib/devise/omniauth.rb
devise-4.0.0.rc1 lib/devise/omniauth.rb
devise-3.5.6 lib/devise/omniauth.rb
devise-3.5.5 lib/devise/omniauth.rb
devise-3.5.4 lib/devise/omniauth.rb