From 1964db56aa6fb7d57fc49cda10714d34c087a398 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 24 Apr 2015 02:38:15 +0000 Subject: tee_input: support for Rack::TempfileReaper middleware Rack::TempfileReaper was added in rack 1.6 to cleanup temporary files. Make Unicorn::TmpIO ducktype-compatible so Rack::TempfileReaper may be used to free up space used by temporary buffer files. Ref: Reported-by: Mike Mulvaney --- lib/unicorn/tmpio.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/unicorn/tmpio.rb') diff --git a/lib/unicorn/tmpio.rb b/lib/unicorn/tmpio.rb index c97979a..db88ed3 100644 --- a/lib/unicorn/tmpio.rb +++ b/lib/unicorn/tmpio.rb @@ -21,4 +21,7 @@ class Unicorn::TmpIO < File fp.sync = true fp end + + # pretend we're Tempfile for Rack::TempfileReaper + alias close! close end -- cgit v1.2.3-24-ge0c7