Sha256: aa2c69d70256ee8b04ac0781a238f619c0a1d554ee8b612d01174492f81e3a0f

Contents?: true

Size: 875 Bytes

Versions: 13

Compression:

Stored size: 875 Bytes

Contents

require 'travis/cli/setup'

module Travis
  module CLI
    class Setup
      class S3 < Service
        description "automatic pushing to S3"

        def run
          deploy 's3', 'push' do |config|
            config['access_key_id'] = ask("Access key ID: ").to_s
            config['secret_access_key'] = ask("Secret access key: ") { |q| q.echo = "*" }.to_s
            config['bucket'] = ask("Bucket: ").to_s
            local_dir = ask("Local project directory to upload (Optional): ").to_s
            config['local-dir'] = local_dir unless local_dir.empty?
            upload_dir = ask("S3 upload direcotry (Optional): ").to_s
            config['upload-dir'] = upload_dir unless upload_dir.empty?
            encrypt(config, 'secret_access_key') if agree("Encrypt secret access key? ") { |q| q.default = 'yes' }
          end
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
travis-1.6.4.travis.395.4 lib/travis/cli/setup/s3.rb
travis-1.6.3 lib/travis/cli/setup/s3.rb
travis-1.6.3.travis.394.4 lib/travis/cli/setup/s3.rb
travis-1.6.3.travis.392.4 lib/travis/cli/setup/s3.rb
travis-1.6.3.travis.390.4 lib/travis/cli/setup/s3.rb
travis-1.6.3.travis.389.4 lib/travis/cli/setup/s3.rb
travis-1.6.3.travis.388.4 lib/travis/cli/setup/s3.rb
travis-1.6.3.travis.387.4 lib/travis/cli/setup/s3.rb
travis-1.6.3.travis.386.4 lib/travis/cli/setup/s3.rb
travis-1.6.3.travis.385.4 lib/travis/cli/setup/s3.rb
travis-1.6.3.travis.384.4 lib/travis/cli/setup/s3.rb
travis-1.6.3.travis.381.4 lib/travis/cli/setup/s3.rb
travis-1.6.3.travis.379.4 lib/travis/cli/setup/s3.rb