mydrive-aws-mfa 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aws_mfa.rb +3 -3
- data/lib/aws_mfa_client.rb +2 -2
- 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: 478caf9f833e13814ac88e18fd549a3ab4aef6ed
|
4
|
+
data.tar.gz: f813dfb69d87c1169c4764ca3e85e39e90cb2f72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 071c8c41b6753186870cc4b4a840563c50c7d48bb8704d171092e182b1c101da0552807eb65e01d69a1d5708c48ca2269282b04070eb03bf31363786e0d55b25
|
7
|
+
data.tar.gz: 10f0c9abff4e4862e5dad8778a8c44abd6f6e74130e39eb12c293768854c6ce3f904d7bd46b0a7ab077fe638741f8f7adbdf9dcb6ef8c537b3c2c8cb211eab80
|
data/lib/aws_mfa.rb
CHANGED
@@ -17,9 +17,9 @@ class AwsMfa
|
|
17
17
|
@mydrive_credentials_cache_dir = set_mydrive_credentials_cache_dir
|
18
18
|
end
|
19
19
|
|
20
|
-
def execute(execution_output = :set_env)
|
21
|
-
|
22
|
-
profile_config = load_profile_config(
|
20
|
+
def execute(execution_output = :set_env, profile = nil)
|
21
|
+
aws_profile = profile || ENV['AWS_PROFILE'] || 'default'
|
22
|
+
profile_config = load_profile_config(aws_profile)
|
23
23
|
credentials = load_credentials(profile_config)
|
24
24
|
execute_output(execution_output, credentials)
|
25
25
|
end
|
data/lib/aws_mfa_client.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
require_relative 'aws_mfa'
|
2
2
|
|
3
3
|
class AwsMfaClient
|
4
|
-
def execute(execution_output = :set_env)
|
4
|
+
def execute(execution_output = :set_env, profile = nil)
|
5
5
|
return if running_on_aws_ec2_instance?
|
6
|
-
AwsMfa.new.execute(execution_output)
|
6
|
+
AwsMfa.new.execute(execution_output, profile)
|
7
7
|
end
|
8
8
|
|
9
9
|
def running_on_aws_ec2_instance?
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mydrive-aws-mfa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MyDrive Solutions Ltd
|
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
91
|
requirements:
|
92
92
|
- aws-cli
|
93
93
|
rubyforge_project:
|
94
|
-
rubygems_version: 2.
|
94
|
+
rubygems_version: 2.6.13
|
95
95
|
signing_key:
|
96
96
|
specification_version: 4
|
97
97
|
summary: Run AWS commands with MFA (MyDrive fork)
|