From ae451608b3b6a81d7f997fcd7bc7bc3df5e7e214 Mon Sep 17 00:00:00 2001 From: Dirk Breuer Date: Mon, 7 Apr 2014 16:15:50 +0200 Subject: [PATCH] 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 :-( --- middleman-core/lib/middleman-core/cli.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/middleman-core/lib/middleman-core/cli.rb b/middleman-core/lib/middleman-core/cli.rb index 7823de81..350baf35 100644 --- a/middleman-core/lib/middleman-core/cli.rb +++ b/middleman-core/lib/middleman-core/cli.rb @@ -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'