raindrops 0.8.1 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- data/GIT-VERSION-GEN +1 -1
- data/lib/raindrops/middleware/proxy.rb +8 -2
- data/test/test_middleware.rb +4 -0
- metadata +5 -5
data/GIT-VERSION-GEN
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# -*- encoding: binary -*-
|
2
2
|
# :stopdoc:
|
3
|
-
# This class is by Raindrops::Middleware to proxy application
|
4
|
-
# bodies. There should be no need to use it directly.
|
3
|
+
# This class is used by Raindrops::Middleware to proxy application
|
4
|
+
# response bodies. There should be no need to use it directly.
|
5
5
|
class Raindrops::Middleware::Proxy
|
6
6
|
def initialize(body, stats)
|
7
7
|
@body, @stats = body, stats
|
@@ -31,4 +31,10 @@ class Raindrops::Middleware::Proxy
|
|
31
31
|
m = m.to_sym
|
32
32
|
:close == m || @body.respond_to?(m)
|
33
33
|
end
|
34
|
+
|
35
|
+
# Avoid breaking users of non-standard extensions (e.g. #body)
|
36
|
+
# Rack::BodyProxy does the same.
|
37
|
+
def method_missing(*args, &block)
|
38
|
+
@body.send(*args, &block)
|
39
|
+
end
|
34
40
|
end
|
data/test/test_middleware.rb
CHANGED
@@ -120,5 +120,9 @@ class TestMiddleware < Test::Unit::TestCase
|
|
120
120
|
def orig_body.to_path; "/dev/null"; end
|
121
121
|
assert body.respond_to?(:to_path)
|
122
122
|
assert_equal "/dev/null", body.to_path
|
123
|
+
|
124
|
+
def orig_body.body; "this is a body"; end
|
125
|
+
assert body.respond_to?(:body)
|
126
|
+
assert_equal "this is a body", body.body
|
123
127
|
end
|
124
128
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: raindrops
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 59
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 9
|
9
|
+
- 0
|
10
|
+
version: 0.9.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- raindrops hackers
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-05-
|
18
|
+
date: 2012-05-21 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: bundler
|