Class: EY::CLI::Recipes

Inherits:
Thor show all
Defined in:
lib/engineyard/cli/recipes.rb

Constant Summary

Constants inherited from Thor

Thor::HELP_MAPPINGS, Thor::THOR_RESERVED_WORDS, Thor::VERSION

Instance Attribute Summary

Attributes included from Thor::Base

#args, #options, #parent_options

Instance Method Summary collapse

Methods inherited from Thor

check_unknown_options!, check_unknown_options?, default_task, desc, help, #help, long_desc, map, method_option, method_options, printable_tasks, register, subcommand, subcommands, task_help

Methods included from Thor::Base

included, #initialize, register_klass_file, shell, shell=, subclass_files, subclasses

Instance Method Details

#applyObject



18
19
20
21
# File 'lib/engineyard/cli/recipes.rb', line 18

def apply
  environment = fetch_environment(options[:environment], options[:account])
  apply_recipes(environment)
end

#downloadObject



82
83
84
85
86
# File 'lib/engineyard/cli/recipes.rb', line 82

def download
  environment = fetch_environment(options[:environment], options[:account])
  environment.download_recipes
  EY.ui.say "Recipes downloaded successfully for #{environment.name}"
end

#uploadObject



45
46
47
48
49
50
51
# File 'lib/engineyard/cli/recipes.rb', line 45

def upload
  environment = fetch_environment(options[:environment], options[:account])
  upload_recipes(environment, options[:file])
  if options[:apply]
    apply_recipes(environment)
  end
end