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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4629112cf6cd74a0d19c03ad1b91cf4c5183ceaf
4
- data.tar.gz: de1512459a12c58c6d76c99253238cfb698f23b0
3
+ metadata.gz: 501f18e17e8ec70da2fbb1519c194488e2bd9869
4
+ data.tar.gz: a284c2af7a88fc1de2d6513294759202050d54f4
5
5
  SHA512:
6
- metadata.gz: e3c03b54816422192a1c66b7820c863e011db1c42688ffaedeee9644715abce7f1518d2519cac6be080a403b4721a6884e95aa8e72680b78d791dddcfcf0fd77
7
- data.tar.gz: a9d03e7c5c250d5de3bfec82b9ecd442d14b905ff9ec71130ddc75b03c7ecb098b63003d1f3c59f06264097bb5dcf43b063e0f900469719359d243fa737d451c
6
+ metadata.gz: b0c929872a6ea16d0ab38c00c43189fc51789317e9026a623aabf417fd8d8fd3d764a7f1f6b33a8fc78ccf74a0bcbed1421f78a70f4e2c2540d23a156eba1d10
7
+ data.tar.gz: 3b4e7f51abecdb1a066f559cade4bb5c9a1888439f665f0dc6127448080c15ce16ca9ff9c8f989c6a4773a1e754cd9437d415982e1bc18edab0216e29ef993a3
@@ -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
- @region, @access_key_id, @secret_access_key, @session_token = Credentials.new.get_aws_info(@aws_profile, @aws_dir)
327
- @region = UNSET_VALUE if @region.nil?
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-aws-mkubenka
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2.pre.9
4
+ version: 0.7.2.pre.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mitchell Hashimoto