Skip to content

Latest commit

 

History

History
58 lines (46 loc) · 1.96 KB

README.md

File metadata and controls

58 lines (46 loc) · 1.96 KB

vagrant_cloud

Minimalistic ruby client for the HashiCorp Atlas API (previously Vagrant Cloud API).

Build Status Gem Version

This client allows to create, modify and delete boxes, versions and providers. The main entry point is an object referencing your account.

Usage

Example usage:

account = VagrantCloud::Account.new('<username>', '<access_token>')
box = account.ensure_box('my_box')
version = box.ensure_version('0.0.1')
provider = version.ensure_provider('virtualbox', 'http://example.com/foo.box')

version.release
puts provider.download_url

Example CLI usage: Create a version and provider within an existing Box, upload a file to be hosted by Vagrant/Atlas, and release the version

vagrant_cloud create_version --username $USERNAME --token $VAGRANT_CLOUD_TOKEN --box $BOX_NAME --version $BOX_VERSION
vagrant_cloud create_provider --username $USERNAME --token $VAGRANT_CLOUD_TOKEN --box $BOX_NAME --version $BOX_VERSION
vagrant_cloud upload_file --username $USERNAME --token $VAGRANT_CLOUD_TOKEN --box $BOX_NAME --version $BOX_VERSION --provider_file_path $PACKAGE_PATH
vagrant_cloud release_version --username $USERNAME --token $VAGRANT_CLOUD_TOKEN --box $BOX_NAME --version $BOX_VERSION

If you installed vagrant_cloud with bundler, then you may have to invoke using bundle exec vagrant_cloud

Development & Contributing

Pull requests are very welcome!

Install dependencies:

bundle install

Run the tests:

bundle exec rspec

Check the code syntax:

bundle exec rubocop

Release a new version:

  1. Bump the version in vagrant_cloud.gemspec, merge to master.
  2. Push a new tag to master.
  3. Release to RubyGems with bundle exec rake release.