Sha256: 774a5cc9ab9edfbf991fdfa983b2bc3cf98390f6b482cbaae940c78db2e949b7

Contents?: true

Size: 1.04 KB

Versions: 46

Compression:

Stored size: 1.04 KB

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 directory (Optional): ").to_s
            config['upload-dir'] = upload_dir unless upload_dir.empty?
            config['acl'] = ask("S3 ACL Settings (private, public_read, public_read_write, authenticated_read, bucket_owner_read, bucket_owner_full_control): ") { |q| q.default = 'private'}
            encrypt(config, 'secret_access_key') if agree("Encrypt secret access key? ") { |q| q.default = 'yes' }
          end
        end
      end
    end
  end
end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
travis-1.7.3.travis.644.5 lib/travis/cli/setup/s3.rb
travis-1.7.3.travis.641.5 lib/travis/cli/setup/s3.rb
travis-1.7.3.travis.640.5 lib/travis/cli/setup/s3.rb
travis-1.7.3.travis.637.5 lib/travis/cli/setup/s3.rb
travis-1.7.2 lib/travis/cli/setup/s3.rb
travis-1.7.2.travis.636.5 lib/travis/cli/setup/s3.rb
travis-1.7.2.travis.635.5 lib/travis/cli/setup/s3.rb
travis-1.7.2.travis.634.5 lib/travis/cli/setup/s3.rb
travis-1.7.2.travis.633.5 lib/travis/cli/setup/s3.rb
travis-1.7.2.travis.632.5 lib/travis/cli/setup/s3.rb
travis-1.7.2.travis.630.5 lib/travis/cli/setup/s3.rb
travis-1.7.2.travis.627.5 lib/travis/cli/setup/s3.rb
travis-1.7.2.travis.626.5 lib/travis/cli/setup/s3.rb
travis-1.7.2.travis.625.5 lib/travis/cli/setup/s3.rb
travis-1.7.2.travis.623.5 lib/travis/cli/setup/s3.rb
travis-1.7.2.travis.621.5 lib/travis/cli/setup/s3.rb
travis-1.7.1 lib/travis/cli/setup/s3.rb
travis-1.7.1.travis.613.5 lib/travis/cli/setup/s3.rb
travis-1.7.0 lib/travis/cli/setup/s3.rb
travis-1.6.18.travis.612.5 lib/travis/cli/setup/s3.rb