Permalink
Browse files

cleaned up the loading of the plugin

  • Loading branch information...
1 parent bfedccf commit cade84b8fee806cbf80aace5e2c65596945b3fc2 @pelle committed Dec 3, 2010
Showing with 8 additions and 11 deletions.
  1. +7 −2 lib/oauth-plugin.rb
  2. BIN lib/oauth-plugin/.version.rb.swp
  3. +1 −9 rails/init.rb
View
@@ -1,9 +1,14 @@
require 'oauth'
require 'oauth/signature/hmac/sha1'
-require 'oauth/rack/oauth_filter'
require 'oauth/request_proxy/rack_request'
require 'oauth/server'
require 'oauth/controllers/application_controller_methods'
+if Rails.version =~ /^3\./
+ require 'oauth/request_proxy/rack_request'
+else
+ require 'oauth/request_proxy/action_controller_request'
+ ActionController::Base.send :include, OAuth::Controllers::ApplicationControllerMethods
+end
module OAuth
@@ -15,4 +20,4 @@ class OAuthRailtie < Rails::Railtie
end
end
end
-end
+end
Binary file not shown.
View
@@ -1,9 +1 @@
-require 'oauth'
-require 'oauth/signature/hmac/sha1'
-require 'oauth/rack/oauth_filter'
-require 'oauth/server'
-require 'oauth/controllers/application_controller_methods'
-if Rails.version =~ /^2\./
- require 'oauth/request_proxy/action_controller_request'
- ActionController::Base.send :include, OAuth::Controllers::ApplicationControllerMethods
-end
+require 'oauth-plugin'

0 comments on commit cade84b

Please sign in to comment.