summaryrefslogtreecommitdiffstats
path: root/vendor/plugins/open_id_authentication/init.rb
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/plugins/open_id_authentication/init.rb')
-rw-r--r--vendor/plugins/open_id_authentication/init.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/vendor/plugins/open_id_authentication/init.rb b/vendor/plugins/open_id_authentication/init.rb
new file mode 100644
index 000000000..808c7bdbd
--- /dev/null
+++ b/vendor/plugins/open_id_authentication/init.rb
@@ -0,0 +1,18 @@
+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
+end
+
+config.to_prepare do
+ OpenID::Util.logger = Rails.logger
+ ActionController::Base.send :include, OpenIdAuthentication
+end