Change 'bind' CLI option to 'host'. Set default to 127.0.0.1. Closes #47.

This commit is contained in:
Tom Preston-Werner
2010-09-29 14:40:36 -07:00
parent cdf75d20ef
commit ee6b71ff80
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -10,6 +10,7 @@
* Add Wiki#size to efficiently count pages without loading them. * Add Wiki#size to efficiently count pages without loading them.
* Add the correct content type when serving files from the frontend. * Add the correct content type when serving files from the frontend.
* Wiki#pages come back sorted by Page#title. * Wiki#pages come back sorted by Page#title.
* Add --host option and default it to 127.0.0.1.
* Bug Fixes * Bug Fixes
* Increase minimum Sanitize version requirement to 1.1.0. * Increase minimum Sanitize version requirement to 1.1.0.
1.0.x versions of Sanitize require Hpricot instead of Nokogiri 1.0.x versions of Sanitize require Hpricot instead of Nokogiri
+2 -2
View File
@@ -18,7 +18,7 @@ require 'rubygems'
require 'gollum' require 'gollum'
exec = {} exec = {}
options = {} options = { 'bind' => '127.0.0.1' }
opts = OptionParser.new do |opts| opts = OptionParser.new do |opts|
opts.banner = help opts.banner = help
@@ -26,7 +26,7 @@ opts = OptionParser.new do |opts|
options['port'] = port.to_i options['port'] = port.to_i
end end
opts.on("--bind [HOST]", "Hostname or IP address to listen on (default 0.0.0.0).") do |host| opts.on("--host [HOST]", "Hostname or IP address to listen on (default 0.0.0.0).") do |host|
options['bind'] = host options['bind'] = host
end end