Skip to content
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.

Commit

Permalink
some more separate string and symbols fu
Browse files Browse the repository at this point in the history
  • Loading branch information
janlelis committed Mar 8, 2011
1 parent d1fb6d8 commit ab19f68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion almost_sinatra.rb
Expand Up @@ -3,6 +3,6 @@
%w[get post put delete].map{|m|$o.send($d,m){|u,&b|$a.map(u){run->(e){[200,{"Content-Type"=>"text/html"},[$a.instance_eval(&b)]]}}}}
Tilt.mappings.map{|k,v|$o.send($d,k){|n,*o|$t||=File.read(caller[0][/^[^:]+/]).scan($s).inject({}){|h,(a,b,c)|h[a]=b;h};v.new(*o){(z=n.to_s)==n ?n:$t[z]}.render $a,o[0].try(:[],:locals)||{}}}
%w[set enable disable configure helpers use].map{|m|$o.send($d,m){|*_,&b|b.try :[]}};END{Rack::Handler.get("webrick").run($a,:Port=>$p){|s|$r=s}}
['params','session',Rack::Session::Cookie,Rack::Lock].map{|m|(m==m.to_s)?$o.send($d,m){$q.send m}:$a.use(m)}
%w[params session].map{|m|$o.send($d,m){$q.send m}};[Rack::Session::Cookie,Rack::Lock].map{|m|$a.use m}
$o.send($d,:before){|&b|$a.use Rack::Config,&b};before{|e|$q=Rack::Request.new e;$q.params.dup.map{|k,v|params[k.to_sym]=v}}
puts"== Almost #$n/No Version has taken the stage on #$p for development with backup from Webrick"

0 comments on commit ab19f68

Please sign in to comment.