rested 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/rested/entity.rb +1 -3
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.4
|
data/lib/rested/entity.rb
CHANGED
@@ -100,10 +100,8 @@ module Rested
|
|
100
100
|
if file.kind_of? String then
|
101
101
|
raise IOError.new("File not found: #{file}") if not File.exists? file
|
102
102
|
file = File.new(file)
|
103
|
-
elsif file.is_a? Tempfile
|
104
|
-
file = File.new(file.path)
|
105
103
|
end
|
106
|
-
return if not file.
|
104
|
+
return if not (file.respond_to?(:read) and file.respond_to?(:pos) and file.respond_to?(:pos=))
|
107
105
|
self.files[name] = file
|
108
106
|
end
|
109
107
|
|