[macruby-changes] [4032] ControlTower/branches/gcd-ify/sample/file_upload.ru
source_changes at macosforge.org
source_changes at macosforge.org
Thu May 6 02:39:11 PDT 2010
Revision: 4032
http://trac.macosforge.org/projects/ruby/changeset/4032
Author: joshua.ballanco at apple.com
Date: 2010-05-06 02:39:09 -0700 (Thu, 06 May 2010)
Log Message:
-----------
If you're code isn't beautiful, it's not worth reading
Modified Paths:
--------------
ControlTower/branches/gcd-ify/sample/file_upload.ru
Modified: ControlTower/branches/gcd-ify/sample/file_upload.ru
===================================================================
--- ControlTower/branches/gcd-ify/sample/file_upload.ru 2010-05-06 09:35:57 UTC (rev 4031)
+++ ControlTower/branches/gcd-ify/sample/file_upload.ru 2010-05-06 09:39:09 UTC (rev 4032)
@@ -5,11 +5,11 @@
params = Rack::Request.new(env).params
response = params.map do |k,v|
if k == 'file' && v[:tempfile]
- "#{k} => File Contents: #{v[:tempfile].read}"
+ "#{k} => File Contents: #{v[:tempfile].read}"
else
- "#{k} => #{v.inspect}"
+ "#{k} => #{v.inspect}"
end
- end.join("\n")
+ end.join("\n") + "\n"
[200, { 'Content-Type' => 'text/plain' }, response]
end
end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100506/9ab1a0e5/attachment.html>
More information about the macruby-changes
mailing list