diff options
Diffstat (limited to 'bin/unicorn')
-rwxr-xr-x | bin/unicorn | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/unicorn b/bin/unicorn index d421f18..60b7c84 100755 --- a/bin/unicorn +++ b/bin/unicorn @@ -107,8 +107,9 @@ abort "configuration file #{config} not found" unless File.exist?(config) inner_app = case config when /\.ru$/ raw = File.open(config, "rb") { |fp| fp.sysread(fp.stat.size) } + # parse embedded command-line options in config.ru comments if raw[/^#\\(.*)/] - warn %(not parsing embedded command-line options: "#$1") + opts.parse! $1.split(/\s+/) end lambda { || eval("Rack::Builder.new {(#{raw}\n)}.to_app", nil, config) } else |