public
Rubygem
Description: Classy web-development dressed in a DSL
Homepage: http://sinatrarb.com
Clone URL: git://github.com/bmizerany/sinatra.git
converting env from command-line to symbol.  [cypher]

This fixes the problem when running an app with -e development
bmizerany (author)
Sun Jun 22 17:48:31 -0700 2008
commit  87f8cd3937973090b84876996cc7e430bd5d744b
tree    bd066a633f34d5b38f8eeccc556a429f29b24029
parent  cb8441e0cbd9c2f6816d79434f29c243e720831d
...
928
929
930
931
 
932
933
934
...
928
929
930
 
931
932
933
934
0
@@ -928,7 +928,7 @@ module Sinatra
0
       require 'optparse'
0
       OptionParser.new do |op|
0
         op.on('-p port') { |port| default_options[:port] = port }
0
- op.on('-e env') { |env| default_options[:env] = env }
0
+ op.on('-e env') { |env| default_options[:env] = env.to_sym }
0
         op.on('-x') { default_options[:mutex] = true }
0
         op.on('-s server') { |server| default_options[:server] = server }
0
       end.parse!(ARGV.dup.select { |o| o !~ /--name/ })

Comments

    No one has commented yet.