Class: Automan::Cli::Stalker
- Inherits:
-
Base
- Object
- Thor
- Base
- Automan::Cli::Stalker
show all
- Defined in:
- lib/automan/cli/stalker.rb
Instance Method Summary
collapse
Methods inherited from Base
exit_on_failure?, #version
Instance Method Details
#cull_versions ⇒ Object
225
226
227
|
# File 'lib/automan/cli/stalker.rb', line 225
def cull_versions
Automan::Beanstalk::Version.new(options).cull_versions(options[:number_to_keep])
end
|
#deploy ⇒ Object
65
66
67
68
69
70
71
72
73
74
75
|
# File 'lib/automan/cli/stalker.rb', line 65
def deploy
if options[:manifest].nil? &&
(options[:version_label].nil? || options[:package].nil?)
puts "Must specify either manifest or both version_label and package"
help "deploy"
exit 1
end
Automan::Beanstalk::Deployer.new(options).deploy
end
|
#package ⇒ Object
268
269
270
271
272
273
274
275
276
277
|
# File 'lib/automan/cli/stalker.rb', line 268
def package
if !options[:manifest].nil? && options[:version_label].nil?
puts "Must specify version_label when uploading manifest file"
help "package"
exit 1
end
Automan::Beanstalk::Package.new(options).upload_package
end
|
#show_versions ⇒ Object
236
237
238
239
240
241
242
243
244
245
246
|
# File 'lib/automan/cli/stalker.rb', line 236
def show_versions
versions = Automan::Beanstalk::Version.new(options).versions
versions.each do |v|
tokens = [
v[:application_name],
v[:version_label],
v[:date_created].iso8601
]
say tokens.join("\t")
end
end
|
#upload_config ⇒ Object
192
193
194
|
# File 'lib/automan/cli/stalker.rb', line 192
def upload_config
Automan::Beanstalk::Uploader.new(options).upload_config_templates
end
|