authlogic-oauth 1.0.5 → 1.0.6

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.
data/CHANGELOG.rdoc CHANGED
@@ -1,3 +1,8 @@
1
+ == 1.0.6 released 2009-6-29
2
+
3
+ * Any attributes set on the User model before saving, will now be maintained after the user
4
+ returns from authenticating with the oauth server.
5
+
1
6
  == 1.0.4 released 2009-6-27
2
7
 
3
8
  * Bug fix
@@ -58,6 +58,8 @@ module AuthlogicOauth
58
58
 
59
59
  def save(perform_validation = true, &block)
60
60
  if perform_validation && block_given? && redirecting_to_oauth_server?
61
+ # Save attributes so they aren't lost during the authentication with the oauth server
62
+ session_class.controller.session[:authlogic_oauth_attributes] = attributes.reject!{|k, v| v.blank?}
61
63
  redirect_to_oauth
62
64
  return false
63
65
  end
@@ -83,6 +85,8 @@ module AuthlogicOauth
83
85
  end
84
86
 
85
87
  def authenticate_with_oauth
88
+ # Restore any attributes which were saved before redirecting to the oauth server
89
+ self.attributes = session_class.controller.session.delete(:authlogic_oauth_attributes)
86
90
  access_token = generate_access_token
87
91
 
88
92
  self.oauth_token = access_token.token
@@ -41,7 +41,7 @@ module AuthlogicOauth
41
41
 
42
42
  MAJOR = 1
43
43
  MINOR = 0
44
- TINY = 5
44
+ TINY = 6
45
45
 
46
46
  # The current version as a Version instance
47
47
  CURRENT = new(MAJOR, MINOR, TINY)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authlogic-oauth
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Allison
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-06-27 00:00:00 -04:00
12
+ date: 2009-06-29 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency