Sha256: 49ddf325a34d5e64d6355ddd33b5f8556cdeb8711b240342f708154ada367197

Contents?: true

Size: 855 Bytes

Versions: 161

Compression:

Stored size: 855 Bytes

Contents

require 'travis/cli/setup'

module Travis
  module CLI
    class Setup
      class CloudFoundry < Service
        description "automatic deployment to Cloud Foundry"

        def run
          deploy 'cloudfoundry' do |config|
            target_file = File.expand_path('.cf/config.json', Dir.home)
            config['api']       ||= JSON.parse(File.read(target_file))["Target"] if File.exist? target_file
            config['api']       ||= ask("Cloud Foundry api: ").to_s
            config['username']     ||= ask("Cloud Foundry username: ").to_s
            config['password']     ||= ask("Cloud Foundry password: ") { |q| q.echo = "*" }.to_s
            config['organization'] ||= ask("Cloud Foundry organization: ").to_s
            config['space']        ||= ask("Cloud Foundry space: ").to_s
          end
        end
      end
    end
  end
end

Version data entries

161 entries across 161 versions & 3 rubygems

Version Path
travis-1.8.12.travis.1101.9 lib/travis/cli/setup/cloud_foundry.rb
travis-1.8.11 lib/travis/cli/setup/cloud_foundry.rb
travis-1.8.11.travis.1098.9 lib/travis/cli/setup/cloud_foundry.rb
travis-1.8.11.travis.1081.9 lib/travis/cli/setup/cloud_foundry.rb
travis-1.8.11.travis.1059.11 lib/travis/cli/setup/cloud_foundry.rb
travis-1.8.11.travis.1058.11 lib/travis/cli/setup/cloud_foundry.rb
travis-1.8.11.travis.1056.11 lib/travis/cli/setup/cloud_foundry.rb
travis-1.8.11.travis.1051.11 lib/travis/cli/setup/cloud_foundry.rb
travis-1.8.11.travis.1048.11 lib/travis/cli/setup/cloud_foundry.rb
travis-1.8.11.travis.1044.11 lib/travis/cli/setup/cloud_foundry.rb
travis-1.8.11.travis.1041.11 lib/travis/cli/setup/cloud_foundry.rb
travis-1.8.11.travis.1040.11 lib/travis/cli/setup/cloud_foundry.rb
travis-1.8.11.travis.1026.11 lib/travis/cli/setup/cloud_foundry.rb
travis-1.8.11.travis.1025.11 lib/travis/cli/setup/cloud_foundry.rb
travis-1.8.11.travis.1024.11 lib/travis/cli/setup/cloud_foundry.rb
travis-1.8.11.travis.1022.11 lib/travis/cli/setup/cloud_foundry.rb
travis-1.8.11.travis.1021.11 lib/travis/cli/setup/cloud_foundry.rb
travis-1.8.11.travis.1020.11 lib/travis/cli/setup/cloud_foundry.rb
travis-1.8.11.travis.1012.9 lib/travis/cli/setup/cloud_foundry.rb
travis-1.8.11.travis.1011.9 lib/travis/cli/setup/cloud_foundry.rb