Skip to content

Commit

Permalink
Update setup.rb to silence errors on shebang replacement. Camping han…
Browse files Browse the repository at this point in the history
…dler 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
  • Loading branch information
why committed Apr 10, 2006
1 parent cfcf2d8 commit 894f4a0
Show file tree
Hide file tree
Showing 3 changed files with 813 additions and 578 deletions.
7 changes: 4 additions & 3 deletions examples/camping/tepee.rb
Expand Up @@ -115,12 +115,13 @@ def list
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
Expand Down
11 changes: 10 additions & 1 deletion lib/mongrel/camping.rb
Expand Up @@ -40,7 +40,16 @@ def process(request, response)
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
Expand Down

0 comments on commit 894f4a0

Please sign in to comment.