vagrant-aws-mkubenka 0.7.2.pre.9 → 0.7.2.pre.10
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/lib/vagrant-aws/config.rb +2 -2
- data/spec/vagrant-aws/config_spec.rb +17 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 501f18e17e8ec70da2fbb1519c194488e2bd9869
|
4
|
+
data.tar.gz: a284c2af7a88fc1de2d6513294759202050d54f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b0c929872a6ea16d0ab38c00c43189fc51789317e9026a623aabf417fd8d8fd3d764a7f1f6b33a8fc78ccf74a0bcbed1421f78a70f4e2c2540d23a156eba1d10
|
7
|
+
data.tar.gz: 3b4e7f51abecdb1a066f559cade4bb5c9a1888439f665f0dc6127448080c15ce16ca9ff9c8f989c6a4773a1e754cd9437d415982e1bc18edab0216e29ef993a3
|
data/lib/vagrant-aws/config.rb
CHANGED
@@ -323,8 +323,8 @@ module VagrantPlugins
|
|
323
323
|
if @access_key_id == UNSET_VALUE or @secret_access_key == UNSET_VALUE
|
324
324
|
@aws_profile = 'default' if @aws_profile == UNSET_VALUE
|
325
325
|
@aws_dir = ENV['HOME'].to_s + '/.aws/' if @aws_dir == UNSET_VALUE
|
326
|
-
@
|
327
|
-
@region =
|
326
|
+
@aws_region, @access_key_id, @secret_access_key, @session_token = Credentials.new.get_aws_info(@aws_profile, @aws_dir)
|
327
|
+
@region = @aws_region if @region == UNSET_VALUE and !@aws_region.nil?
|
328
328
|
else
|
329
329
|
@aws_profile = nil
|
330
330
|
@aws_dir = nil
|
@@ -219,6 +219,23 @@ aws_session_token= TOKuser3
|
|
219
219
|
its("access_key_id") { should == "AKIdefault" }
|
220
220
|
its("secret_access_key") { should == "PASSdefault" }
|
221
221
|
its("session_token") { should be_nil }
|
222
|
+
its("region") { should == "eu-west-1" }
|
223
|
+
end
|
224
|
+
|
225
|
+
context "with default profile and overriding region" do
|
226
|
+
subject do
|
227
|
+
allow(File).to receive(:exist?).and_return(true)
|
228
|
+
allow(File).to receive(:read).with(filename_cfg).and_return(data_cfg)
|
229
|
+
allow(File).to receive(:read).with(filename_keys).and_return(data_keys)
|
230
|
+
instance.region = "eu-central-1"
|
231
|
+
instance.tap do |o|
|
232
|
+
o.finalize!
|
233
|
+
end
|
234
|
+
end
|
235
|
+
its("access_key_id") { should == "AKIdefault" }
|
236
|
+
its("secret_access_key") { should == "PASSdefault" }
|
237
|
+
its("session_token") { should be_nil }
|
238
|
+
its("region") { should == "eu-central-1" }
|
222
239
|
end
|
223
240
|
|
224
241
|
context "without any credential environment variables and chosing a profile" do
|