aws-mfa-secure 0.3.1 → 0.3.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: 62039bd7f56af605c3a2c499b67adf53c5de41d32f502b9d34bb0a569553fba8
4
- data.tar.gz: 2751b27e5163aec11db0b64ad26d7653f7ff3bf2fbb7d0820a204c6112568d00
3
+ metadata.gz: 2e39008cea5e1bf43114c32b2478f530a69296a18065fc4af75e5c3074960be6
4
+ data.tar.gz: 262b9171dcb03c2497945b0bae5711eff2cf6d6a0e502948ed1668442f827fee
5
5
  SHA512:
6
- metadata.gz: 72ceaf1ef30338d2e518bf71a6429b2f3f143fe1561c2c2a1451b06ddba6008baf4bfd2a1834c2020ad5325dc5fb7116ce9cab3a0b2c3a36d40b74edcdc8130e
7
- data.tar.gz: c3558a483f7e04b05cbb8ebbcd676e74aee898a5f4be581451d01c81b4aa1fec5b4d606e7a1854c1f56f31fb4d6a274d3c8079bfe7528628064a15823f3ec239
6
+ metadata.gz: 528b239ff75ce82eb62e21555ec876f4d800783da73b796e3476908bae4801d4fa9624847683c55961a8f96bdfc237b3150494b2b99f57be5b697b3484604061
7
+ data.tar.gz: 4582fb337d00f6752046cd33b453bdf69ffdc4a34f826e2e0a5912586a41d1c46d81531503157becf9f907317a975cbea808cc97fd977c284e666bbaa53b2cc6
@@ -3,6 +3,9 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
5
5
 
6
+ ## [0.3.2]
7
+ - check for aws_cli_installed, allow to work on aws lambda
8
+
6
9
  ## [0.3.1]
7
10
  - allow specs to pass in other projects
8
11
 
@@ -10,6 +10,7 @@ module AwsMfaSecure
10
10
  extend Memoist
11
11
 
12
12
  def iam_mfa?
13
+ return false unless aws_cli_installed?
13
14
  return false unless mfa_serial
14
15
 
15
16
  # The iam_mfa? check will only return true for the case when mfa_serial is set and access keys are used.
@@ -22,6 +23,11 @@ module AwsMfaSecure
22
23
  aws_access_key_id && aws_secret_access_key && !source_profile
23
24
  end
24
25
 
26
+ def aws_cli_installed?
27
+ return false unless File.exist?("#{ENV['HOME']}/.aws")
28
+ return false unless system("type aws > /dev/null 2>&1")
29
+ end
30
+
25
31
  def fetch_creds?
26
32
  !good_session_creds?
27
33
  end
@@ -1,3 +1,3 @@
1
1
  module AwsMfaSecure
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-mfa-secure
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen