opsicle 2.1.0 → 2.2.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 +4 -4
- data/lib/opsicle/config.rb +2 -1
- data/lib/opsicle/version.rb +1 -1
- data/spec/opsicle/config_spec.rb +12 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef5c24375ecdfc5f145c4629f7cd616e6606e311
|
4
|
+
data.tar.gz: a66ff71b1fd05c809d41af6ce5b728ba814c1884
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 911b78c35cb0e6ad3f620f2a2ef9c2b9068246e6c10897f8fb35449f971927c3cef524bc346628eb27989b218c769a7e4443e85bc207d4183ca92ab8919b0874
|
7
|
+
data.tar.gz: 68b131b034da7f96aefd511ae4d2d343affe92b3c4d50fa19d66e4fe503239d0f2a3f9499b6a47c52ff00e60cffd065b3563a4f4daca065ae79a9fcaf4ea532b
|
data/lib/opsicle/config.rb
CHANGED
@@ -55,7 +55,8 @@ module Opsicle
|
|
55
55
|
end
|
56
56
|
|
57
57
|
def authenticate_with_credentials
|
58
|
-
|
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.')
|
data/lib/opsicle/version.rb
CHANGED
data/spec/opsicle/config_spec.rb
CHANGED
@@ -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.
|
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-
|
12
|
+
date: 2016-10-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aws-sdk
|