Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remote backports dependency

Since the syntax depends on 1.9 mode, we can remove this dependency.
This saves us another 10 bytes from the source which is over 1% of the
entire almost Sinatra codebase.

I of course haven't tested this change, for that we have users to
verify that it works.
  • Loading branch information...
commit d68ca3b5e0f2ac4d5618e3c4fbac7c7be0483784 1 parent bf34e93
@dbussink dbussink authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  almost_sinatra.rb
View
2  almost_sinatra.rb
@@ -1,4 +1,4 @@
-%w.rack tilt backports INT TERM..map{|l|trap(l){$r.stop}rescue require l}
+%w.rack tilt 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
%w[get post put delete].map{|m|D.(m){|u,&b|a.map(u){run->(e){[200,{"Content-Type"=>"text/html"},[a.instance_eval(&b)]]}}}}
Tilt.mappings.map{|k,v|D.(k){|n,*o|$t||=(h={};File.read(caller[0][/^[^:]+/]).scan(S){|a,b|h[a]=b};h);v[0].new(*o){n.to_s==n ?n:$t[n.to_s]}.render(a,o[0].try(:[],:locals)||{})}}
Please sign in to comment.
Something went wrong with that request. Please try again.