opsicle 2.1.0 → 2.2.0

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: ec2a91363560aea651074f4c23361278855ce22d
4
- data.tar.gz: c55b4b23ebab64601cc4f211bc2dbb27380bd3af
3
+ metadata.gz: ef5c24375ecdfc5f145c4629f7cd616e6606e311
4
+ data.tar.gz: a66ff71b1fd05c809d41af6ce5b728ba814c1884
5
5
  SHA512:
6
- metadata.gz: 4b214985df18e366ad1e93d2a649a7809e1e2c033e59de932caad7067e56700702428159ec807da4283072b6dfe0165d13244f486e9d17a5347f24f62e50ca52
7
- data.tar.gz: f92adf09b8751466df7d5281dcd2e165ed59f7389cbe266079dafd79f4341c0da1faea4ac8709b0e19aee795a2d24e44f4f01627ac2ea0b0bd84906aa46aad1b
6
+ metadata.gz: 911b78c35cb0e6ad3f620f2a2ef9c2b9068246e6c10897f8fb35449f971927c3cef524bc346628eb27989b218c769a7e4443e85bc207d4183ca92ab8919b0874
7
+ data.tar.gz: 68b131b034da7f96aefd511ae4d2d343affe92b3c4d50fa19d66e4fe503239d0f2a3f9499b6a47c52ff00e60cffd065b3563a4f4daca065ae79a9fcaf4ea532b
@@ -55,7 +55,8 @@ module Opsicle
55
55
  end
56
56
 
57
57
  def authenticate_with_credentials
58
- credentials = Aws::SharedCredentials.new(profile_name: @environment.to_s)
58
+ profile_name = opsworks_config[:profile_name] || @environment.to_s
59
+ credentials = Aws::SharedCredentials.new(profile_name: profile_name)
59
60
 
60
61
  unless credentials.set?
61
62
  abort('Opsicle can no longer authenticate through your ~/.fog file. Please run `opsicle legacy-credential-converter` before proceeding.')
@@ -1,3 +1,3 @@
1
1
  module Opsicle
2
- VERSION = "2.1.0"
2
+ VERSION = "2.2.0"
3
3
  end
@@ -36,6 +36,18 @@ module Opsicle
36
36
  allow(Aws::SharedCredentials).to receive(:new).and_return(coffee_types)
37
37
  expect(subject.aws_credentials).to eq(coffee_types)
38
38
  end
39
+
40
+ it "should suport configuarable profile name" do
41
+ allow(YAML).to receive(:load_file).with('./.opsicle').and_return({'derp' => { 'app_id' => 'app', 'stack_id' => 'stack', 'profile_name' => 'tacos' }})
42
+ mfa_devices = double('mfa_devices', mfa_devices: [])
43
+ client = double('iam_client', list_mfa_devices: mfa_devices)
44
+ allow(Aws::IAM::Client).to receive(:new).and_return(client)
45
+ coffee_types = {:coffee => "cappuccino", :beans => "arabica"}
46
+ allow(coffee_types).to receive('set?').and_return(true)
47
+ allow(Aws.config).to receive(:update).with({region: 'us-east-1', credentials: coffee_types})
48
+ allow(Aws::SharedCredentials).to receive(:new).with(profile_name: 'tacos').and_return(coffee_types)
49
+ expect(subject.aws_credentials).to eq(coffee_types)
50
+ end
39
51
  end
40
52
 
41
53
  context "#configure_aws_environment!" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opsicle
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Fleener
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-09-06 00:00:00.000000000 Z
12
+ date: 2016-10-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aws-sdk