diff options
-rwxr-xr-x | bin/unicorn | 1 | ||||
-rwxr-xr-x | bin/unicorn_rails | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/bin/unicorn b/bin/unicorn index a34d9bc..cfc81da 100755 --- a/bin/unicorn +++ b/bin/unicorn @@ -124,6 +124,7 @@ app = lambda do || inner_app = case config when /\.ru$/ raw = File.open(config, "rb") { |fp| fp.sysread(fp.stat.size) } + raw.sub!(/^__END__\n.*/, '') eval("Rack::Builder.new {(#{raw}\n)}.to_app", nil, config) else require config diff --git a/bin/unicorn_rails b/bin/unicorn_rails index b3fda7b..a0035f4 100755 --- a/bin/unicorn_rails +++ b/bin/unicorn_rails @@ -148,6 +148,7 @@ app = lambda do || end when /\.ru$/ raw = File.open(config, "rb") { |fp| fp.sysread(fp.stat.size) } + raw.sub!(/^__END__\n.*/, '') eval("Rack::Builder.new {(#{raw}\n)}.to_app", nil, config) else require config |