stripe 4.4.1 → 4.5.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d1df52a297e70052aeb384082e215945ae3ca4c7f5269b284fab2e3f2a14c3f7
4
- data.tar.gz: 3841e60c6dc529a32b175b67020fc5b55bb7ae684a45d4b5c650071a3e841491
3
+ metadata.gz: 176cc43da4fb0e5967142300c7d5f22f4c13b21b81dfc01dd703a99396d3cb39
4
+ data.tar.gz: a7c12a9c2d2758377902ef75822ede38e9e0680343778e080cb6c6cec7b814fc
5
5
  SHA512:
6
- metadata.gz: c9c6d3cd1d35c6ee4d6203f82d03682fa97319fbc1ec601c974465d3e98917ed330e33a04e96008efdb8f16116886d0a6bbfbd111f38d2fb120f5af2ee1a426c
7
- data.tar.gz: 3c6e277707c0bbe950f63b964c61eb012668ae3750c06e0b0e601c194fbe9038cd8be6bebae7ebd2fe92cf546adc9fcb96d9d6dcd454e55658971d4762826989
6
+ metadata.gz: 1d01504fe2c3080c4ffd469f91c8250da6e98ddc519df7182d0c0c2d92d1095be58669a619f880b9bef831be96905fece73c14fdc81d56af1a9a74d2f5a30ad1
7
+ data.tar.gz: 22795339a7d756f0960f8dba40dd4e9541d01e11e0cd48b0bfde30dbd0e29574c9c206288457a8a3e86c94a916c3358d787670c22053507ea11557274794bfb1
@@ -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.4.1
1
+ 4.5.0
@@ -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}/oauth/authorize?#{query}"
41
+ "#{base}#{path}?#{query}"
39
42
  end
40
43
 
41
44
  def self.token(params = {}, opts = {})
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stripe
4
- VERSION = "4.4.1".freeze
4
+ VERSION = "4.5.0".freeze
5
5
  end
@@ -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.1
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: 2018-12-31 00:00:00.000000000 Z
11
+ date: 2019-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday