firespring_dev_commands 1.4.2.pre.alpha.1 → 1.4.2.pre.alpha.2
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: 9f98e476af7eb463c6aec3f428f52127dc0e02a438ef25ca5c5c0888c11f1701
|
|
4
|
+
data.tar.gz: a81b1d7a9cd65d60883c86ab4a1a19b248e6029cb56c0d67e4d3bedd8f96c3c9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7a44b94c2a92e8a4c6438f654dced3b76cea73238b12b24380a4af8ac12348520e9c26a1fa587de30bb6df97fc1663bb3715ea05aa94032bc81d621ae37a307f
|
|
7
|
+
data.tar.gz: ae5c4d7f48bc4c31322e0c9e8770710bf037237973b62423e5470da74e4301a0fe56204abe89110e3e2d4d736a80af53988bbec3db9f32f17b03f403b2d5e6b8
|
|
@@ -16,11 +16,16 @@ module Dev
|
|
|
16
16
|
::Aws::STS::Client.new.get_caller_identity.account
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
-
# The
|
|
20
|
-
def
|
|
19
|
+
# The arn of the currently logged in identity
|
|
20
|
+
def logged_in_arn
|
|
21
21
|
::Aws::STS::Client.new.get_caller_identity.arn
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
+
# The role the current identity is using
|
|
25
|
+
def logged_in_role
|
|
26
|
+
logged_in_arn.split(%r{/})[1]
|
|
27
|
+
end
|
|
28
|
+
|
|
24
29
|
# The region associated with the current login
|
|
25
30
|
def logged_in_region
|
|
26
31
|
::Aws::STS::Client.new.send(:config).region
|
|
@@ -33,7 +33,7 @@ module Dev
|
|
|
33
33
|
# Print the profile info for the current account
|
|
34
34
|
def info
|
|
35
35
|
Dev::Aws::Credentials.new.export!
|
|
36
|
-
current_role = Dev::Aws::Credentials.new.logged_in_role
|
|
36
|
+
current_role = Dev::Aws::Credentials.new.logged_in_role
|
|
37
37
|
current_account_name = Dev::Aws::Account.new.name_by_account(current)
|
|
38
38
|
puts
|
|
39
39
|
puts " Currently logged in as #{current_role} to the #{current_account_name} (#{current}) account".light_yellow
|