WARNING: 2.0.0 is the last major release of this gem. Atlas became Vagrant Cloud on 2017-06-30, because of this, the name makes less sense than it did. Additionally, HashiCorp have their own gem: hashicorp/vagrant_cloud.
Atlas is a Ruby client for Hashicorp's Atlas.
Add this line to your application's Gemfile:
gem 'atlas'
And then execute:
$ bundle
Or install it yourself as:
$ gem install atlas
atlas
uses an approach similar ActiveRecord:
# first, login with the token from Atlas
Atlas.configure do |config|
config.token = "test-token"
end
# then you can load in users (creating, updating, etc isn't supported by Atlas)
user = Atlas::User.find('nickcharlton')
#=> <Atlas::User username=nickcharlton...>
More likely, you'll want to grab a box and work with it:
box = Atlas::Box.find('nickcharlton/example-box')
#=> <Atlas::Box name=example-box'...>
# creating a new version
version = box.create_version(version: '1.0.0')
#=> <Atlas::BoxVersion version: '1.0.0')
# add a provider to that version
provider = version.create_provider(name: 'virtualbox')
# upload a file for the version
provider.upload(File.open('box_name.box'))
# set the version to be released
version.release
It aims to support most of the functionality listed in the Atlas API Documentation.
- Fork it ( https://github.com/nickcharlton/atlas-ruby/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Copyright (c) 2015 Nick Charlton nick@nickcharlton.net