Compare commits

..
Author SHA1 Message Date
David Dollar 9b704ad852 0.48.0.pre2 2012-06-17 22:02:14 -04:00
David Dollar 43428175c3 allow color to be forced on 2012-06-17 22:02:00 -04:00
David Dollar 87f65e489c terminate gracefully if stdout goes away 2012-06-17 21:55:28 -04:00
David Dollar e5521f2cbb always flush output 2012-06-17 21:55:19 -04:00
4 changed files with 3 additions and 23 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
PATH PATH
remote: . remote: .
specs: specs:
foreman (0.48.0.pre3) foreman (0.48.0.pre2)
thor (>= 0.13.6) thor (>= 0.13.6)
GEM GEM
+1 -11
View File
@@ -3,17 +3,13 @@ require "foreman/helpers"
require "foreman/engine" require "foreman/engine"
require "foreman/engine/cli" require "foreman/engine/cli"
require "foreman/export" require "foreman/export"
require "foreman/version"
require "shellwords" require "shellwords"
require "yaml"
require "thor" require "thor"
class Foreman::CLI < Thor class Foreman::CLI < Thor
include Foreman::Helpers include Foreman::Helpers
map ["-v", "--version"] => :version
class_option :procfile, :type => :string, :aliases => "-f", :desc => "Default: Procfile" class_option :procfile, :type => :string, :aliases => "-f", :desc => "Default: Procfile"
class_option :root, :type => :string, :aliases => "-d", :desc => "Default: Procfile directory" class_option :root, :type => :string, :aliases => "-d", :desc => "Default: Procfile directory"
@@ -84,12 +80,6 @@ class Foreman::CLI < Thor
end end
end end
desc "version", "Display Foreman gem version"
def version
puts Foreman::VERSION
end
no_tasks do no_tasks do
def engine def engine
@engine ||= begin @engine ||= begin
@@ -133,7 +123,7 @@ private ######################################################################
def options def options
original_options = super original_options = super
return original_options unless File.exists?(".foreman") return original_options unless File.exists?(".foreman")
defaults = ::YAML::load_file(".foreman") || {} defaults = YAML::load_file(".foreman") || {}
Thor::CoreExt::HashWithIndifferentAccess.new(defaults.merge(original_options)) Thor::CoreExt::HashWithIndifferentAccess.new(defaults.merge(original_options))
end end
+1 -1
View File
@@ -1,5 +1,5 @@
module Foreman module Foreman
VERSION = "0.48.0.pre3" VERSION = "0.48.0.pre2"
end end
-10
View File
@@ -74,14 +74,4 @@ describe "Foreman::CLI", :fakefs do
end end
end end
describe "version" do
it "displays gem version" do
foreman("version").chomp.should == Foreman::VERSION
end
it "displays gem version on shortcut command" do
foreman("-v").chomp.should == Foreman::VERSION
end
end
end end