stripe 4.8.0 → 4.8.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2f7c24b1f5de9f966aeec73391ac6153cb4c3b44f720c89839b163b3a2d46c4e
4
- data.tar.gz: 79ec62aece03a2a98858749d1aaff4fc198b130dbd409a18fd7ba2903322d7c8
3
+ metadata.gz: baed7f5a4af8684a495ed940bf5759afd72cda87bb1f7f719e76875652aba184
4
+ data.tar.gz: 21626dd749b9eae3f53018b66de821fc5a2729add10e2a2d6851da54ec237582
5
5
  SHA512:
6
- metadata.gz: 53be26caee7e296440f78b10e83b87d7ab5e7346932a670b35a92be9bcba9e436812f47e32fc098db76edaada9acde75dcfdc8547d51769a2679609578d32ef5
7
- data.tar.gz: f1787c95d33004299cf40f469e793ca8af8072b7243ece7addb581056250f15dba338d8f000b2116623075382b031e79c08d4645fb478d7a9d1df342c27683bd
6
+ metadata.gz: 4a8be012acf3fe08ceea6e9efe93af0b2f51642d3cddde1eecff86c3a1be869ab2799b9e2e5b25e45dc0e4c4ec39200b3ac83013b0cb17012a400e52ac4c50c2
7
+ data.tar.gz: 3695f27294ca3f2e423bfc60c067feb4e52a3bc617a36767715f685a66a6411254453010b4594043fb97eedd24d82d7ed1db45aaa37f4ae8d4d89e12e745d1e6
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.8.1 - 2019-02-11
4
+ * [#743](https://github.com/stripe/stripe-ruby/pull/743) Fix bug in file uploading introduced in #741
5
+
3
6
  ## 4.8.0 - 2019-02-03
4
7
  * [#741](https://github.com/stripe/stripe-ruby/pull/741) Use `FaradayStripeEncoder` to encode all parameter styles
5
8
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.8.0
1
+ 4.8.1
@@ -219,7 +219,7 @@ module Stripe
219
219
  # will throw away the result of this encoder and build its body.
220
220
  def encode(hash)
221
221
  @cache.fetch(hash) do |k|
222
- @cache[k] = Util.encode_parameters(replace_faraday_io(hash))
222
+ @cache[k] = Util.encode_parameters(hash)
223
223
  end
224
224
  end
225
225
 
@@ -227,26 +227,6 @@ module Stripe
227
227
  def decode(_str)
228
228
  raise NotImplementedError, "#{self.class.name} does not implement #decode"
229
229
  end
230
-
231
- # Replaces instances of `Faraday::UploadIO` with a simple string
232
- # representation so that they'll log a little better. Faraday won't use
233
- # these parameters, so it's okay that we did this.
234
- #
235
- # Unfortunately the string representation still doesn't look very nice
236
- # because we still URL-encode special symbols in the final value. It's
237
- # possible we could stop doing this and just leave it to Faraday to do
238
- # the right thing.
239
- private def replace_faraday_io(value)
240
- if value.is_a?(Array)
241
- value.each_with_index { |v, i| value[i] = replace_faraday_io(v) }
242
- elsif value.is_a?(Hash)
243
- value.each { |k, v| value[k] = replace_faraday_io(v) }
244
- elsif value.is_a?(Faraday::UploadIO)
245
- "FILE:#{value.original_filename}"
246
- else
247
- value
248
- end
249
- end
250
230
  end
251
231
 
252
232
  def api_url(url = "", api_base = nil)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stripe
4
- VERSION = "4.8.0".freeze
4
+ VERSION = "4.8.1".freeze
5
5
  end
@@ -794,16 +794,6 @@ module Stripe
794
794
  assert(!trace_payload["last_request_metrics"]["request_duration_ms"].nil?)
795
795
  end
796
796
  end
797
-
798
- context "FaradayStripeEncoder" do
799
- should "replace Faraday::UploadIO instances in parameters" do
800
- encoder = StripeClient::FaradayStripeEncoder.new
801
- encoded = encoder.encode(foo: [
802
- { file: Faraday::UploadIO.new(::File.new(__FILE__), nil) },
803
- ])
804
- assert_equal "foo[0][file]=FILE%3Astripe_client_test.rb", encoded
805
- end
806
- end
807
797
  end
808
798
 
809
799
  class SystemProfilerTest < Test::Unit::TestCase
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.8.0
4
+ version: 4.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-03 00:00:00.000000000 Z
11
+ date: 2019-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday