From de0f34a27a111ad1a1be6715035eaade4ab22662 Mon Sep 17 00:00:00 2001 From: Dawa Ometto Date: Mon, 20 Jan 2014 18:01:41 +0100 Subject: [PATCH] Add optional 'mode' argument to --allow-uploads flag, allowing user to toggle per_page_uploads. --- bin/gollum | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/gollum b/bin/gollum index f4b75e8b..d300bcea 100755 --- a/bin/gollum +++ b/bin/gollum @@ -84,8 +84,9 @@ opts = OptionParser.new do |opts| wiki_options[:live_preview] = true end - opts.on("--allow-uploads", "Allows file uploads.") do + opts.on("--allow-uploads [MODE]", [:dir, :page], "Allows file uploads. Modes: dir (default, store all uploads in the same directory), page (store each upload at the same location as the page).") do |mode| wiki_options[:allow_uploads] = true + wiki_options[:per_page_uploads] = true if mode == :page end opts.on("--mathjax", "Enables mathjax.") do