omniauth-stripe-connect 2.10.0 → 2.10.1

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: 4387f29f832052ec5b332f15d5591eb7dbb612c8
4
- data.tar.gz: e3e5e76778209f214ec002f3ee221b92428418fe
3
+ metadata.gz: 8a0d8617b1dada6b3ea79530e7c1824fab19690d
4
+ data.tar.gz: 16c8012ac170c9138ffeef221bd1b3a0105595df
5
5
  SHA512:
6
- metadata.gz: a41264e55a7826d2df923f017968cee74c2b3e5512f54ae2672e8eaec11c8da49f8e18a375328308dd37ecff0f7e9ccdb18eb1fd8ce4b9ea9342221d29cc7a08
7
- data.tar.gz: 05664bfd1947423eb194e52e6a5e47c35f538a447072e98f2636c53d93c8ca7c8201034507b1ff608cb25ce1be4ed5801eea5ec15a5258bc46d031b346d3cf61
6
+ metadata.gz: c11cbdbc4ca6e0e5d92ab08e9726277d8282d143398d7e8ba3f468e8b7d72babc06f1eb15614e54c1340b7ddb122b42462a5895baad0b4c7ced2eed542ef496a
7
+ data.tar.gz: df610083bd72bdd79dc4e241bfb91ed26d8f780a05748b64fc328c41ccebb184451b09892cf542129d57a4e7acefdbd2a9d06d8729c1bb58879c4fc6cd1027f5
data/README.md CHANGED
@@ -69,7 +69,7 @@ The Webhook URL will be something similar:
69
69
 
70
70
  Then you can hit `/auth/stripe_connect`
71
71
 
72
- If you hit `/auth/stripe_connect` with any query params, they will be passed along to Stripe. Read [Stripe's OAuth Reference](https://stripe.com/docs/connect/reference) for more information.
72
+ If you hit `/auth/stripe_connect` with any query params, they will be passed along to Stripe. You can access these params from `request.env['omniauth.params']`. Read [Stripe's OAuth Reference](https://stripe.com/docs/connect/reference) for more information.
73
73
 
74
74
  ## Auth Hash
75
75
 
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module StripeConnect
3
- VERSION = "2.10.0"
3
+ VERSION = "2.10.1"
4
4
  end
5
5
  end
@@ -75,6 +75,10 @@ module OmniAuth
75
75
  redirect_params.merge(params)
76
76
  end
77
77
 
78
+ def callback_url
79
+ full_host + script_name + callback_path
80
+ end
81
+
78
82
  def request_phase
79
83
  redirect client.auth_code.authorize_url(authorize_params)
80
84
  end
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe OmniAuth::Strategies::StripeConnect do
4
- let(:fresh_strategy){ Class.new(OmniAuth::Strategies::StripeConnect) }
4
+ let(:fresh_strategy) { Class.new(OmniAuth::Strategies::StripeConnect) }
5
5
 
6
6
 
7
7
  before(:each) do
@@ -71,4 +71,15 @@ describe OmniAuth::Strategies::StripeConnect do
71
71
  expect(instance.token_params[:redirect_uri]).to be_nil
72
72
  end
73
73
  end
74
+
75
+ describe '#callback_url' do
76
+ subject { fresh_strategy }
77
+ OmniAuth.config.full_host = 'https://foo.com/'
78
+
79
+ it 'returns a url with the host and path' do
80
+ instance = subject.new('abc', 'def', :callback_path => 'bar/baz')
81
+ instance.authorize_params
82
+ expect(instance.callback_url).to eq 'https://foo.com/bar/baz'
83
+ end
84
+ end
74
85
  end
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.10.0
4
+ version: 2.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Isaac Sanders
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-01 00:00:00.000000000 Z
11
+ date: 2018-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth