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 CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/bin/sh
2
2
 
3
3
  GVF=GIT-VERSION-FILE
4
- DEF_VER=v0.8.1.GIT
4
+ DEF_VER=v0.9.0.GIT
5
5
 
6
6
  LF='
7
7
  '
@@ -1,7 +1,7 @@
1
1
  # -*- encoding: binary -*-
2
2
  # :stopdoc:
3
- # This class is by Raindrops::Middleware to proxy application response
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
@@ -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: 61
4
+ hash: 59
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 8
9
- - 1
10
- version: 0.8.1
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-12 00:00:00 Z
18
+ date: 2012-05-21 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: bundler