omniauth-stripe-connect 2.5.0 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b2bf24ebcf5c04cbd924c85e104451e1b31ff363
4
- data.tar.gz: 6ce956526f0b059aea13ee4c207e38edff64b6d7
3
+ metadata.gz: d953bb9707bffa026f8d4b1b380e0b5cb930a375
4
+ data.tar.gz: 4bd98adc4cb1ff964f4f3af0b8ef39b060a7c156
5
5
  SHA512:
6
- metadata.gz: 1f2237315286c58f926825665936747f517c3c50c38b8959038c3b388a793f7f7d4a43e3805960ca707ca40374e738e2c24798baaf810833c807de45fa8d1d5f
7
- data.tar.gz: 00fbc0b7ba3ef038925c216591aebd659d10459ef8f4b0cd4a21358562fbdfe6c104ff2c0b468c2b349cbf66c17fff62407e086fe6100bd02b12bc93502bf3f4
6
+ metadata.gz: 5ff417e35cbe4fa126314b4eb09de07579985bdc8809a11f224ee0845efbdcddcada2a8d7d99d7be08d93e017eb21d36557a9b917e700f58832a590e10e12a51
7
+ data.tar.gz: fc62c1636a10811b77ed3ae2a8d28bd03d88099940591b6cc11838050d33980713c6c3e3941374b59c8e09641b025861a477da0ecf96e838067b4cd98bab4195
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module StripeConnect
3
- VERSION = "2.5.0"
3
+ VERSION = "2.6.0"
4
4
  end
5
5
  end
@@ -16,6 +16,9 @@ module OmniAuth
16
16
 
17
17
  info do
18
18
  {
19
+ :name => extra_info[:display_name] || extra_info[:business_name] || extra_info[:email],
20
+ :email => extra_info[:email],
21
+ :nickname => extra_info[:display_name],
19
22
  :scope => raw_info[:scope],
20
23
  :livemode => raw_info[:livemode],
21
24
  :stripe_publishable_key => raw_info[:stripe_publishable_key]
@@ -23,9 +26,12 @@ module OmniAuth
23
26
  end
24
27
 
25
28
  extra do
26
- {
29
+ e = {
27
30
  :raw_info => raw_info
28
31
  }
32
+ e[:extra_info] = extra_info unless skip_info?
33
+
34
+ e
29
35
  end
30
36
 
31
37
  credentials do
@@ -40,6 +46,10 @@ module OmniAuth
40
46
  @raw_info ||= deep_symbolize(access_token.params)
41
47
  end
42
48
 
49
+ def extra_info
50
+ @extra_info ||= deep_symbolize(access_token.get("https://api.stripe.com/v1/account").parsed)
51
+ end
52
+
43
53
  def redirect_params
44
54
  if options.key?(:callback_path) || OmniAuth.config.full_host
45
55
  {:redirect_uri => callback_url}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-stripe-connect
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0
4
+ version: 2.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Isaac Sanders
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-11 00:00:00.000000000 Z
11
+ date: 2015-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth