rail-locator-api 1.0.24 → 1.0.26
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/lib/rail-locator-api/api_request.rb +3 -1
- data/lib/rail-locator-api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 119ca579b29cc950cd89a82d0a0234b309b0ef48e93f979c058798b270881ebf
|
|
4
|
+
data.tar.gz: d0c54d0d2d476cbf1163d256a80fc6381ecdcc7f738acc32995a976c4215876a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2da38a334259b719763e03408a72a5f6df491ff3bd9742e81a993583225295d41a7de1d969a9263c0996a67a9208b6dab99552d7a9a612b5a544514e8cd01f73
|
|
7
|
+
data.tar.gz: d7e52a45bcffaeebb0c6a65f4f8f6c897ce4158c4157e266ba9ae7eb7c94e7258438e22fc090e663aa398c1d575b817964fd8dc5fba4bacee770f8b4da039f8a
|
|
@@ -247,7 +247,7 @@ module RailLocatorApi
|
|
|
247
247
|
result = is_multipart?(item, result)
|
|
248
248
|
end
|
|
249
249
|
result
|
|
250
|
-
elsif
|
|
250
|
+
elsif [ActionDispatch::Http::UploadedFile, StringIO, Tempfile, File].include?(body.class)
|
|
251
251
|
return true
|
|
252
252
|
else
|
|
253
253
|
result || false
|
|
@@ -364,6 +364,8 @@ class Object
|
|
|
364
364
|
def to_params(key)
|
|
365
365
|
if self.is_a? ActionDispatch::Http::UploadedFile
|
|
366
366
|
[key.to_param, File.open(self.path)]
|
|
367
|
+
elsif %w[File Tempfile StringIO].include?(self.class.name)
|
|
368
|
+
self
|
|
367
369
|
else
|
|
368
370
|
[key.to_param, to_param.to_s]
|
|
369
371
|
end
|