From ee6b71ff80c7c215e463c45b908907d7a2bbb223 Mon Sep 17 00:00:00 2001 From: Tom Preston-Werner Date: Wed, 29 Sep 2010 14:40:36 -0700 Subject: [PATCH] Change 'bind' CLI option to 'host'. Set default to 127.0.0.1. Closes #47. --- HISTORY.md | 1 + bin/gollum | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 71291090..58db2e6a 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -10,6 +10,7 @@ * Add Wiki#size to efficiently count pages without loading them. * Add the correct content type when serving files from the frontend. * Wiki#pages come back sorted by Page#title. + * Add --host option and default it to 127.0.0.1. * Bug Fixes * Increase minimum Sanitize version requirement to 1.1.0. 1.0.x versions of Sanitize require Hpricot instead of Nokogiri diff --git a/bin/gollum b/bin/gollum index 2ee57861..d3a73ffe 100755 --- a/bin/gollum +++ b/bin/gollum @@ -18,7 +18,7 @@ require 'rubygems' require 'gollum' exec = {} -options = {} +options = { 'bind' => '127.0.0.1' } opts = OptionParser.new do |opts| opts.banner = help @@ -26,7 +26,7 @@ opts = OptionParser.new do |opts| options['port'] = port.to_i 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 end