forked from rails/open_id_authentication
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
delete the format parameter so that openid works on the iphone. add s…
…upport for config.gem on rails 2.1+ git-svn-id: http://svn.rubyonrails.org/rails/plugins/open_id_authentication@9207 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
- Loading branch information
rick
committed
Apr 2, 2008
1 parent
23a2636
commit da282f1
Showing
2 changed files
with
14 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,17 @@ | ||
begin | ||
require 'openid' | ||
rescue LoadError | ||
if config.respond_to?(:gems) | ||
config.gem 'ruby-openid', :lib => 'openid', :version => '>=2.0.4' | ||
else | ||
begin | ||
gem 'ruby-openid', '>=2.0.4' | ||
rescue Gem::LoadError | ||
puts "Install the ruby-openid gem to enable OpenID support" | ||
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 | ||
end | ||
|
||
ActionController::Base.send :include, OpenIdAuthentication | ||
config.to_prepare do | ||
ActionController::Base.send :include, OpenIdAuthentication | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters