rested 0.3.5 → 0.3.6
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.
- data/VERSION +1 -1
- data/lib/rested/entity.rb +2 -2
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.6
|
data/lib/rested/entity.rb
CHANGED
@@ -259,12 +259,12 @@ module Rested
|
|
259
259
|
private
|
260
260
|
|
261
261
|
# simple trick to force httpclient to pass the real filename
|
262
|
-
# we simply
|
262
|
+
# we simply copy our temp file to its original in a unique directory
|
263
263
|
def preserve_filenames(params)
|
264
264
|
params.each { |k,v|
|
265
265
|
if v.kind_of? Tempfile and v.respond_to? "original_filename" then
|
266
266
|
FileUtils.mkdir_p(v.path + "-origfile")
|
267
|
-
FileUtils.
|
267
|
+
FileUtils.cp(v.path, v.path + "-origfile/" + v.original_filename)
|
268
268
|
params[k] = File.new(v.path + "-origfile/" + v.original_filename)
|
269
269
|
end
|
270
270
|
}
|