stripe 3.9.0 → 3.9.1
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 +4 -4
- data/.gitignore +1 -0
- data/CHANGELOG.md +3 -0
- data/Gemfile +1 -0
- data/README.md +4 -1
- data/VERSION +1 -1
- data/lib/stripe/file_upload.rb +3 -5
- data/lib/stripe/version.rb +1 -1
- data/test/test_helper.rb +3 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 723bba8860a5b21cabb16483d47c3fc049db0c18
|
|
4
|
+
data.tar.gz: e586b7a2d24c7197a3b16e62766b6203cc9c38e4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e47a259ec4ed3e5ff6bea20e220617de06e6e1beacdd0682e78640d06ff7e13110a0d9f9d01474eec8192d821027fd24be8c307ddf87992a9705db845c6aaf46
|
|
7
|
+
data.tar.gz: 8683583d898179e103d59ba325806b1d4c806cf2863fdc22948a41dd159646427374466ad17a2d57c313f9cce43273a07e859de9c515bf68174b3033b4f8c94b
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.9.1 - 2017-12-15
|
|
4
|
+
* [#616](https://github.com/stripe/stripe-ruby/pull/616) Support all file-like objects for uploads with duck typed checks on `path` and `read` (we previously whitelisted only certain classes)
|
|
5
|
+
|
|
3
6
|
## 3.9.0 - 2017-12-08
|
|
4
7
|
* [#613](https://github.com/stripe/stripe-ruby/pull/613) Introduce new `IdempotencyError` type for idempotency-specific failures
|
|
5
8
|
|
data/Gemfile
CHANGED
data/README.md
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
# Stripe Ruby Library
|
|
1
|
+
# Stripe Ruby Library
|
|
2
|
+
|
|
3
|
+
[](https://travis-ci.org/stripe/stripe-ruby)
|
|
4
|
+
[](https://coveralls.io/github/stripe/stripe-ruby?branch=master)
|
|
2
5
|
|
|
3
6
|
The Stripe Ruby library provides convenient access to the Stripe API from
|
|
4
7
|
applications written in the Ruby language. It includes a pre-defined set of
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.9.
|
|
1
|
+
3.9.1
|
data/lib/stripe/file_upload.rb
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
require "tempfile"
|
|
2
|
-
|
|
3
1
|
module Stripe
|
|
4
2
|
class FileUpload < APIResource
|
|
5
3
|
extend Stripe::APIOperations::Create
|
|
@@ -20,9 +18,9 @@ module Stripe
|
|
|
20
18
|
|
|
21
19
|
def self.create(params = {}, opts = {})
|
|
22
20
|
# rest-client would accept a vanilla `File` for upload, but Faraday does
|
|
23
|
-
# not. Support the old API by wrapping a `File
|
|
24
|
-
# if we're given one.
|
|
25
|
-
if params[:file] && [
|
|
21
|
+
# not. Support the old API by wrapping a `File`-like object with an
|
|
22
|
+
# `UploadIO` object if we're given one.
|
|
23
|
+
if params[:file] && params[:file].respond_to?(:path) && params[:file].respond_to?(:read)
|
|
26
24
|
params[:file] = Faraday::UploadIO.new(params[:file], nil)
|
|
27
25
|
end
|
|
28
26
|
|
data/lib/stripe/version.rb
CHANGED
data/test/test_helper.rb
CHANGED
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.9.
|
|
4
|
+
version: 3.9.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stripe
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-12-
|
|
11
|
+
date: 2017-12-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|