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

Version Path
instapusher-0.1.9 lib/instapusher/special_instruction_for_production.rb
instapusher-0.1.8 lib/instapusher/special_instruction_for_production.rb
instapusher-0.1.7 lib/instapusher/special_instruction_for_production.rb
instapusher-0.1.6 lib/instapusher/special_instruction_for_production.rb
instapusher-0.1.5 lib/instapusher/special_instruction_for_production.rb
instapusher-0.1.4 lib/instapusher/special_instruction_for_production.rb
instapusher-0.1.3 lib/instapusher/special_instruction_for_production.rb
instapusher-0.1.2 lib/instapusher/special_instruction_for_production.rb
instapusher-0.1.1 lib/instapusher/special_instruction_for_production.rb
instapusher-0.1.0 lib/instapusher/special_instruction_for_production.rb
instapusher-0.0.34 lib/instapusher/special_instruction_for_production.rb
instapusher-0.0.33 lib/instapusher/special_instruction_for_production.rb
instapusher-0.0.32 lib/instapusher/special_instruction_for_production.rb
instapusher-0.0.31 lib/instapusher/special_instruction_for_production.rb
instapusher-0.0.30 lib/instapusher/special_instruction_for_production.rb
instapusher-0.0.29 lib/instapusher/special_instruction_for_production.rb