Sha256: b4fb31e6baadc8a548eec39bad4b287cb9302ffd5d472f16bc7ce34038476c78

Contents?: true

Size: 661 Bytes

Versions: 4

Compression:

Stored size: 661 Bytes

Contents

Capistrano::Configuration.instance(:must_exist).load do |config|
  set :reviewed, nil

  namespace :deploy do
    task :challenge do
      if dna["app_env"] == "production"
        unless ENV['FLAGS_tag'] && !(ENV['FLAGS_tag'].empty? || ENV['FLAGS_tag'] == "HEAD")
          puts "Did not specify a tag for production via -t vX.Y.Z"
          abort
        end

        a, b = rand(10), rand(10)
        if Capistrano::CLI.ui.ask(" -- WARNING: Accessing production, please think: #{a} + #{b} = ").downcase.strip.to_i != (a + b)
          abort
        else
          sleep(3)
        end
      end
    end
  end

  before "deploy:began", "deploy:challenge"
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
alpha_omega-1.3.37 lib/alpha_omega/config/deploy_challenge.rb
alpha_omega-1.3.36 lib/alpha_omega/config/deploy_challenge.rb
alpha_omega-1.3.35 lib/alpha_omega/config/deploy_challenge.rb
alpha_omega-1.3.34 lib/alpha_omega/config/deploy_challenge.rb