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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 25ebfbf84bcee0acb6cab757e949ab8654b7e41d
4
- data.tar.gz: '09546cf8adf0ad0dbfabd54675e256edfabdfab5'
3
+ metadata.gz: e387c7b3d7b8dcded5cc22edd5b99f7930c3434f
4
+ data.tar.gz: 6316ec0e749191593429b3ad839045196869b50b
5
5
  SHA512:
6
- metadata.gz: c10a085b2465b5da8ba4490d6c34cd25be875fa5bdb0de22e4e02c25b457d7d57bf8476c8126c0a2f1c7df9d4f0b4a401f0341b0bc2b230cd3cc535b40e40f9d
7
- data.tar.gz: 6779c4a2e3561ec53bc52a929cb51c17d9b17b2eea2ffb35f511924a84a8690be9f32022055de581d165a34d45adb2e74598583ae532cd13a5e47db3277e0ef4
6
+ metadata.gz: 9aa93b90808be8411c01818a55bcff5bf8ad645107da23469267b087c5594c2ffd11ec1f25638394dcaa75662a41c37361792e084a3c9b07d69e19de638f53cf
7
+ data.tar.gz: 22390b6f5e797a283f93707dc631b25d15ce264bf78751efb8a1442a04c68266f0ed4f59eacf8a36bbe3f57577bbb138e6dec51823ba4d99f839aed6a974cdf6
@@ -1,7 +1,6 @@
1
1
  language: ruby
2
2
 
3
3
  rvm:
4
- - 2.0
5
4
  - 2.1
6
5
  - 2.2
7
6
  - 2.3
@@ -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
- # to avoid problems, bring Byebug in on just versions of Ruby under which
34
- # it's known to work well
35
- if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new("2.0.0")
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
- 3.31.1
1
+ 4.0.0
@@ -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 |c|
35
- c.use Faraday::Request::Multipart
36
- c.use Faraday::Request::UrlEncoded
37
- c.use Faraday::Response::RaiseError
38
- c.adapter Faraday.default_adapter
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stripe
4
- VERSION = "3.31.1".freeze
4
+ VERSION = "4.0.0".freeze
5
5
  end
@@ -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.0.0"
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")
@@ -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
- resp = Faraday.get("http://localhost:#{MOCK_PORT}/")
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: 3.31.1
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-13 00:00:00.000000000 Z
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.0.0
232
+ version: 2.1.0
219
233
  required_rubygems_version: !ruby/object:Gem::Requirement
220
234
  requirements:
221
235
  - - ">="