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 +4 -4
- data/CHANGELOG.md +3 -0
- data/VERSION +1 -1
- data/lib/stripe/stripe_client.rb +1 -21
- data/lib/stripe/version.rb +1 -1
- data/test/stripe/stripe_client_test.rb +0 -10
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: baed7f5a4af8684a495ed940bf5759afd72cda87bb1f7f719e76875652aba184
|
4
|
+
data.tar.gz: 21626dd749b9eae3f53018b66de821fc5a2729add10e2a2d6851da54ec237582
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a8be012acf3fe08ceea6e9efe93af0b2f51642d3cddde1eecff86c3a1be869ab2799b9e2e5b25e45dc0e4c4ec39200b3ac83013b0cb17012a400e52ac4c50c2
|
7
|
+
data.tar.gz: 3695f27294ca3f2e423bfc60c067feb4e52a3bc617a36767715f685a66a6411254453010b4594043fb97eedd24d82d7ed1db45aaa37f4ae8d4d89e12e745d1e6
|
data/CHANGELOG.md
CHANGED
@@ -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.
|
1
|
+
4.8.1
|
data/lib/stripe/stripe_client.rb
CHANGED
@@ -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(
|
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)
|
data/lib/stripe/version.rb
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2019-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|