rpx_now 0.6.11 → 0.6.12

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 CHANGED
@@ -1,3 +1,6 @@
1
+ 0.6.12
2
+ -----
3
+ * url encode obstrusive popup code token-url
1
4
  0.6.0
2
5
  -----
3
6
  * removed optional api key as parameter: RPXNow.user_data(token, api_key, options) --> RPXNow.user_data(token, options), you may use :apiKey=>... instead
data/README.markdown CHANGED
@@ -128,6 +128,7 @@ __[rpx_now_gem mailing list](http://groups.google.com/group/rpx_now_gem)__
128
128
  - [Amunds](http://github.com/Amunds)
129
129
  - [DBA](http://github.com/DBA)
130
130
  - [dbalatero](http://github.com/dbalatero)
131
+ - [Paul Gallagher](http://tardate.blogspot.com/)
131
132
  - [jackdempsey](http://jackndempsey.blogspot.com)
132
133
  - [Patrick Reagan (reagent)](http://sneaq.net)
133
134
  - [Joris Trooster (trooster)](http://www.interstroom.nl)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.11
1
+ 0.6.12
data/lib/rpx_now.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require 'rpx_now/api'
2
2
  require 'rpx_now/contacts_collection'
3
+ require 'cgi'
3
4
 
4
5
  module RPXNow
5
6
  extend self
@@ -105,7 +106,7 @@ module RPXNow
105
106
 
106
107
  def self.embed_params(url, options)
107
108
  {
108
- :token_url => url,
109
+ :token_url => CGI::escape( url ),
109
110
  :language_preference => options[:language],
110
111
  :flags => options[:flags],
111
112
  :default_provider => options[:default_provider]
data/rpx_now.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rpx_now}
8
- s.version = "0.6.11"
8
+ s.version = "0.6.12"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Michael Grosser"]
12
- s.date = %q{2009-11-22}
12
+ s.date = %q{2010-01-16}
13
13
  s.email = %q{grosser.michael@gmail.com}
14
14
  s.extra_rdoc_files = [
15
15
  "README.markdown"
@@ -3,7 +3,7 @@ require 'spec/spec_helper'
3
3
  describe RPXNow::Api do
4
4
  describe 'ssl cert' do
5
5
  it "has an absolute path" do
6
- RPXNow::Api::SSL_CERT[0..0].should == '/' #start with '/'
6
+ RPXNow::Api::SSL_CERT[0..0].should == File.expand_path( RPXNow::Api::SSL_CERT )[0..0] # start with '/' on *nix, drive letter on win
7
7
  end
8
8
 
9
9
  it "exists" do
data/spec/rpx_now_spec.rb CHANGED
@@ -112,9 +112,20 @@ describe RPXNow do
112
112
  options.should == {:xxx => 1}
113
113
  end
114
114
 
115
+ describe 'obstrusive' do
116
+ it "does not encode token_url for popup" do
117
+ expected = %Q(RPXNOW.token_url = 'http://fake.domain.com/')
118
+ RPXNow.popup_code('sign on', 'subdomain', 'http://fake.domain.com/').should include(expected)
119
+ end
120
+ it "encodes token_url for unobtrusive fallback link" do
121
+ expected = %Q(<a class="rpxnow" href="https://subdomain.rpxnow.com/openid/v2/signin?token_url=http%3A%2F%2Ffake.domain.com%2F">sign on</a>)
122
+ RPXNow.popup_code('sign on', 'subdomain', 'http://fake.domain.com/').should include(expected)
123
+ end
124
+ end
125
+
115
126
  describe 'unobstrusive' do
116
- it "can build an unobtrusive widget" do
117
- expected = %Q(<a class="rpxnow" href="https://subdomain.rpxnow.com/openid/v2/signin?token_url=http://fake.domain.com/">sign on</a>)
127
+ it "can build an unobtrusive widget with encoded token_url" do
128
+ expected = %Q(<a class="rpxnow" href="https://subdomain.rpxnow.com/openid/v2/signin?token_url=http%3A%2F%2Ffake.domain.com%2F">sign on</a>)
118
129
  actual = RPXNow.popup_code('sign on', 'subdomain', 'http://fake.domain.com/', :unobtrusive => true)
119
130
  actual.should == expected
120
131
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rpx_now
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.11
4
+ version: 0.6.12
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-11-22 00:00:00 +01:00
12
+ date: 2010-01-16 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency