Gollum executable.
This commit is contained in:
Executable
+39
@@ -0,0 +1,39 @@
|
|||||||
|
#!/usr/bin/env ruby
|
||||||
|
|
||||||
|
$:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
|
||||||
|
|
||||||
|
help = <<HELP
|
||||||
|
Gollum is a multi-format Wiki Engine/API/Frontend.
|
||||||
|
|
||||||
|
Basic Command Line Usage:
|
||||||
|
gollum [options]
|
||||||
|
|
||||||
|
Options:
|
||||||
|
HELP
|
||||||
|
|
||||||
|
require 'optparse'
|
||||||
|
|
||||||
|
require 'rubygems'
|
||||||
|
require 'gollum/frontend/app'
|
||||||
|
|
||||||
|
exec = {}
|
||||||
|
options = {}
|
||||||
|
opts = OptionParser.new do |opts|
|
||||||
|
opts.banner = help
|
||||||
|
|
||||||
|
opts.on("--port [PORT]", "Bind port (default port 5432)") do |port|
|
||||||
|
options['port'] = port
|
||||||
|
end
|
||||||
|
|
||||||
|
opts.on("--version", "Display current version") do
|
||||||
|
puts "Gollum " + Gollum::VERSION
|
||||||
|
exit 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# Read command line options into `options` hash
|
||||||
|
opts.parse!
|
||||||
|
|
||||||
|
$path = Dir.pwd
|
||||||
|
|
||||||
|
Precious::App.run!
|
||||||
@@ -17,6 +17,9 @@ Gem::Specification.new do |s|
|
|||||||
|
|
||||||
s.require_paths = %w[lib]
|
s.require_paths = %w[lib]
|
||||||
|
|
||||||
|
s.executables = ["gollum"]
|
||||||
|
s.default_executable = 'gollum'
|
||||||
|
|
||||||
s.rdoc_options = ["--charset=UTF-8"]
|
s.rdoc_options = ["--charset=UTF-8"]
|
||||||
s.extra_rdoc_files = %w[README.md LICENSE]
|
s.extra_rdoc_files = %w[README.md LICENSE]
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,9 @@
|
|||||||
require 'rubygems'
|
|
||||||
|
|
||||||
require 'sinatra'
|
require 'sinatra'
|
||||||
require 'gollum'
|
require 'gollum'
|
||||||
require 'mustache/sinatra'
|
require 'mustache/sinatra'
|
||||||
|
|
||||||
require 'gollum/frontend/views/layout'
|
require 'gollum/frontend/views/layout'
|
||||||
|
|
||||||
$path = "~/dev/sandbox/lotr2"
|
|
||||||
|
|
||||||
module Precious
|
module Precious
|
||||||
class App < Sinatra::Base
|
class App < Sinatra::Base
|
||||||
register Mustache::Sinatra
|
register Mustache::Sinatra
|
||||||
@@ -106,5 +102,3 @@ module Precious
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
Precious::App.run!
|
|
||||||
|
|||||||
Reference in New Issue
Block a user