Extract load_paths so they aren't locked into the binary

This commit is contained in:
Thomas Reynolds 2012-07-16 17:24:13 -07:00
parent 639a4b2459
commit 1f6d1a7ee1
9 changed files with 85 additions and 58 deletions

View file

@ -10,6 +10,20 @@ module Middleman
# The base task from which everything else etends
class Base < Thor
class << self
def start(*args)
# Change flag to a module
ARGV.unshift("help") if ARGV.delete("--help")
# Default command is server
if ARGV[0] != "help" && (ARGV.length < 1 || ARGV.first.include?("-"))
ARGV.unshift("server")
end
super
end
end
desc "version", "Show version"
def version
require 'middleman-core/version'