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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 82c386664256afbd3d017a1cad7d07ceb8c659e7
4
- data.tar.gz: 4b8a42f0182d40bb5a1f671dc6d17969b5bf1071
3
+ metadata.gz: 478caf9f833e13814ac88e18fd549a3ab4aef6ed
4
+ data.tar.gz: f813dfb69d87c1169c4764ca3e85e39e90cb2f72
5
5
  SHA512:
6
- metadata.gz: 8d08e64cc735ebccd6151cea768d600c091c5899cc8ad479eb5fb86b58fe3a87de3adc5eeb35063d551cf82edff83b0422301bf8a3e39a996471962bcd9f5f54
7
- data.tar.gz: 12fd51ac2a8b7f3d6bb3c75b11df8d35709a223b083d9b31f3c4510192abf32a452ff9b8aa2e008d3d787276a9bc0839bef7a51956f436a7bfea1aa17fd0ad26
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
- profile = ENV['AWS_PROFILE'] || 'default'
22
- profile_config = load_profile_config(profile)
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
@@ -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.0
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.4.5.1
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)