Permalink
Browse files

Add a 'project' global that can be passed from the command line or in…

… a Rudyfile inside the 'defaults' section.
  • Loading branch information...
1 parent 8e9c4f7 commit 4fd2f7c4ec2b6f100ea648bbb9804c5a9bfc492d @Fluxx Fluxx committed Jun 1, 2011
Showing with 3 additions and 1 deletion.
  1. +1 −0 bin/rudy
  2. +2 −1 lib/rudy/global.rb
View
@@ -42,6 +42,7 @@ class RudyCLI < Rudy::CLI::Base
global :t, :testrun, "Test run. Don't execute action (PARTIALLY SUPPORTED)."
global :P, :parallel, "Execute remote commands in parallel (PARTIALLY SUPPORTED)."
global :F, :force, "Force an action despite warnings"
+ global :p, :project, String, "Project name. Used in group and machine names."
global :positions, Integer, "Override positions number for the current role"
View
@@ -43,6 +43,7 @@ class Global < Storable
field :bucket
field :positions
+ field :project
attr_accessor :print_header
@@ -73,7 +74,7 @@ def apply_config(config)
# value from the defaults config.
# WARNING: Don't add bucket either or any machines configuration param
# TODO: investigate removing this apply_config method
- %w[region zone environment role position bucket
+ %w[region zone environment role position bucket project
localhost nocolor quiet auto force parallel].each do |name|
curval, defval = self.send(name), config.defaults.send(name)
if curval.nil? && !defval.nil?

0 comments on commit 4fd2f7c

Please sign in to comment.