Merge branch 'rc'

This commit is contained in:
Dawa Ometto
2016-08-07 21:36:51 +02:00
+16 -1
View File
@@ -145,6 +145,9 @@ MSG
"If not specified, uses the '<git-repo>/mathjax.config.js' file.") do |file| "If not specified, uses the '<git-repo>/mathjax.config.js' file.") do |file|
wiki_options[:mathjax_config] = file || 'mathjax.config.js' wiki_options[:mathjax_config] = file || 'mathjax.config.js'
end end
opts.on("--plantuml-url [URL]", "Sets the PlantUML server endpoint.") do |url|
wiki_options[:plantuml_url] = url
end
opts.on("--template-dir [PATH]", "Specify custom mustache template directory.") do |path| opts.on("--template-dir [PATH]", "Specify custom mustache template directory.") do |path|
wiki_options[:template_dir] = path wiki_options[:template_dir] = path
end end
@@ -162,7 +165,6 @@ MSG
end end
opts.separator "" opts.separator ""
end end
# Read command line options into `options` hash # Read command line options into `options` hash
@@ -208,6 +210,12 @@ if options[:irb]
if !wiki.exist? then if !wiki.exist? then
raise Gollum::InvalidGitRepositoryError raise Gollum::InvalidGitRepositoryError
end end
if wiki_options[:plantuml_url]
Gollum::Filter::PlantUML.configure do |config|
puts "Using #{wiki_options[:plantuml_url]} as PlantUML endpoint"
config.url = wiki_options[:plantuml_url]
end
end
puts puts
puts "Loaded Gollum wiki at:" puts "Loaded Gollum wiki at:"
puts "#{File.expand_path(gollum_path).inspect}" puts "#{File.expand_path(gollum_path).inspect}"
@@ -243,6 +251,13 @@ else
require cfg require cfg
end end
if wiki_options[:plantuml_url]
Gollum::Filter::PlantUML.configure do |config|
puts "Using #{wiki_options[:plantuml_url]} as PlantUML endpoint"
config.url = wiki_options[:plantuml_url]
end
end
base_path = wiki_options[:base_path] base_path = wiki_options[:base_path]
if base_path.nil? if base_path.nil?