Package assets (#1493)
* Package static assets * Fixed cancel button in editor * Fix rake compilation task * Add asset path helper * Serve MathJax statically * Fix mathjax in preview
This commit is contained in:
+7
-6
@@ -51,7 +51,7 @@ opts = OptionParser.new do |opts|
|
||||
# don't use 'port.to_i' here... it doesn't raise errors which might result in a nice confusion later on
|
||||
options[:port] = Integer(port)
|
||||
rescue ArgumentError
|
||||
puts 'Error: '#{port}' is not a valid port number.'
|
||||
puts "Error: '#{port}' is not a valid port number."
|
||||
exit 1
|
||||
end
|
||||
end
|
||||
@@ -79,8 +79,8 @@ opts = OptionParser.new do |opts|
|
||||
unless base_path_original == base_path
|
||||
puts <<MSG
|
||||
Warning: your base-path has been sanitized:
|
||||
- original: '#{base_path_original}'
|
||||
- sanitized: '#{base_path}'
|
||||
- original: "#{base_path_original}"
|
||||
- sanitized: "#{base_path}"
|
||||
MSG
|
||||
end
|
||||
|
||||
@@ -171,7 +171,7 @@ MSG
|
||||
opts.on('--versions', 'Display the current version of Gollum and auxiliary gems.') do
|
||||
require 'gollum-lib'
|
||||
puts 'Gollum ' + Gollum::VERSION
|
||||
puts 'Running on: #{RUBY_PLATFORM} with Ruby version #{RUBY_VERSION}'
|
||||
puts "Running on: #{RUBY_PLATFORM} with Ruby version #{RUBY_VERSION}"
|
||||
puts 'Using:'
|
||||
loaded_gemspecs = Gem.loaded_specs
|
||||
gollum_gems = ['gollum-lib', 'gollum-rjgit_adapter', 'rjgit', 'gollum-rugged_adapter', 'rugged']
|
||||
@@ -197,8 +197,8 @@ end
|
||||
# Read command line options into `options` hash
|
||||
begin
|
||||
opts.parse!
|
||||
rescue OptionParser::InvalidOption
|
||||
puts 'gollum: #{$!.message}'
|
||||
rescue OptionParser::InvalidOption => e
|
||||
puts "gollum: #{e.message}"
|
||||
puts 'gollum: try \'gollum --help\' for more information'
|
||||
exit
|
||||
end
|
||||
@@ -262,6 +262,7 @@ if options[:irb]
|
||||
end
|
||||
else
|
||||
require 'gollum/app'
|
||||
Precious::App.set(:environment, ENV.fetch('RACK_ENV', :production).to_sym)
|
||||
Precious::App.set(:gollum_path, gollum_path)
|
||||
Precious::App.set(:wiki_options, wiki_options)
|
||||
Precious::App.settings.mustache[:templates] = wiki_options[:template_dir] if wiki_options[:template_dir]
|
||||
|
||||
Reference in New Issue
Block a user