diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-09-09 08:59:07 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-09-09 08:59:07 +0000 |
commit | 0cd7e6c1e02f9fab6939963a42b95fe2245fac19 (patch) | |
tree | 8dbf16861f28dfac71c4d9057f49572c43f48573 /railties/bin/server | |
parent | 0faca07056e2dd6284d79522614cb991a680d5d0 (diff) | |
download | rails-0cd7e6c1e02f9fab6939963a42b95fe2245fac19.tar.gz rails-0cd7e6c1e02f9fab6939963a42b95fe2245fac19.tar.bz2 rails-0cd7e6c1e02f9fab6939963a42b95fe2245fac19.zip |
Added -c/--charset option to WEBrick controller, so you can specify a default charset (which without changes is UTF-8) #2084 [wejn@box.cz]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2173 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/bin/server')
-rw-r--r-- | railties/bin/server | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/railties/bin/server b/railties/bin/server index 487d1fd954..3a8cc68258 100644 --- a/railties/bin/server +++ b/railties/bin/server @@ -8,7 +8,8 @@ OPTIONS = { :ip => "0.0.0.0", :environment => "development", :server_root => File.expand_path(File.dirname(__FILE__) + "/../public/"), - :server_type => WEBrick::SimpleServer + :server_type => WEBrick::SimpleServer, + :charset => "UTF-8" } ARGV.options do |opts| @@ -30,6 +31,10 @@ ARGV.options do |opts| "Make Rails run as a Daemon (only works if fork is available -- meaning on *nix)." ) { OPTIONS[:server_type] = WEBrick::Daemon } + opts.on("-c", "--charset=charset", String, + "Set default charset for output.", + "Default: UTF-8") { |OPTIONS[:charset]| } + opts.separator "" opts.on("-h", "--help", |