Update OpenID authentication plugin to latest version

This commit is contained in:
Tom Hughes 2010-05-15 17:39:52 +01:00
parent 9b10cbccb6
commit a108e9290c
20 changed files with 71 additions and 535 deletions

View file

@ -1,18 +1,12 @@
if config.respond_to?(:gems)
config.gem 'ruby-openid', :lib => 'openid', :version => '>=2.0.4'
else
begin
require 'openid'
rescue LoadError
begin
gem 'ruby-openid', '>=2.0.4'
rescue Gem::LoadError
puts "Install the ruby-openid gem to enable OpenID support"
end
end
if Rails.version < '3'
config.gem 'rack-openid', :lib => 'rack/openid', :version => '>=0.2.1'
end
config.to_prepare do
require 'open_id_authentication'
config.middleware.use OpenIdAuthentication
config.after_initialize do
OpenID::Util.logger = Rails.logger
ActionController::Base.send :include, OpenIdAuthentication
end