dbalatero-rpx_now 0.4.1 → 0.4.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.
data/README.markdown CHANGED
@@ -39,7 +39,7 @@ View
39
39
  Controller
40
40
  ----------
41
41
  # simple: use defaults
42
- # user_data returns e.g. {:name=>'John Doe',:email=>'john@doe.com',:identifier=>'blug.google.com/openid/dsdfsdfs3f3'}
42
+ # user_data returns e.g. {:name=>'John Doe',:email=>'john@doe.com',:identifier=>'blug.google.com/openid/dsdfsdfs3f3',:username => 'john'}
43
43
  # when no user_data was found (invalid token supplied), data is empty, you may want to handle that seperatly...
44
44
  # your user model must have an identifier column
45
45
  def rpx_token
@@ -92,4 +92,4 @@ Author
92
92
 
93
93
  [Michael Grosser](http://pragmatig.wordpress.com)
94
94
  grosser.michael@gmail.com
95
- Hereby placed under public domain, do what you want, just do not hold me accountable...
95
+ Hereby placed under public domain, do what you want, just do not hold me accountable...
data/Rakefile ADDED
@@ -0,0 +1,27 @@
1
+ require 'rubygems'
2
+ require 'echoe'
3
+
4
+ desc "Run all specs in spec directory"
5
+ task :default do |t|
6
+ options = "--colour --format progress --loadby --reverse"
7
+ files = FileList['spec/**/*_spec.rb']
8
+ system("spec #{options} #{files}")
9
+ end
10
+
11
+ #Gemspec
12
+ begin
13
+ require 'jeweler'
14
+ Jeweler::Tasks.new do |gem|
15
+ porject_name = 'rpx_now'
16
+ gem.name = porject_name
17
+ gem.summary = "Helper to simplify RPX Now user login/creation"
18
+ gem.email = "grosser.michael@gmail.com"
19
+ gem.homepage = "http://github.com/grosser/#{porject_name}"
20
+ gem.authors = ["Michael Grosser"]
21
+ gem.add_dependency ['activesupport']
22
+ end
23
+ rescue LoadError
24
+ puts "Jeweler, or one of its dependencies, is not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
25
+ end
26
+
27
+ task :update_gemspec => [:manifest, :build_gemspec]
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
- :patch: 1
3
- :major: 0
4
2
  :minor: 4
3
+ :patch: 2
4
+ :major: 0
data/lib/rpx_now.rb CHANGED
@@ -115,7 +115,8 @@ EOF
115
115
  data = {}
116
116
  data[:identifier] = user_data['identifier']
117
117
  data[:email] = user_data['verifiedEmail'] || user_data['email']
118
- data[:name] = user_data['displayName'] || user_data['preferredUsername'] || data[:email].sub(/@.*/,'')
118
+ data[:username] = user_data['preferredUsername'] || data[:email].sub(/@.*/,'')
119
+ data[:name] = user_data['displayName'] || data[:username]
119
120
  data[:id] = user_data['primaryKey'] unless user_data['primaryKey'].to_s.empty?
120
121
  data
121
122
  end
data/spec/rpx_now_spec.rb CHANGED
@@ -76,7 +76,7 @@ describe RPXNow do
76
76
 
77
77
  it "parses JSON response to user data" do
78
78
  RPXNow.expects(:post).returns fake_response
79
- RPXNow.user_data('','x').should == {:name=>'Michael Grosser',:email=>'grosser.michael@googlemail.com',:identifier=>"https://www.google.com/accounts/o8/id?id=AItOawmaOlyYezg_WfbgP_qjaUyHjmqZD9qNIVM"}
79
+ RPXNow.user_data('','x').should == {:name=>'Michael Grosser',:email=>'grosser.michael@googlemail.com',:identifier=>"https://www.google.com/accounts/o8/id?id=AItOawmaOlyYezg_WfbgP_qjaUyHjmqZD9qNIVM", :username => 'grosser.michael'}
80
80
  end
81
81
 
82
82
  it "adds a :id when primaryKey was returned" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dbalatero-rpx_now
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-04-15 00:00:00 -07:00
12
+ date: 2009-05-22 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -28,11 +28,12 @@ executables: []
28
28
 
29
29
  extensions: []
30
30
 
31
- extra_rdoc_files: []
32
-
31
+ extra_rdoc_files:
32
+ - README.markdown
33
33
  files:
34
- - VERSION.yml
35
34
  - README.markdown
35
+ - Rakefile
36
+ - VERSION.yml
36
37
  - lib/rpx_now.rb
37
38
  - spec/rpx_now_spec.rb
38
39
  - spec/spec_helper.rb
@@ -40,7 +41,6 @@ has_rdoc: true
40
41
  homepage: http://github.com/grosser/rpx_now
41
42
  post_install_message:
42
43
  rdoc_options:
43
- - --inline-source
44
44
  - --charset=UTF-8
45
45
  require_paths:
46
46
  - lib
@@ -61,7 +61,8 @@ requirements: []
61
61
  rubyforge_project:
62
62
  rubygems_version: 1.2.0
63
63
  signing_key:
64
- specification_version: 2
64
+ specification_version: 3
65
65
  summary: Helper to simplify RPX Now user login/creation
66
- test_files: []
67
-
66
+ test_files:
67
+ - spec/rpx_now_spec.rb
68
+ - spec/spec_helper.rb