Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Remove another 1% of the code #10

Merged
merged 1 commit into from

3 participants

@dbussink

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.

@dbussink dbussink 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.
d68ca3b
@travisbot

This pull request fails (merged d68ca3b into bf34e93).

@rkh rkh merged commit c33409c into rkh:master

1 check failed

Details default The Travis build failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 18, 2012
  1. @dbussink

    Remote backports dependency

    dbussink authored
    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.
This page is out of date. Refresh to see the latest.
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)||{})}}
Something went wrong with that request. Please try again.