firespring_dev_commands 1.4.1 → 1.4.2.pre.alpha.2
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: 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,6 +16,16 @@ module Dev
|
|
16
16
|
::Aws::STS::Client.new.get_caller_identity.account
|
17
17
|
end
|
18
18
|
|
19
|
+
# The arn of the currently logged in identity
|
20
|
+
def logged_in_arn
|
21
|
+
::Aws::STS::Client.new.get_caller_identity.arn
|
22
|
+
end
|
23
|
+
|
24
|
+
# The role the current identity is using
|
25
|
+
def logged_in_role
|
26
|
+
logged_in_arn.split(%r{/})[1]
|
27
|
+
end
|
28
|
+
|
19
29
|
# The region associated with the current login
|
20
30
|
def logged_in_region
|
21
31
|
::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
|
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,7 +1,7 @@
|
|
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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Firespring
|
@@ -453,9 +453,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
453
453
|
version: '2.7'
|
454
454
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
455
455
|
requirements:
|
456
|
-
- - "
|
456
|
+
- - ">"
|
457
457
|
- !ruby/object:Gem::Version
|
458
|
-
version:
|
458
|
+
version: 1.3.1
|
459
459
|
requirements: []
|
460
460
|
rubygems_version: 3.1.6
|
461
461
|
signing_key:
|