Class: Ey::Core::Cli::Recipes::Download
- Inherits:
-
Subcommand
- Object
- Belafonte::App
- Subcommand
- Ey::Core::Cli::Recipes::Download
- Includes:
- Helpers::Archive
- Defined in:
- lib/ey-core/cli/recipes/download.rb
Instance Method Summary collapse
Methods included from Helpers::Archive
#archive_directory, #gzip, #ungzip, #untar
Methods inherited from Subcommand
#handle_core_error, #run_handle, #setup
Methods included from Helpers::Core
#core_account, #core_accounts, #core_application_for, #core_client, #core_environment_for, #core_operator_and_environment_for, #core_server_for, #core_url, #core_yaml, #eyrc_yaml, included, #longest_length_by_name, #operator, #unauthenticated_core_client, #write_core_yaml
Instance Method Details
#handle ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/ey-core/cli/recipes/download.rb', line 33 def handle if File.exist?("cookbooks") raise Ey::Core::Cli::RecipesExist.new( "Cannot download recipes, cookbooks directory already exists." ) end operator, environment = core_operator_and_environment_for() puts "Downloading recipes".green recipes = environment.download_recipes puts "Extracting recipes to 'cookbooks/'".green untar(ungzip(recipes), './') end |