Sha256: cd920f2f6ad39d05e19f90869765c812a7c8ebde6c454ea557028d789bad37c8
Contents?: true
Size: 576 Bytes
Versions: 9
Compression:
Stored size: 576 Bytes
Contents
module Instapusher2 class SpecialInstructionForProduction def run question = "You are deploying to production. Did you take backup? If not then execute rake handy:heroku:backup_production and then come back. " STDOUT.puts question STDOUT.puts "Answer 'yes' or 'no' " input = STDIN.gets.chomp.downcase if %w(yes y).include?(input) #do nothing elsif %w(no n).include?(input) abort "Please try again when you have taken the backup" else abort "Please answer yes or no" end end end end
Version data entries
9 entries across 9 versions & 2 rubygems