rpx_now 0.6.12 → 0.6.13

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,7 @@
1
+ 0.6.13
2
+ ------
3
+ * return an indifferent hash from user_data when possible
4
+
1
5
  0.6.12
2
6
  -----
3
7
  * url encode obstrusive popup code token-url
data/README.markdown CHANGED
@@ -28,12 +28,14 @@ Install
28
28
  Examples
29
29
  ========
30
30
 
31
+ [Example application](http://github.com/grosser/rpx_now_example), go play around!
32
+
31
33
  View
32
34
  ----
33
35
  #'mywebsite' is your subdomain/realm on RPX
34
- <%=RPXNow.embed_code('mywebsite', url_for(:controller=>:session, :action=>:rpx_token))%>
36
+ <%=RPXNow.embed_code('mywebsite', url_for(:controller=>:session, :action=>:rpx_token, :only_path => false))%>
35
37
  OR
36
- <%=RPXNow.popup_code('Login here...', 'mywebsite', url_for(:controller=>:session, :action=>:rpx_token), options)%>
38
+ <%=RPXNow.popup_code('Login here...', 'mywebsite', url_for(:controller=>:session, :action=>:rpx_token, :only_path => false), options)%>
37
39
 
38
40
  ###Options
39
41
  `:language=>'en'` rpx tries to detect the users language, but you may overwrite it [possible languages](https://rpxnow.com/docs#sign-in_localization)
@@ -42,7 +44,7 @@ View
42
44
 
43
45
  ###Unobtrusive / JS-last
44
46
  `popup_code` can also be called with `:unobtrusive=>true` ( --> just link without javascript include).
45
- To still get the normal popup add `RPXNow.popup_source('mywebsite', url_for(:controller=>:session, :action=>:rpx_token), [options])`.
47
+ To still get the normal popup add `RPXNow.popup_source('mywebsite', url_for(:controller=>:session, :action=>:rpx_token, :only_path => false), [options])`.
46
48
  Options like :language / :flags should be given for both.
47
49
 
48
50
  environment.rb
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.12
1
+ 0.6.13
data/lib/rpx_now.rb CHANGED
@@ -18,7 +18,8 @@ module RPXNow
18
18
  def user_data(token, options={})
19
19
  begin
20
20
  data = Api.call("auth_info", options.merge(:token => token))
21
- if block_given? then yield(data) else parse_user_data(data, options) end
21
+ result = (block_given? ? yield(data) : parse_user_data(data, options))
22
+ result.respond_to?(:with_indifferent_access) ? result.with_indifferent_access : result
22
23
  rescue ServerError
23
24
  return nil if $!.to_s=~/Data not found/
24
25
  raise
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.12"
8
+ s.version = "0.6.13"
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{2010-01-16}
12
+ s.date = %q{2010-02-20}
13
13
  s.email = %q{grosser.michael@gmail.com}
14
14
  s.extra_rdoc_files = [
15
15
  "README.markdown"
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.12
4
+ version: 0.6.13
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: 2010-01-16 00:00:00 +01:00
12
+ date: 2010-02-20 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency