omniauth-stripe-platform 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,6 +12,32 @@ module OmniAuth
12
12
  option :client_options, {
13
13
  :site => 'https://manage.stripe.com'
14
14
  }
15
+
16
+ uid { raw_info[:stripe_user_id] }
17
+
18
+ info do
19
+ {
20
+ :scope => raw_info[:scope],
21
+ :livemode => raw_info[:livemode],
22
+ :access_token => raw_info[:access_token],
23
+ :expires_in => raw_info[:expires_in],
24
+ :stripe_publishable_key => raw_info[:stripe_publishable_key]
25
+ }
26
+ end
27
+
28
+ extra do
29
+ {
30
+ :raw_info => raw_info
31
+ }
32
+ end
33
+
34
+ def raw_info
35
+ if access_token.expires? && access_token.expired?
36
+ @raw_info = access_token.refresh!
37
+ else
38
+ @raw_info ||= access_token.post(access_token.client.token_url).parsed || {}
39
+ end
40
+ end
15
41
  end
16
42
  end
17
43
  end
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module StripePlatform
3
- VERSION = "0.0.4"
3
+ VERSION = "0.0.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-stripe-platform
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-18 00:00:00.000000000 Z
12
+ date: 2012-06-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: omniauth
@@ -74,7 +74,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
74
74
  version: '0'
75
75
  segments:
76
76
  - 0
77
- hash: 693889340931146168
77
+ hash: -3242333416253371447
78
78
  required_rubygems_version: !ruby/object:Gem::Requirement
79
79
  none: false
80
80
  requirements:
@@ -83,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
83
  version: '0'
84
84
  segments:
85
85
  - 0
86
- hash: 693889340931146168
86
+ hash: -3242333416253371447
87
87
  requirements: []
88
88
  rubyforge_project:
89
89
  rubygems_version: 1.8.24