4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# File 'lib/instapusher/special_instruction_for_production.rb', line 4
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)
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
|