Sha256: c2b07a6f0076cdf34f426d5e33ff641ff2a5a91c041e8dafc745046b4167b6cb
Contents?: true
Size: 575 Bytes
Versions: 16
Compression:
Stored size: 575 Bytes
Contents
module Instapusher 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
16 entries across 16 versions & 1 rubygems