Sha256: 1ad7700feac1729a1e0426aa23bd8a29032b1d8e6fdc9336c9597fc3c8f9cfd8

Contents?: true

Size: 905 Bytes

Versions: 5

Compression:

Stored size: 905 Bytes

Contents

#!/usr/bin/env ruby

require 'bundler/setup'
require 'aws'

require_relative 'support'

ROOT = Pathname.new(File.dirname(__FILE__))

box_urls = [REGION_STANDARD, REGION_NONSTANDARD].map do |region|
  s3 = AWS::S3.new(region: region)
  bucket = s3.buckets.create("#{region}.#{BUCKET}")

  box = bucket.objects["#{BOX_BASE}.box"]
  box.write(ROOT + Pathname.new("box/#{BOX_BASE}.box"))
  box.public_url

  metadata_string = File.read(ROOT + Pathname.new("box/#{BOX_BASE}")) % {
    box_url: box.public_url
  }

  metadata = bucket.objects[BOX_BASE]
  metadata.write(metadata_string, content_type: 'application/json')
  metadata.acl = :public_read

  box.public_url
end

atlas = Atlas.new(ATLAS_TOKEN, ATLAS_USERNAME)
atlas.create_box(ATLAS_BOX_NAME)
atlas.create_version(ATLAS_BOX_NAME, '1.0.1')
atlas.create_provider(ATLAS_BOX_NAME, '1.0.1', box_urls.sample)
atlas.release_version(ATLAS_BOX_NAME, '1.0.1')

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
vagrant-s3auth-1.0.3 test/setup.rb
vagrant-s3auth-1.0.2 test/setup.rb
vagrant-s3auth-1.0.1 test/setup.rb
vagrant-s3auth-1.0.0 test/setup.rb
vagrant-s3auth-1.0.0.rc1 test/setup.rb