1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

Update setup.rb to silence errors on shebang replacement. Camping handler now allows passing back of an IO object, to allow large file streaming. Simpler underscore replacement on Tepee wiki words.

git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@154 19e92222-5c0b-0410-8929-a290d50e31e9
This commit is contained in:
why 2006-04-10 18:56:16 +00:00
parent cfcf2d88ec
commit 894f4a0bd3
3 changed files with 835 additions and 600 deletions

View file

@ -115,12 +115,13 @@ module Tepee::Views
def _markup body
return '' if body.blank?
body.gsub!(Tepee::Models::Page::PAGE_LINK) do
page = title = $1.underscore
page = title = $1
title = $2 unless $2.empty?
page = page.gsub /\W/, '_'
if Tepee::Models::Page.find(:all, :select => 'title').collect { |p| p.title }.include?(page)
%Q{<a href="#{R Show, page}">#{title}</a>}
%Q{<a href="#{self/R(Show, page)}">#{title}</a>}
else
%Q{<span>#{title}<a href="#{R Edit, page, 1}">?</a></span>}
%Q{<span>#{title}<a href="#{self/R(Edit, page, 1)}">?</a></span>}
end
end
RedCloth.new(body, [ :hard_breaks ]).to_html

View file

@ -40,7 +40,16 @@ module Mongrel
head[k] = vi
end
end
out << controller.body
if controller.body.respond_to? :read
while chunk = controller.body.read(16384)
out << chunk
end
if controller.body.respond_to? :close
controller.body.close
end
else
out << controller.body
end
end
end
end

1417
setup.rb

File diff suppressed because it is too large Load diff