stripe 3.31.1 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +0 -1
- data/CHANGELOG.md +4 -0
- data/Gemfile +3 -7
- data/VERSION +1 -1
- data/lib/stripe/stripe_client.rb +12 -5
- data/lib/stripe/version.rb +1 -1
- data/stripe.gemspec +2 -1
- data/test/test_helper.rb +2 -1
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e387c7b3d7b8dcded5cc22edd5b99f7930c3434f
|
4
|
+
data.tar.gz: 6316ec0e749191593429b3ad839045196869b50b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9aa93b90808be8411c01818a55bcff5bf8ad645107da23469267b087c5594c2ffd11ec1f25638394dcaa75662a41c37361792e084a3c9b07d69e19de638f53cf
|
7
|
+
data.tar.gz: 22390b6f5e797a283f93707dc631b25d15ce264bf78751efb8a1442a04c68266f0ed4f59eacf8a36bbe3f57577bbb138e6dec51823ba4d99f839aed6a974cdf6
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 4.0.0 - 2018-11-15
|
4
|
+
* [#698](https://github.com/stripe/stripe-ruby/pull/698) Use persistent connections by default through `Net::HTTP::Persistent`
|
5
|
+
* [#698](https://github.com/stripe/stripe-ruby/pull/698) Drop support for Ruby 2.0 (which we consider a breaking change here)
|
6
|
+
|
3
7
|
## 3.31.1 - 2018-11-12
|
4
8
|
* [#697](https://github.com/stripe/stripe-ruby/pull/697) Send telemetry in milliseconds specifically
|
5
9
|
|
data/Gemfile
CHANGED
@@ -30,12 +30,8 @@ group :development do
|
|
30
30
|
end
|
31
31
|
|
32
32
|
platforms :mri do
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
gem "byebug"
|
37
|
-
gem "pry"
|
38
|
-
gem "pry-byebug"
|
39
|
-
end
|
33
|
+
gem "byebug"
|
34
|
+
gem "pry"
|
35
|
+
gem "pry-byebug"
|
40
36
|
end
|
41
37
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
4.0.0
|
data/lib/stripe/stripe_client.rb
CHANGED
@@ -31,11 +31,18 @@ module Stripe
|
|
31
31
|
# of connection re-use, so make sure that we have a separate connection
|
32
32
|
# object per thread.
|
33
33
|
Thread.current[:stripe_client_default_conn] ||= begin
|
34
|
-
conn = Faraday.new do |
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
34
|
+
conn = Faraday.new do |builder|
|
35
|
+
builder.use Faraday::Request::Multipart
|
36
|
+
builder.use Faraday::Request::UrlEncoded
|
37
|
+
builder.use Faraday::Response::RaiseError
|
38
|
+
|
39
|
+
# Net::HTTP::Persistent doesn't seem to do well on JRuby, so fall
|
40
|
+
# back to default there.
|
41
|
+
if RUBY_PLATFORM == "java"
|
42
|
+
builder.adapter :net_http
|
43
|
+
else
|
44
|
+
builder.adapter :net_http_persistent
|
45
|
+
end
|
39
46
|
end
|
40
47
|
|
41
48
|
if Stripe.verify_ssl_certs
|
data/lib/stripe/version.rb
CHANGED
data/stripe.gemspec
CHANGED
@@ -7,7 +7,7 @@ require "stripe/version"
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "stripe"
|
9
9
|
s.version = Stripe::VERSION
|
10
|
-
s.required_ruby_version = ">= 2.
|
10
|
+
s.required_ruby_version = ">= 2.1.0"
|
11
11
|
s.summary = "Ruby bindings for the Stripe API"
|
12
12
|
s.description = "Stripe is the easiest way to accept payments online. See https://stripe.com for details."
|
13
13
|
s.author = "Stripe"
|
@@ -16,6 +16,7 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.license = "MIT"
|
17
17
|
|
18
18
|
s.add_dependency("faraday", "~> 0.10")
|
19
|
+
s.add_dependency("net-http-persistent", "~> 3.0")
|
19
20
|
|
20
21
|
s.files = `git ls-files`.split("\n")
|
21
22
|
s.test_files = `git ls-files -- test/*`.split("\n")
|
data/test/test_helper.rb
CHANGED
@@ -27,7 +27,8 @@ WebMock.disable_net_connect!(allow: "localhost:#{MOCK_PORT}")
|
|
27
27
|
# we can print one error and fail fast so that it's more clear to the user how
|
28
28
|
# they should fix the problem.
|
29
29
|
begin
|
30
|
-
|
30
|
+
conn = Faraday::Connection.new("http://localhost:#{MOCK_PORT}")
|
31
|
+
resp = conn.get("/")
|
31
32
|
version = resp.headers["Stripe-Mock-Version"]
|
32
33
|
if version != "master" &&
|
33
34
|
Gem::Version.new(version) < Gem::Version.new(MOCK_MINIMUM_VERSION)
|
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
|
+
version: 4.0.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-11-
|
11
|
+
date: 2018-11-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0.10'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: net-http-persistent
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3.0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '3.0'
|
27
41
|
description: Stripe is the easiest way to accept payments online. See https://stripe.com
|
28
42
|
for details.
|
29
43
|
email: support@stripe.com
|
@@ -215,7 +229,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
215
229
|
requirements:
|
216
230
|
- - ">="
|
217
231
|
- !ruby/object:Gem::Version
|
218
|
-
version: 2.
|
232
|
+
version: 2.1.0
|
219
233
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
220
234
|
requirements:
|
221
235
|
- - ">="
|