class Object
Public Instance Methods
cookbooks_s3_key(to)
click to toggle source
# File lib/momentum/tasks.rb, line 9 def cookbooks_s3_key(to) "#{stack_name(to)}.tgz" end
require_credentials!(args)
click to toggle source
Helpers for rake tasks
# File lib/momentum/tasks.rb, line 3 def require_credentials!(args) args.with_defaults aws_id: ENV['AWS_ID'], aws_secret: ENV['AWS_SECRET'], to: ENV['RAILS_ENV'] raise "Must specify target environment (e.g., staging)!" unless args[:to] raise "Must set aws_id and aws_secret!" unless args[:aws_id] && args[:aws_secret] end
stack_name(to)
click to toggle source
# File lib/momentum/tasks.rb, line 13 def stack_name(to) "#{Momentum.config[:app_base_name]}-#{to}" end
system!(command)
click to toggle source
# File lib/momentum/tasks.rb, line 17 def system!(command) success = system(command) fail "Failed with status #{$?.exitstatus}" unless success end