stripe 4.4.1 → 4.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/VERSION +1 -1
- data/lib/stripe/oauth.rb +4 -1
- data/lib/stripe/version.rb +1 -1
- data/test/stripe/oauth_test.rb +9 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 176cc43da4fb0e5967142300c7d5f22f4c13b21b81dfc01dd703a99396d3cb39
|
4
|
+
data.tar.gz: a7c12a9c2d2758377902ef75822ede38e9e0680343778e080cb6c6cec7b814fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d01504fe2c3080c4ffd469f91c8250da6e98ddc519df7182d0c0c2d92d1095be58669a619f880b9bef831be96905fece73c14fdc81d56af1a9a74d2f5a30ad1
|
7
|
+
data.tar.gz: 22795339a7d756f0960f8dba40dd4e9541d01e11e0cd48b0bfde30dbd0e29574c9c206288457a8a3e86c94a916c3358d787670c22053507ea11557274794bfb1
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 4.5.0 - 2019-01-02
|
4
|
+
* [#719](https://github.com/stripe/stripe-ruby/pull/719) Generate OAuth authorize URLs for Express accounts as well as standard
|
5
|
+
|
3
6
|
## 4.4.1 - 2018-12-31
|
4
7
|
* [#718](https://github.com/stripe/stripe-ruby/pull/718) Fix an error message typo
|
5
8
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
4.
|
1
|
+
4.5.0
|
data/lib/stripe/oauth.rb
CHANGED
@@ -31,11 +31,14 @@ module Stripe
|
|
31
31
|
def self.authorize_url(params = {}, opts = {})
|
32
32
|
base = opts[:connect_base] || Stripe.connect_base
|
33
33
|
|
34
|
+
path = "/oauth/authorize"
|
35
|
+
path = "/express" + path if opts[:express]
|
36
|
+
|
34
37
|
params[:client_id] = get_client_id(params)
|
35
38
|
params[:response_type] ||= "code"
|
36
39
|
query = Util.encode_parameters(params)
|
37
40
|
|
38
|
-
"#{base}
|
41
|
+
"#{base}#{path}?#{query}"
|
39
42
|
end
|
40
43
|
|
41
44
|
def self.token(params = {}, opts = {})
|
data/lib/stripe/version.rb
CHANGED
data/test/stripe/oauth_test.rb
CHANGED
@@ -35,6 +35,15 @@ module Stripe
|
|
35
35
|
assert_equal(["https://example.com/profile/test"], params["stripe_user[url]"])
|
36
36
|
assert_equal(["US"], params["stripe_user[country]"])
|
37
37
|
end
|
38
|
+
|
39
|
+
should "optionally return an express path" do
|
40
|
+
uri_str = OAuth.authorize_url({}, express: true)
|
41
|
+
|
42
|
+
uri = URI.parse(uri_str)
|
43
|
+
assert_equal("https", uri.scheme)
|
44
|
+
assert_equal("connect.stripe.com", uri.host)
|
45
|
+
assert_equal("/express/oauth/authorize", uri.path)
|
46
|
+
end
|
38
47
|
end
|
39
48
|
|
40
49
|
context ".token" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stripe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stripe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|