vagrant_cloud 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +16 -0
- data/lib/vagrant_cloud.rb +1 -0
- data/lib/vagrant_cloud/version.rb +8 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 977ffdd0c89f9fe2e1ca9a0d566f33332ee31c89
|
4
|
+
data.tar.gz: 1479ff5997c230151cb22b1e241c0426aed2f29c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7edc5f47d0623fa35dd0f69d71c77a098e32d0ee9ce5144137921ea8d0071574ea4e796f4e964fcdc4da2d8603917bf1a26d050c0009d8c8c70d5a035d783de1
|
7
|
+
data.tar.gz: ec2c027e276dab7d1617572eb2fff665d903fdcef2a654f9835349e65fc843abb8937c11946add27f9ce9c08ee24ed580375c3e06624b4b7034e3b417ced2395
|
data/README.md
CHANGED
@@ -2,3 +2,19 @@ vagrant_cloud
|
|
2
2
|
=============
|
3
3
|
|
4
4
|
*Very* minimalistic ruby wrapper for the [Vagrant Cloud API](https://vagrantcloud.com/api).
|
5
|
+
|
6
|
+
Consisting of four basic classes for your *account*, *boxes*, *versions* and *providers*.
|
7
|
+
|
8
|
+
Usage
|
9
|
+
-----
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
account = VagrantCloud::Account.new('<username>', '<access_token>')
|
13
|
+
box = vagrant_cloud.ensure_box('my_box')
|
14
|
+
version = box.ensure_version('0.0.1')
|
15
|
+
provider_foo = version.ensure_provider('foo', 'http://example.com/foo.box')
|
16
|
+
provider_bar = version.ensure_provider('bar', 'http://example.com/bar.box')
|
17
|
+
|
18
|
+
version.release
|
19
|
+
puts provider_foo.download_url
|
20
|
+
```
|
data/lib/vagrant_cloud.rb
CHANGED
@@ -20,10 +20,18 @@ module VagrantCloud
|
|
20
20
|
data['description_markdown']
|
21
21
|
end
|
22
22
|
|
23
|
+
def status
|
24
|
+
data['status']
|
25
|
+
end
|
26
|
+
|
23
27
|
def providers
|
24
28
|
data['providers'].map { |data| Provider.new(self, data['name'], data) }
|
25
29
|
end
|
26
30
|
|
31
|
+
def to_s
|
32
|
+
version
|
33
|
+
end
|
34
|
+
|
27
35
|
def data
|
28
36
|
@data ||= account.request('get', "/box/#{account.username}/#{box.name}/version/#{number}")
|
29
37
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant_cloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cargo Media
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest_client
|