Class: Pantry::Chef::UploadRole

Inherits:
Pantry::Commands::UploadFile
  • Object
show all
Defined in:
lib/pantry/chef/upload_role.rb

Overview

Upload a role definition to the server

Instance Method Summary collapse

Instance Method Details

#prepare_message(*args) ⇒ Object



20
21
22
23
# File 'lib/pantry/chef/upload_role.rb', line 20

def prepare_message(*args)
  Pantry.ui.say("Uploading role #{File.basename(file_to_upload)}...")
  super
end

#required_optionsObject



12
13
14
# File 'lib/pantry/chef/upload_role.rb', line 12

def required_options
  %i(application)
end

#upload_directory(options) ⇒ Object



16
17
18
# File 'lib/pantry/chef/upload_role.rb', line 16

def upload_directory(options)
  Pantry.root.join("applications", options[:application], "chef", "roles")
end