support .foreman file for default options
This commit is contained in:
+7
-2
@@ -70,8 +70,6 @@ private ######################################################################
|
|||||||
options[:procfile] || "Procfile"
|
options[:procfile] || "Procfile"
|
||||||
end
|
end
|
||||||
|
|
||||||
private ######################################################################
|
|
||||||
|
|
||||||
def display(message)
|
def display(message)
|
||||||
puts message
|
puts message
|
||||||
end
|
end
|
||||||
@@ -85,4 +83,11 @@ private ######################################################################
|
|||||||
File.exist?(procfile)
|
File.exist?(procfile)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def options
|
||||||
|
original_options = super
|
||||||
|
return original_options unless File.exists?(".foreman")
|
||||||
|
defaults = YAML::load_file(".foreman")
|
||||||
|
Thor::CoreExt::HashWithIndifferentAccess.new(defaults.merge(original_options))
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user