CLI: Always require 'middleman-core/version'

The `init` command will fail if the `VERSION` was not required because
it is needed for the Gemfile generation. Unfortunately this was not
catched by the specs because the specs require the version and the child
process is not correctly reset.

I was not able to change this easily :-(
This commit is contained in:
Dirk Breuer 2014-04-07 16:15:50 +02:00
parent a40ef1a734
commit ae451608b3

View file

@ -25,7 +25,6 @@ module Middleman
desc 'version', 'Show version'
def version
require 'middleman-core/version'
say "Middleman #{Middleman::VERSION}"
end
@ -81,6 +80,9 @@ module Middleman
end
end
# Require the Middleman version
require 'middleman-core/version'
# Include the core CLI items
require 'middleman-core/cli/init'
require 'middleman-core/cli/bundler'