Sha256: b9003779a44a3e583342dc3cf7d436fa65ea80b34feaa7be0ed81f2922aa66b3

Contents?: true

Size: 1006 Bytes

Versions: 28

Compression:

Stored size: 1006 Bytes

Contents

begin
  require "omniauth"
  require "omniauth/version"
rescue LoadError => e
  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

28 entries across 23 versions & 5 rubygems

Version Path
devise-2.0.6 lib/devise/omniauth.rb
devise_sociable-0.1.0 vendor/bundle/gems/devise-1.5.4/lib/devise/omniauth.rb
devise-2.0.5 lib/devise/omniauth.rb
devise-1.5.4 lib/devise/omniauth.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/devise-2.0.4/lib/devise/omniauth.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/devise-2.1.0/lib/devise/omniauth.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/devise-2.1.0/lib/devise/omniauth.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/devise-2.0.4/lib/devise/omniauth.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/devise-2.1.0/lib/devise/omniauth.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/devise-2.0.4/lib/devise/omniauth.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/devise-2.0.4/lib/devise/omniauth.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/devise-2.1.0/lib/devise/omniauth.rb
sunrise-cms-0.3.0.rc vendor/bundle/ruby/1.9.1/gems/devise-2.1.0/lib/devise/omniauth.rb
sunrise-cms-0.3.0.rc vendor/bundle/ruby/1.9.1/gems/devise-2.0.4/lib/devise/omniauth.rb
devise-2.1.0 lib/devise/omniauth.rb
devise-2.1.0.rc2 lib/devise/omniauth.rb
upstream-devise-2.1.0.rc lib/devise/omniauth.rb
devise-2.1.0.rc lib/devise/omniauth.rb
devise-2.0.4 lib/devise/omniauth.rb
devise-2.0.2 lib/devise/omniauth.rb