awsecrets 1.12.1 → 1.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -0
- data/lib/awsecrets.rb +4 -1
- data/lib/awsecrets/version.rb +1 -1
- 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: 8502b9ee75ac740ecdc77ba755789d48d53f85f4
|
4
|
+
data.tar.gz: b2c69e88b743afb44281aa3def9df1a134978ac8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d5247906f68137ec2c7b8c4b811416335632bda0067b94f602c2d95b8fe7780ddfd6107416564694ce6c4128a136b9e2b670fe9d4e62ce92a93927990dfc87b
|
7
|
+
data.tar.gz: f4f346b1381789ea59f283dafee43e7d37fed1a11e7adcef3cc1af14ecb4ef0480e10de569efe03a68a2f5f27e532a03f42261bf77ed93324fa4f2d6c6c90558
|
data/README.md
CHANGED
@@ -9,6 +9,7 @@ AWS credentials loader
|
|
9
9
|
3. YAML file (secrets.yml)
|
10
10
|
4. The AWS credentials file
|
11
11
|
5. The CLI configuration file
|
12
|
+
6. Instance profile credentials
|
12
13
|
|
13
14
|
(See http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html#config-settings-and-precedence)
|
14
15
|
|
@@ -103,6 +104,17 @@ And execute
|
|
103
104
|
$ ec2sample i-1aa1aaaa
|
104
105
|
```
|
105
106
|
|
107
|
+
### Disable load YAML(secrets.yml)
|
108
|
+
|
109
|
+
```ruby
|
110
|
+
Awsecrets.load(disable_load_secrets:true)
|
111
|
+
```
|
112
|
+
|
113
|
+
or
|
114
|
+
|
115
|
+
```ruby
|
116
|
+
Awsecrets.load(secrets_path:false)
|
117
|
+
```
|
106
118
|
|
107
119
|
## Contributing
|
108
120
|
|
data/lib/awsecrets.rb
CHANGED
@@ -6,10 +6,12 @@ require 'net/http'
|
|
6
6
|
require 'yaml'
|
7
7
|
|
8
8
|
module Awsecrets
|
9
|
-
def self.load(profile: nil, region: nil, secrets_path: nil)
|
9
|
+
def self.load(profile: nil, region: nil, secrets_path: nil, disable_load_secrets: false)
|
10
10
|
@profile = profile
|
11
11
|
@region = region
|
12
12
|
@secrets_path = secrets_path
|
13
|
+
@disable_load_secrets = disable_load_secrets
|
14
|
+
@disable_load_secrets = true if secrets_path == false
|
13
15
|
@credentials = @access_key_id = @secret_access_key = @session_token = @role_arn = @source_profile = nil
|
14
16
|
|
15
17
|
# 1. Command Line Options
|
@@ -58,6 +60,7 @@ module Awsecrets
|
|
58
60
|
end
|
59
61
|
|
60
62
|
def self.load_yaml
|
63
|
+
return if @disable_load_secrets
|
61
64
|
@secrets_path ||= 'secrets.yml'
|
62
65
|
creds = YAML.load_file(@secrets_path) if File.exist?(File.expand_path(@secrets_path))
|
63
66
|
@region ||= creds['region'] if creds && creds.include?('region')
|
data/lib/awsecrets/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: awsecrets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- k1LoW
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|