authlogic_oauth2 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{authlogic_oauth2}
5
- s.version = "1.0.1"
5
+ s.version = "1.0.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Andrew Hite"]
9
- s.date = %q{2010-06-13}
9
+ s.date = %q{2010-06-14}
10
10
  s.description = %q{Authlogic OAuth2 is an extension of the Authlogic library to add OAuth2 support. OAuth2 can be used to allow users to login with their Facebook credentials.}
11
11
  s.email = %q{andrew@andrew-hite.com}
12
12
  s.extra_rdoc_files = ["README.rdoc", "lib/authlogic_oauth2.rb", "lib/authlogic_oauth2/acts_as_authentic.rb", "lib/authlogic_oauth2/helper.rb", "lib/authlogic_oauth2/oauth2_process.rb", "lib/authlogic_oauth2/session.rb", "lib/authlogic_oauth2/version.rb", "lib/oauth2_callback_filter.rb"]
@@ -10,9 +10,16 @@ Authlogic::Session::Base.send(:include, AuthlogicOauth2::Session)
10
10
  ActionController::Base.helper AuthlogicOauth2::Helper
11
11
 
12
12
  # Throw callback rack app into the middleware stack
13
- ActionController::Dispatcher.middleware = ActionController::MiddlewareStack.new do |m|
14
- ActionController::Dispatcher.middleware.each do |klass|
15
- m.use klass
13
+ if defined?(ActionController::Metal)
14
+ # Rails >= 3.0
15
+ require 'oauth2_callback_filter'
16
+ if Rails.application.instance_variable_get('@app')
17
+ Rails.application.instance_variable_set('@app', Oauth2CallbackFilter.new(Rails.application.app))
18
+ else
19
+ Rails.configuration.middleware.use(Oauth2CallbackFilter)
16
20
  end
17
- m.use Oauth2CallbackFilter
21
+ elsif defined?(ActionController::Dispatcher) && defined?(ActionController::Dispatcher.middleware)
22
+ # Rails >= 2.3
23
+ require 'oauth2_callback_filter'
24
+ ActionController::Dispatcher.middleware.use(Oauth2CallbackFilter)
18
25
  end
@@ -41,7 +41,7 @@ module AuthlogicOauth2
41
41
 
42
42
  MAJOR = 1
43
43
  MINOR = 0
44
- TINY = 1
44
+ TINY = 2
45
45
 
46
46
  # The current version as a Version instance
47
47
  CURRENT = new(MAJOR, MINOR, TINY)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authlogic_oauth2
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 1
10
- version: 1.0.1
9
+ - 2
10
+ version: 1.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Andrew Hite
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-06-13 00:00:00 -05:00
18
+ date: 2010-06-14 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency