stemcell 0.11.7 → 0.11.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bbe504f40413724bf87e2b12fac6d6e82da0f47c
4
- data.tar.gz: 3ee37995a832825a2479fd784d7d02d8ef070875
3
+ metadata.gz: aac5c43057f6dedabdbae868bc6d2ba532a024f2
4
+ data.tar.gz: c0dfd5f07899e1b6ead8c9ba6c201aebee2177dc
5
5
  SHA512:
6
- metadata.gz: acd48d19f76a18638048eae5ce84f4537bcb60a8d036510a60d2aa87d220840973e19fb094216e2a192d5f1f6b5e6b43914e9cf44e302dcb9c89a0b8f9785d01
7
- data.tar.gz: b929a418da0773876d21785fb7d67fc8ea19e95e989111dae3a8ee13649602299a65caef33eb500750fc5544c19c7a717ef0685c3d5013a2e6e8f97c9d6f3081
6
+ metadata.gz: 33f543e985945155f3f08618b8d3922827c0351bbf1733e76a6384086bae081539d73eb36e5fc8c73febc47f5d6a2bd8397f288edcfe248f7366e9d36d428e91
7
+ data.tar.gz: b15dc55412394a25fbb989fb12c7a3f8f2da632891755e312825e58a37ac889f1d0896a39f4fff747c92f7a90f9e34c1db43757ef2591a226ffd7de8e926b12f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # 0.11.7
2
+ - Configure AWS earlier to work around aws-sdk-v1 vpc bug
3
+
1
4
  # 0.11.7
2
5
  - Convert security group names to ids when launching VPC instances
3
6
  - Allow classic link to associate VPC security groups by name
@@ -78,6 +78,7 @@ module Stemcell
78
78
  @aws_access_key = opts['aws_access_key']
79
79
  @aws_secret_key = opts['aws_secret_key']
80
80
  @aws_session_token = opts['aws_session_token']
81
+ configure_aws_creds_and_region
81
82
  end
82
83
 
83
84
  def launch(opts={})
@@ -429,17 +430,6 @@ module Stemcell
429
430
  def ec2
430
431
  return @ec2 if @ec2
431
432
 
432
- # configure AWS with creds/region
433
- aws_configs = {:region => @region}
434
- aws_configs.merge!({
435
- :access_key_id => @aws_access_key,
436
- :secret_access_key => @aws_secret_key
437
- }) if @aws_access_key && @aws_secret_key
438
- aws_configs.merge!({
439
- :session_token => @aws_session_token,
440
- }) if @aws_session_token
441
- AWS.config(aws_configs)
442
-
443
433
  # calculate our ec2 url
444
434
  ec2_url = "ec2.#{@region}.amazonaws.com"
445
435
 
@@ -460,5 +450,18 @@ module Stemcell
460
450
  sleep [RUNNING_STATE_WAIT_SLEEP_TIME, times_out_at - now].min
461
451
  end
462
452
  end
453
+
454
+ def configure_aws_creds_and_region
455
+ # configure AWS with creds/region
456
+ aws_configs = {:region => @region}
457
+ aws_configs.merge!({
458
+ :access_key_id => @aws_access_key,
459
+ :secret_access_key => @aws_secret_key
460
+ }) if @aws_access_key && @aws_secret_key
461
+ aws_configs.merge!({
462
+ :session_token => @aws_session_token,
463
+ }) if @aws_session_token
464
+ AWS.config(aws_configs)
465
+ end
463
466
  end
464
467
  end
@@ -1,3 +1,3 @@
1
1
  module Stemcell
2
- VERSION = "0.11.7"
2
+ VERSION = "0.11.8"
3
3
  end
@@ -156,4 +156,15 @@ describe Stemcell::Launcher do
156
156
  expect(errors.all?(&:nil?)).to be true
157
157
  end
158
158
  end
159
+
160
+ describe '#configure_aws_creds_and_region' do
161
+ it 'AWS region is configured after launcher is instanciated' do
162
+ expect(AWS.config.region).to be_eql('region')
163
+ end
164
+
165
+ it 'AWS region configuration changed' do
166
+ mock_launcher = Stemcell::Launcher.new('region' => 'ap-northeast-1')
167
+ expect(AWS.config.region).to be_eql('ap-northeast-1')
168
+ end
169
+ end
159
170
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stemcell
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.7
4
+ version: 0.11.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Rhoads
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2017-11-14 00:00:00.000000000 Z
14
+ date: 2018-01-02 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: aws-sdk-v1
@@ -239,7 +239,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
239
239
  version: '0'
240
240
  requirements: []
241
241
  rubyforge_project:
242
- rubygems_version: 2.5.2
242
+ rubygems_version: 2.4.5.1
243
243
  signing_key:
244
244
  specification_version: 4
245
245
  summary: no summary