support .foreman file for default options
This commit is contained in:
+7
-2
@@ -70,8 +70,6 @@ private ######################################################################
|
||||
options[:procfile] || "Procfile"
|
||||
end
|
||||
|
||||
private ######################################################################
|
||||
|
||||
def display(message)
|
||||
puts message
|
||||
end
|
||||
@@ -85,4 +83,11 @@ private ######################################################################
|
||||
File.exist?(procfile)
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user