From 009c1460b46e22b109614c756df0dbfd4e55ea57 Mon Sep 17 00:00:00 2001 From: Spencer Krum Date: Sun, 11 Mar 2012 17:00:24 -0700 Subject: [PATCH] Fixing environments output that was misleading --- puppetsubsync | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/puppetsubsync b/puppetsubsync index e5dc552..5ffaa83 100755 --- a/puppetsubsync +++ b/puppetsubsync @@ -74,8 +74,8 @@ class PuppetSync puts "| Submodule : #{@options.submodule}" puts "| Branch : #{@options.branch}" puts "| Deploy To : #{deploy_directory(@options.submodule, @options.branch)}" - puts "| environment : #{deploy_directory(@options.submodule, @options.branch)}" - puts "| to test : puppet agent --noop --test --environment=#{deploy_directory(@options.submodule, @options.branch)}" + puts "| environment : #{env_directory(@options.submodule, @options.branch)}" + puts "| to test : puppet agent --noop --test --environment=#{env_directory(@options.submodule, @options.branch)}" puts "| repository : #{@options.repository}" puts "| delete branch" if @options.delete @@ -196,6 +196,10 @@ class PuppetSync return "#{@options.deploy}/#{submodule.gsub("-","_")}_#{branch}" end + def env_directory(submodule, branch) + return "#{submodule.gsub("-","_")}_#{branch}" + end + def parsed_options? opts = OptionParser.new