Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9b704ad852 | ||
|
|
43428175c3 | ||
|
|
87f65e489c | ||
|
|
e5521f2cbb |
+1
-1
@@ -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
@@ -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,5 +1,5 @@
|
|||||||
module Foreman
|
module Foreman
|
||||||
|
|
||||||
VERSION = "0.48.0.pre3"
|
VERSION = "0.48.0.pre2"
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user