rested 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/rested/base.rb +7 -0
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.2
|
data/lib/rested/base.rb
CHANGED
@@ -16,6 +16,13 @@ module Rested
|
|
16
16
|
if not Rested.debug.nil?
|
17
17
|
@client.debug_dev = (Rested.debug.respond_to?("<<") ? Rested.debug : STDOUT)
|
18
18
|
end
|
19
|
+
if Object.const_defined? "Rack" then
|
20
|
+
handler = lambda { |path|
|
21
|
+
path =~ /(\..*?)$/
|
22
|
+
Rack::Mime.mime_type($1)
|
23
|
+
}
|
24
|
+
HTTP::Message.mime_type_handler = handler
|
25
|
+
end
|
19
26
|
@client
|
20
27
|
end
|
21
28
|
|