firespring_dev_commands 1.5.0.pre.alpha.2 → 1.5.0.pre.alpha.3
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
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7ab48cd629fcaed00fe12f7510cc46ccc82940ec0b635d5f4023e7b9d1f861a7
|
|
4
|
+
data.tar.gz: 8cfc0a4dab1a338f13017dba85fee7050bc986fc7c44ed0e5c8b72ff8531bf4a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a217867d07089b746be82d69a754288ccadd0bc363e04a62e533820849d06a3f586a0e94d242d00118c218f5d2e56a1d9ea6aa51dd26e05a6801767a2437d594
|
|
7
|
+
data.tar.gz: 7784f48a51cdaed6e328b4fd91ee16de0cb9f9ee40483a3915ded2c9e2345b245cfd8826993981d9a3ead0a54b7573694b42bb74a0fca09eb07fd89c06be7500
|
|
@@ -31,7 +31,7 @@ module Dev
|
|
|
31
31
|
# Temporary credentials are written back to the credentials file
|
|
32
32
|
def authorize!(account)
|
|
33
33
|
# Make sure the account has been set up
|
|
34
|
-
cfgini = setup_cfgini
|
|
34
|
+
cfgini = setup_cfgini(account)
|
|
35
35
|
|
|
36
36
|
defaultini = cfgini['default']
|
|
37
37
|
profileini = cfgini["profile #{account}"]
|
|
@@ -39,7 +39,7 @@ module Dev
|
|
|
39
39
|
region = profileini['region'] || defaultini['region'] || Dev::Aws::DEFAULT_REGION
|
|
40
40
|
|
|
41
41
|
serial = profileini['mfa_serial_name'] || defaultini['mfa_serial_name']
|
|
42
|
-
serial = "arn:aws:iam::#{Dev::Aws::Account.new.
|
|
42
|
+
serial = "arn:aws:iam::#{Dev::Aws::Account.new.root.id}:mfa/#{serial}" if serial
|
|
43
43
|
serial ||= profileini['mfa_serial'] || defaultini['mfa_serial']
|
|
44
44
|
|
|
45
45
|
role = profileini['role_name'] || defaultini['role_name']
|
|
@@ -71,7 +71,7 @@ module Dev
|
|
|
71
71
|
|
|
72
72
|
# Returns the config ini file
|
|
73
73
|
# Runs the setup for our current account if it's not already setup
|
|
74
|
-
def setup_cfgini
|
|
74
|
+
def setup_cfgini(account)
|
|
75
75
|
cfgini = IniFile.new(filename: "#{Dev::Aws::CONFIG_DIR}/config", default: 'default')
|
|
76
76
|
unless cfgini.has_section?("profile #{account}")
|
|
77
77
|
Dev::Aws::Account.new.write!(account)
|