stripe 3.9.0 → 3.9.1

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: eaa933a4f88560dfadd280faf2e4d1ec83aebd10
4
- data.tar.gz: dfcd075aebb73a0cfa1ac9ec67285ecfa7455c7c
3
+ metadata.gz: 723bba8860a5b21cabb16483d47c3fc049db0c18
4
+ data.tar.gz: e586b7a2d24c7197a3b16e62766b6203cc9c38e4
5
5
  SHA512:
6
- metadata.gz: 17ca14c655082ca4e391f0e0b0c9df06bc0055ba4ac28a97d071bff03ffed4b24b72240dcb5851f8bfbca30d3ed5a1211fad99f0af75a64f93b300976573abc3
7
- data.tar.gz: f598845295dfeff3ac84cff079d98a62410815b72169182bddbceb81b092725dddf47451c6fe9e77fa448aead3d41dd9bbf348e2f6c0080f20dd829f6f086982
6
+ metadata.gz: e47a259ec4ed3e5ff6bea20e220617de06e6e1beacdd0682e78640d06ff7e13110a0d9f9d01474eec8192d821027fd24be8c307ddf87992a9705db845c6aaf46
7
+ data.tar.gz: 8683583d898179e103d59ba325806b1d4c806cf2863fdc22948a41dd159646427374466ad17a2d57c313f9cce43273a07e859de9c515bf68174b3033b4f8c94b
data/.gitignore CHANGED
@@ -4,3 +4,4 @@
4
4
  Gemfile.lock
5
5
  tags
6
6
  /.bundle/
7
+ coverage/
@@ -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
@@ -3,6 +3,7 @@ source "https://rubygems.org"
3
3
  gemspec
4
4
 
5
5
  group :development do
6
+ gem "coveralls", require: false
6
7
  gem "mocha", "~> 0.13.2"
7
8
  gem "rake"
8
9
  gem "shoulda-context"
data/README.md CHANGED
@@ -1,4 +1,7 @@
1
- # Stripe Ruby Library [![Build Status](https://travis-ci.org/stripe/stripe-ruby.svg?branch=master)](https://travis-ci.org/stripe/stripe-ruby)
1
+ # Stripe Ruby Library
2
+
3
+ [![Build Status](https://travis-ci.org/stripe/stripe-ruby.svg?branch=master)](https://travis-ci.org/stripe/stripe-ruby)
4
+ [![Coverage Status](https://coveralls.io/repos/github/stripe/stripe-ruby/badge.svg?branch=master)](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.0
1
+ 3.9.1
@@ -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` with an `UploadIO` object
24
- # if we're given one.
25
- if params[:file] && [File, Tempfile].any? { |klass| params[:file].is_a?(klass) }
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
 
@@ -1,3 +1,3 @@
1
1
  module Stripe
2
- VERSION = "3.9.0".freeze
2
+ VERSION = "3.9.1".freeze
3
3
  end
@@ -1,3 +1,6 @@
1
+ require "coveralls"
2
+ Coveralls.wear!("test_frameworks")
3
+
1
4
  require "stripe"
2
5
  require "test/unit"
3
6
  require "mocha/setup"
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.0
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-08 00:00:00.000000000 Z
11
+ date: 2017-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday