tardate-authlogic_rpx 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.rdoc CHANGED
@@ -1,3 +1,9 @@
1
+ == 1.0.1 released 2009-09-26
2
+
3
+ * Initial public release
4
+ * RPX profile mappings switched to use indirect Authlogic field naming
5
+ * Documentation updated
6
+
1
7
  == 1.0.0 released 2009-09-25
2
8
 
3
9
  * Initial release
data/Manifest CHANGED
@@ -3,6 +3,7 @@ MIT-LICENSE
3
3
  Manifest
4
4
  README.rdoc
5
5
  Rakefile
6
+ authlogic_rpx.gemspec
6
7
  init.rb
7
8
  lib/authlogic_rpx.rb
8
9
  lib/authlogic_rpx/acts_as_authentic.rb
data/README.rdoc CHANGED
@@ -35,7 +35,7 @@ Three gems are required: authlogic, grosser-rpx_now, and tardate-authlogic_rpx.
35
35
  Currently tested versions:
36
36
  * authlogic 2.1.1
37
37
  * grosser-rpx_now 0.5.10
38
- * tardate-authlogic_rpx 1.0.0
38
+ * tardate-authlogic_rpx 1.0.1
39
39
 
40
40
 
41
41
  === 1. Direct gem installation
@@ -171,9 +171,12 @@ If you have other fields you want to map, you can provide your own implementatio
171
171
  # see https://rpxnow.com/docs#profile_data for the definition of available attributes
172
172
  #
173
173
  def map_rpx_data
174
- # map core profile data
175
- self.attempted_record.email = @rpx_data['profile']['email'] if attempted_record.email.blank?
176
- self.attempted_record.username = @rpx_data['profile']['preferredUsername'] if attempted_record.username.blank?
174
+ # map core profile data using authlogic indirect column names
175
+ self.attempted_record.send("#{klass.login_field}=", @rpx_data['profile']['preferredUsername'] ) if attempted_record.send(klass.login_field).blank?
176
+ self.attempted_record.send("#{klass.email_field}=", @rpx_data['profile']['email'] ) if attempted_record.send(klass.email_field).blank?
177
+
178
+ # map some other columns explicityl
179
+ self.attempted_record.fullname = @rpx_data['profile']['displayName'] if attempted_record.fullname.blank?
177
180
 
178
181
  if rpx_extended_info?
179
182
  # map some extended attributes
@@ -182,7 +185,6 @@ If you have other fields you want to map, you can provide your own implementatio
182
185
 
183
186
  end
184
187
 
185
-
186
188
  === 4. Add application controller helpers: current_user, current_user_session
187
189
 
188
190
  We'll add current_user and current_user_session helpers. These can then be used in controllers and views to get a handle on the "current" logged in user.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{authlogic_rpx}
5
- s.version = "1.0.0"
5
+ s.version = "1.0.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Paul Gallagher / tardate"]
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.description = %q{Authlogic extension/plugin that provides RPX (rpxnow.com) authentication support}
11
11
  s.email = %q{gallagher.paul@gmail.com}
12
12
  s.extra_rdoc_files = ["CHANGELOG.rdoc", "README.rdoc", "lib/authlogic_rpx.rb", "lib/authlogic_rpx/acts_as_authentic.rb", "lib/authlogic_rpx/helper.rb", "lib/authlogic_rpx/session.rb", "lib/authlogic_rpx/version.rb"]
13
- s.files = ["CHANGELOG.rdoc", "MIT-LICENSE", "Manifest", "README.rdoc", "Rakefile", "init.rb", "lib/authlogic_rpx.rb", "lib/authlogic_rpx/acts_as_authentic.rb", "lib/authlogic_rpx/helper.rb", "lib/authlogic_rpx/session.rb", "lib/authlogic_rpx/version.rb", "rails/init.rb", "test/acts_as_authentic_test.rb", "test/fixtures/users.yml", "test/libs/rails_trickery.rb", "test/libs/user.rb", "test/libs/user_session.rb", "test/session_test.rb", "test/test_helper.rb", "authlogic_rpx.gemspec"]
13
+ s.files = ["CHANGELOG.rdoc", "MIT-LICENSE", "Manifest", "README.rdoc", "Rakefile", "authlogic_rpx.gemspec", "init.rb", "lib/authlogic_rpx.rb", "lib/authlogic_rpx/acts_as_authentic.rb", "lib/authlogic_rpx/helper.rb", "lib/authlogic_rpx/session.rb", "lib/authlogic_rpx/version.rb", "rails/init.rb", "test/acts_as_authentic_test.rb", "test/fixtures/users.yml", "test/libs/rails_trickery.rb", "test/libs/user.rb", "test/libs/user_session.rb", "test/session_test.rb", "test/test_helper.rb"]
14
14
  s.homepage = %q{http://github.com/tardate/authlogic_rpx}
15
15
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Authlogic_rpx", "--main", "README.rdoc"]
16
16
  s.require_paths = ["lib"]
@@ -167,8 +167,8 @@ module AuthlogicRpx
167
167
  # see https://rpxnow.com/docs#profile_data for the definition of available attributes
168
168
  #
169
169
  def map_rpx_data
170
- self.attempted_record.email = @rpx_data['profile']['email'] if attempted_record.email.blank?
171
- self.attempted_record.username = @rpx_data['profile']['preferredUsername'] if attempted_record.username.blank?
170
+ self.attempted_record.send("#{klass.login_field}=", @rpx_data['profile']['preferredUsername'] ) if attempted_record.send(klass.login_field).blank?
171
+ self.attempted_record.send("#{klass.email_field}=", @rpx_data['profile']['email'] ) if attempted_record.send(klass.email_field).blank?
172
172
  end
173
173
 
174
174
  end
@@ -41,7 +41,7 @@ module AuthlogicRpx
41
41
 
42
42
  MAJOR = 1
43
43
  MINOR = 0
44
- TINY = 0
44
+ TINY = 1
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: tardate-authlogic_rpx
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Gallagher / tardate
@@ -52,6 +52,7 @@ files:
52
52
  - Manifest
53
53
  - README.rdoc
54
54
  - Rakefile
55
+ - authlogic_rpx.gemspec
55
56
  - init.rb
56
57
  - lib/authlogic_rpx.rb
57
58
  - lib/authlogic_rpx/acts_as_authentic.rb
@@ -66,7 +67,6 @@ files:
66
67
  - test/libs/user_session.rb
67
68
  - test/session_test.rb
68
69
  - test/test_helper.rb
69
- - authlogic_rpx.gemspec
70
70
  has_rdoc: false
71
71
  homepage: http://github.com/tardate/authlogic_rpx
72
72
  licenses: