vagrant_cloud 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/vagrant_cloud/account.rb +8 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b0baa1b73ccef78633227a1fae9a5aea768d3fa0
|
4
|
+
data.tar.gz: 61a1dbe1379072d0bbc2e6f910835ca7d5933e75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c56f5bb70b91a1da4867b49b0eee15050a2a41ecdec8ef562318fcd2de9ed83468f081da38fc7b202eb8046de9c014a63fe803cde101284e8657d1ad0c01fa9
|
7
|
+
data.tar.gz: fbb13a675e7d4751b9de1f01bcc7ecf2ed76a5af00106d5d074724e44c575a3393d8e44230551c9760bc6410a00126b223505d99657d700edf2c45ee5b0d29d2
|
data/README.md
CHANGED
@@ -7,7 +7,9 @@ Consisting of four basic classes for your *account*, *boxes*, *versions* and *pr
|
|
7
7
|
|
8
8
|
Usage
|
9
9
|
-----
|
10
|
+
The *vagrant_cloud* gem is hosted on [RubyGems](https://rubygems.org/gems/vagrant_cloud), see installation instructions there.
|
10
11
|
|
12
|
+
Example usage:
|
11
13
|
```ruby
|
12
14
|
account = VagrantCloud::Account.new('<username>', '<access_token>')
|
13
15
|
box = vagrant_cloud.ensure_box('my_box')
|
@@ -37,9 +37,14 @@ module VagrantCloud
|
|
37
37
|
|
38
38
|
def request(method, path, params = {})
|
39
39
|
params[:access_token] = access_token
|
40
|
-
|
41
|
-
|
42
|
-
|
40
|
+
headers = {:access_token => access_token}
|
41
|
+
result = RestClient::Request.execute(
|
42
|
+
:method => method,
|
43
|
+
:url => url_base + path,
|
44
|
+
:payload => params,
|
45
|
+
:headers => headers,
|
46
|
+
:ssl_version => 'TLSv1'
|
47
|
+
)
|
43
48
|
result = JSON.parse(result)
|
44
49
|
errors = result['errors']
|
45
50
|
raise "Vagrant Cloud returned error: #{errors}" if errors
|
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.2.
|
4
|
+
version: 0.2.1
|
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-
|
11
|
+
date: 2014-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest_client
|
@@ -71,7 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
71
71
|
version: '0'
|
72
72
|
requirements: []
|
73
73
|
rubyforge_project:
|
74
|
-
rubygems_version: 2.
|
74
|
+
rubygems_version: 2.4.2
|
75
75
|
signing_key:
|
76
76
|
specification_version: 4
|
77
77
|
summary: Vagrant Cloud API wrapper
|