Minimalistic ruby client for the HashiCorp Atlas API (previously Vagrant Cloud API).
This client allows to create, modify and delete boxes, versions and providers. The main entry point is an object referencing your account.
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
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:
- Bump the version in
vagrant_cloud.gemspec
, merge to master. - Push a new tag to master.
- Release to RubyGems with
bundle exec rake release
.