From 3daa10bfea7e57dda6bb2919385e666ffbda7ae7 Mon Sep 17 00:00:00 2001 From: Ryan Lovelett Date: Sat, 10 Nov 2012 08:17:26 -0600 Subject: [PATCH] WIP --- lib/wordpress_deploy/cli/utility.rb | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/lib/wordpress_deploy/cli/utility.rb b/lib/wordpress_deploy/cli/utility.rb index 71d1923..94384b3 100644 --- a/lib/wordpress_deploy/cli/utility.rb +++ b/lib/wordpress_deploy/cli/utility.rb @@ -165,6 +165,29 @@ def transmit(environment) # Exit with an error exit(1) end + + desc "receive ENVIRONMENT", "" + def receive(environment) + # Set logger into verbose mode (if the user requested it) + Logger.verbose = options[:verbose] + + # Set environment options + Config.set_options options + + # Load ALL the available environments + WordpressDeploy::Environments.load + + # Get the Environment the user requested + env = WordpressDeploy::Environments.find environments.to_sym + + # Receive the files into wp_dir + + rescue => err + Logger.error Errors::Cli::Utility::Error.wrap(err) + + # Exit with an error + exit(1) + end end end end