grosser-rpx_now 0.5.7 → 0.5.8

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :minor: 5
3
- :patch: 7
3
+ :patch: 8
4
4
  :major: 0
data/lib/rpx_now.rb CHANGED
@@ -64,10 +64,11 @@ module RPXNow
64
64
  end
65
65
  alias get_contacts contacts
66
66
 
67
- def embed_code(subdomain,url)
67
+ def embed_code(subdomain,url,options={})
68
+ options = {:width => '400', :height => '240', :language => 'en'}.merge(options)
68
69
  <<EOF
69
- <iframe src="https://#{subdomain}.#{HOST}/openid/embed?token_url=#{url}"
70
- scrolling="no" frameBorder="no" style="width:400px;height:240px;">
70
+ <iframe src="https://#{subdomain}.#{HOST}/openid/embed?token_url=#{url}&language_preference=#{options[:language]}"
71
+ scrolling="no" frameBorder="no" style="width:#{options[:width]}px;height:#{options[:height]}px;">
71
72
  </iframe>
72
73
  EOF
73
74
  end
data/rpx_now.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{rpx_now}
5
- s.version = "0.5.7"
5
+ s.version = "0.5.8"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Michael Grosser"]
data/spec/rpx_now_spec.rb CHANGED
@@ -24,6 +24,30 @@ describe RPXNow do
24
24
  it "contains the url" do
25
25
  RPXNow.embed_code('xxx','my_url').should =~ /token_url=my_url/
26
26
  end
27
+
28
+ it "defaults to English" do
29
+ RPXNow.embed_code('xxx', 'my_url').should =~ /language_preference=en/
30
+ end
31
+
32
+ it "has a changeable language" do
33
+ RPXNow.embed_code('xxx', 'my_url', :language => 'es').should =~ /language_preference=es/
34
+ end
35
+
36
+ it "defaults to 400px width" do
37
+ RPXNow.embed_code('xxx', 'my_url').should =~ /width:400px;/
38
+ end
39
+
40
+ it "has a changeable width" do
41
+ RPXNow.embed_code('xxx', 'my_url', :width => '300').should =~ /width:300px;/
42
+ end
43
+
44
+ it "defaults to 240px height" do
45
+ RPXNow.embed_code('xxx', 'my_url').should =~ /height:240px;/
46
+ end
47
+
48
+ it "has a changeable height" do
49
+ RPXNow.embed_code('xxx', 'my_url', :height => '500').should =~ /height:500px;/
50
+ end
27
51
  end
28
52
 
29
53
  describe :popup_code do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grosser-rpx_now
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.7
4
+ version: 0.5.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
@@ -50,6 +50,7 @@ files:
50
50
  - spec/spec_helper.rb
51
51
  has_rdoc: false
52
52
  homepage: http://github.com/grosser/rpx_now
53
+ licenses:
53
54
  post_install_message:
54
55
  rdoc_options:
55
56
  - --charset=UTF-8
@@ -70,7 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
70
71
  requirements: []
71
72
 
72
73
  rubyforge_project:
73
- rubygems_version: 1.2.0
74
+ rubygems_version: 1.3.5
74
75
  signing_key:
75
76
  specification_version: 3
76
77
  summary: Helper to simplify RPX Now user login/creation