vagrant-cloudstack 0.5.0 → 0.6.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d8a5fb6d4705653f7d21a743fefd04d85835221b
4
- data.tar.gz: 11f800be47556f82ee523d4f2b8d922ff43282f7
3
+ metadata.gz: 9369e8798fdd548b1f4a6de5a29d5e4507a08137
4
+ data.tar.gz: 38209b67315ca3b2b3b06b96bf5e5fed1b368642
5
5
  SHA512:
6
- metadata.gz: aa716e9e7f67ecf57162a41b4bf22618059a5434fc6150c9774c3123a505b7cc99cfe24202e3a92bab295737120c265b0a42de0a6e221e4bd3ed70ac56ab9117
7
- data.tar.gz: ac00112e1d8d52bbe1869e2357e306c33657095612b7db86362cefaaa8cae62e204313d4ca4274952d9d5f44efe8aa517b4866a34e70587af89fcc0db92d117a
6
+ metadata.gz: d54f3cc4bf1413a199945b84b4a0713023ca2a51323e0ad799eda47098529273d54ab647e3153fceed6507a1010ef5ec07d74b5f80844b60ded4aeda3b8bde38
7
+ data.tar.gz: 9624a75d8910020a7c30bc5d370d0ec9d3bf634ba70407f9bc78b336c34079f6fcd194be7a641309064d6e651b7663be103672e9419b8b4af22f65c8b05a8090
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.0.0-p451
1
+ 2.0.0-p481
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 0.6.0 (May 13, 2014)
2
+
3
+ * Bump the Ruby version to 2.0.0-p481
4
+ * The API and secret keys can now be passed through environment
5
+ variables CLOUDSTACK_API_KEY and CLOUDSTACK_SECRET_KEY.
6
+
1
7
  # 0.5.0 (Apr 29, 2014)
2
8
 
3
9
  * Use latest version of upstream fog which contains some much needed
data/build_rpm.sh CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/bin/bash
2
- VERSION=0.5.0
2
+ VERSION=0.6.0
3
3
  mkdir -p /tmp/vagrant-cloudstack-build_rpm.$$/vagrant-cloudstack-$VERSION
4
4
  cp -r . /tmp/vagrant-cloudstack-build_rpm.$$/vagrant-cloudstack-$VERSION/
5
5
  tar -C /tmp/vagrant-cloudstack-build_rpm.$$/ -czf ~/rpmbuild/SOURCES/vagrant-cloudstack-$VERSION.tar.gz vagrant-cloudstack-$VERSION
@@ -237,11 +237,10 @@ module VagrantPlugins
237
237
  # Scheme is 'http' by default
238
238
  @scheme = "http" if @scheme == UNSET_VALUE
239
239
 
240
- # Api key must be nil, since we can't default that
241
- @api_key = nil if @api_key == UNSET_VALUE
242
-
243
- # Secret key must be nil, since we can't default that
244
- @secret_key = nil if @secret_key == UNSET_VALUE
240
+ # Try to get access keys from environment variables, they will
241
+ # default to nil if the environment variables are not present
242
+ @api_key = ENV['CLOUDSTACK_API_KEY'] if @api_key == UNSET_VALUE
243
+ @secret_key = ENV['CLOUDSTACK_SECRET_KEY'] if @secret_key == UNSET_VALUE
245
244
 
246
245
  # Set the default timeout for waiting for an instance to be ready
247
246
  @instance_ready_timeout = 120 if @instance_ready_timeout == UNSET_VALUE
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Cloudstack
3
- VERSION = "0.5.0"
3
+ VERSION = "0.6.0"
4
4
  end
5
5
  end
@@ -43,6 +43,35 @@ describe VagrantPlugins::Cloudstack::Config do
43
43
  its("user_data") { should be_nil }
44
44
  end
45
45
 
46
+ describe "getting credentials from environment" do
47
+ context "without CloudStack credential environment variables" do
48
+ subject do
49
+ instance.tap do |o|
50
+ o.finalize!
51
+ end
52
+ end
53
+
54
+ its("api_key") { should be_nil }
55
+ its("secret_key") { should be_nil }
56
+ end
57
+
58
+ context "with CloudStack credential variables" do
59
+ before :each do
60
+ ENV.stub(:[]).with("CLOUDSTACK_API_KEY").and_return("api_key")
61
+ ENV.stub(:[]).with("CLOUDSTACK_SECRET_KEY").and_return("secret_key")
62
+ end
63
+
64
+ subject do
65
+ instance.tap do |o|
66
+ o.finalize!
67
+ end
68
+ end
69
+
70
+ its("api_key") { should == "api_key" }
71
+ its("secret_key") { should == "secret_key" }
72
+ end
73
+ end
74
+
46
75
  describe "overriding defaults" do
47
76
  # I typically don't meta-program in tests, but this is a very
48
77
  # simple boilerplate test, so I cut corners here. It just sets
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-cloudstack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mitchell Hashimoto
@@ -18,7 +18,7 @@ authors:
18
18
  autorequire:
19
19
  bindir: bin
20
20
  cert_chain: []
21
- date: 2014-04-29 00:00:00.000000000 Z
21
+ date: 2014-05-13 00:00:00.000000000 Z
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency
24
24
  name: fog