firespring_dev_commands 1.4.1.pre.alpha.3 → 1.4.2.pre.alpha.1
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a556d5109fb1e74b021e30d932cc33524aae18dcd2e3b71b8fe62b8cc4687d79
|
4
|
+
data.tar.gz: 2d1aef5ee8253ca64f9e490865b961c9115d5f63134393e5a5536a49f322e139
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 119b834f548aad204943289cf39ec53c25b7819f426ce8627a5138e27d36325fb154b16124081d3d614998e9757c073c7c8ff4e53853657d9cfbad459496072e
|
7
|
+
data.tar.gz: ee8bb55e9972671aa00eec2523a3b48b93e44a15c621f03917ab1fdd894f67f806075489d0ede916865a8bb2c9190e8abddb559c4ab0fde45b710266fb5f1769
|
@@ -16,6 +16,11 @@ module Dev
|
|
16
16
|
::Aws::STS::Client.new.get_caller_identity.account
|
17
17
|
end
|
18
18
|
|
19
|
+
# The role the profile is currently logged in to
|
20
|
+
def logged_in_role
|
21
|
+
::Aws::STS::Client.new.get_caller_identity.arn
|
22
|
+
end
|
23
|
+
|
19
24
|
# The region associated with the current login
|
20
25
|
def logged_in_region
|
21
26
|
::Aws::STS::Client.new.send(:config).region
|
@@ -33,8 +33,10 @@ 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.split(%r{/})[1]
|
37
|
+
current_account_name = Dev::Aws::Account.new.name_by_account(current)
|
36
38
|
puts
|
37
|
-
puts " Currently logged in to the #{
|
39
|
+
puts " Currently logged in as #{current_role} to the #{current_account_name} (#{current}) account".light_yellow
|
38
40
|
puts
|
39
41
|
puts ' To use this profile in your local aws cli, you must either pass the profile as a command line argument ' \
|
40
42
|
'or export the corresponding aws variable:'.light_white
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: firespring_dev_commands
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.2.pre.alpha.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Firespring
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-05-
|
11
|
+
date: 2023-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|