class AfterParty::Generators::TaskGenerator
creates after_party tasks
Public Instance Methods
copy_deploy_task()
click to toggle source
# File lib/generators/task/task_generator.rb, line 15 def copy_deploy_task template( 'deploy.txt.erb', "lib/tasks/deployment/#{timestamp}_#{file_name}.rake" ) end
Private Instance Methods
file_name()
click to toggle source
# File lib/generators/task/task_generator.rb, line 24 def file_name name.underscore end
task_description()
click to toggle source
# File lib/generators/task/task_generator.rb, line 28 def task_description line = 'Deployment task: ' return line + file_name if options.description.blank? line + options.description end
timestamp()
click to toggle source
# File lib/generators/task/task_generator.rb, line 35 def timestamp @timestamp ||= Time.now.utc.strftime('%Y%m%d%H%M%S') end