Sha256: 0150731c36ecac935e866110cd5063c3bbd348b028a4fcf6f74e0b99a4245fcf

Contents?: true

Size: 901 Bytes

Versions: 379

Compression:

Stored size: 901 Bytes

Contents

require 'travis/cli/setup'
require 'yaml'

module Travis
  module CLI
    class Setup
      class EngineYard < Service
        description "automatic deployment to Engine Yard"

        def run
          deploy 'engineyard' do |config|
            eyrc                  = File.expand_path(".eyrc", Dir.home)
            config['api_key']     = YAML.load_file(eyrc)["api_token"] if File.exists?(eyrc)
            config['api_key']     = ask("API token: ") { |q| q.echo = "*" }.to_s unless config['api_key']
            env                   = ask("Environment (optional): ").to_s
            config['environment'] = env unless env.empty?
            migrate               = agree("Run migrations on deploy? ") { |q| q.default = 'yes' }
            config['migrate']     = ask("Migration command: ") { |q| q.default = "rake db:migrate" } if migrate
          end
        end
      end
    end
  end
end

Version data entries

379 entries across 379 versions & 3 rubygems

Version Path
travis-1.11.1 lib/travis/cli/setup/engine_yard.rb
travis-1.11.0 lib/travis/cli/setup/engine_yard.rb
travis-1.10.1.travis.1341.9 lib/travis/cli/setup/engine_yard.rb
travis-1.10.1.travis.1321.9 lib/travis/cli/setup/engine_yard.rb
travis-1.10.1.travis.1312.9 lib/travis/cli/setup/engine_yard.rb
travis-1.10.1.travis.1311.9 lib/travis/cli/setup/engine_yard.rb
travis-1.10.1.travis.1305.9 lib/travis/cli/setup/engine_yard.rb
travis-1.10.0 lib/travis/cli/setup/engine_yard.rb
travis-1.9.2.travis.1304.9 lib/travis/cli/setup/engine_yard.rb
travis-1.9.2.travis.1303.9 lib/travis/cli/setup/engine_yard.rb
travis-1.10.0.pre.rc4 lib/travis/cli/setup/engine_yard.rb
travis-1.10.0.pre.rc3 lib/travis/cli/setup/engine_yard.rb
travis-1.10.0.pre.rc2 lib/travis/cli/setup/engine_yard.rb
travis-1.9.2.travis.1288.9 lib/travis/cli/setup/engine_yard.rb
travis-1.9.2.travis.1285.9 lib/travis/cli/setup/engine_yard.rb
travis-1.9.2.travis.1279.9 lib/travis/cli/setup/engine_yard.rb
travis-1.10.0.pre.rc1 lib/travis/cli/setup/engine_yard.rb
travis-1.9.2.travis.1254.9 lib/travis/cli/setup/engine_yard.rb
travis-1.9.2.travis.1236.9 lib/travis/cli/setup/engine_yard.rb
travis-1.9.2.travis.1224.9 lib/travis/cli/setup/engine_yard.rb