Prettier code #8

Open
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@shurizzle

Some corrections to code (i fault in latter :P)

@@ -1,8 +1,8 @@
%w.rack tilt backports INT TERM..map{|l|trap(l){$r.stop}rescue require l}
-$n=Sinatra=Module.new{extend Rack;a,D,S,$p,q,Application=Builder.new,Object.method(:define_method),/@@ *([^\n]+)\n(((?!@@)[^\n]*\n)*)/m,4567,a
+$n=Sinatra=Module.new{extend Rack;a,D,S,$p,q,Application=Builder.new,Object.method(:define_method),/@@ *([^\n]+)\n((?:(?:(?!@@))[^\n]*\n)*)/m,4567,a

This comment has been minimized.

@rkh

rkh Apr 26, 2011

Owner

lol

%w[set enable disable configure helpers use register].map{|m|D.(m){|*_,&b|b.try :[]}};END{Handler.get("webrick").run(a,Port:$p){|s|$r=s}}
%w[params session].map{|m|D.(m){q.send m}};a.use Session::Cookie;a.use Lock
-D.(:before){|&b|a.use Rack::Config,&b};before{|e|q=Request.new e;q.params.dup.map{|k,v|params[k.to_sym]=v}}}
+D.(:before){|&b|a.use Rack::Config,&b};before{|e|q=Request.new e;params.update(Hash[q.params.dup])}}

This comment has been minimized.

@rkh

rkh Apr 26, 2011

Owner

where's the #to_sym mapping?

@rkh

rkh Apr 26, 2011

Owner

where's the #to_sym mapping?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment