From: <nul...@cl...> - 2010-12-24 05:25:16
|
KAKUTANI Shintaro 2010-11-26 17:58:32 +0000 (Fri, 26 Nov 2010) New Revision: 2f96f422b9339312b55374fc33f9b9d192679894 Log: reorganize Modified files: tdiary/tdiary_application.rb Modified: tdiary/tdiary_application.rb (+10 -10) =================================================================== --- tdiary/tdiary_application.rb 2010-12-21 11:46:37 +0000 (c211293) +++ tdiary/tdiary_application.rb 2010-11-26 17:58:32 +0000 (cfcf0fb) @@ -28,16 +28,6 @@ module TDiary end private - def fake_stdin_as_params - stdin_spy = StringIO.new( "" ) - # FIXME dirty hack - if $RACK_ENV && $RACK_ENV['rack.input'] - stdin_spy.print( $RACK_ENV['rack.input'].read ) - stdin_spy.rewind - end - $stdin = stdin_spy - end - def adopt_rack_request_to_plain_old_tdiary_style( env ) req = TDiary::Request.new( env ) $RACK_ENV = req.env @@ -50,6 +40,16 @@ module TDiary dispatcher = TDiary::Dispatcher.__send__( @target ) dispatcher.dispatch_cgi( request ) end + + def fake_stdin_as_params + stdin_spy = StringIO.new( "" ) + # FIXME dirty hack + if $RACK_ENV && $RACK_ENV['rack.input'] + stdin_spy.print( $RACK_ENV['rack.input'].read ) + stdin_spy.rewind + end + $stdin = stdin_spy + end end end |