rpx_now 0.6.11 → 0.6.12
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +3 -0
- data/README.markdown +1 -0
- data/VERSION +1 -1
- data/lib/rpx_now.rb +2 -1
- data/rpx_now.gemspec +2 -2
- data/spec/rpx_now/api_spec.rb +1 -1
- data/spec/rpx_now_spec.rb +13 -2
- metadata +2 -2
data/CHANGELOG
CHANGED
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.
|
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.
|
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{
|
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"
|
data/spec/rpx_now/api_spec.rb
CHANGED
@@ -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 ==
|
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
|
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.
|
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:
|
12
|
+
date: 2010-01-16 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|