2009-02-11 22:06:45 +03:00
|
|
|
if config.respond_to?(:gems)
|
2009-02-12 04:32:50 +03:00
|
|
|
config.gem 'ruby-openid', :lib => 'openid', :version => '>=2.1.4'
|
2009-02-11 22:06:45 +03:00
|
|
|
else
|
|
|
|
begin
|
|
|
|
require 'openid'
|
|
|
|
rescue LoadError
|
|
|
|
begin
|
2009-02-12 04:32:50 +03:00
|
|
|
gem 'ruby-openid', '>=2.1.4'
|
2009-02-11 22:06:45 +03:00
|
|
|
rescue Gem::LoadError
|
|
|
|
puts "Install the ruby-openid gem to enable OpenID support"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
config.to_prepare do
|
|
|
|
OpenID::Util.logger = Rails.logger
|
|
|
|
ActionController::Base.send :include, OpenIdAuthentication
|
|
|
|
end
|