sekreto 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/README.md +1 -1
- data/lib/sekreto.rb +5 -3
- data/lib/sekreto/config.rb +2 -0
- data/lib/sekreto/railtie.rb +2 -0
- data/lib/sekreto/version.rb +3 -1
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 199b25018e618d6456796094228068d7abc6219379de34765fa8105f5abd5515
|
4
|
+
data.tar.gz: b8f6315eb3a75a3e16483c4928fd7a391f11cbe5a83dcd09d6f8424b8ccbb492
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f631e1fca03e9c0d45fc6918c70850a80044405983a8b3e093bd9b18fb0853f2fb012c934673ecfdc7eb8035f193d04cac4c5739d3d271a1f6452d8953be6321
|
7
|
+
data.tar.gz: 313ba5c91008dd128fe3a13b0d48bd272197b72909d6141a2a1ce2d0e3520083bd91efe7789fcf62b29bc7a0d53fcaccadf6f06374e23c62dec971ff6c6cc244
|
data/README.md
CHANGED
@@ -96,7 +96,7 @@ If you want to skip prefixes all together you can pas `false` to either
|
|
96
96
|
get value methods. **Not recommended**
|
97
97
|
|
98
98
|
```ruby
|
99
|
-
# Will query for "
|
99
|
+
# Will query for "MY-SECRET-CONFIG"
|
100
100
|
secret = Sekreto.get_json_value('MY-SECRET-CONFIG', false)
|
101
101
|
puts secret
|
102
102
|
# Output: { some: 'json', data: 'here' }
|
data/lib/sekreto.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'aws-sdk-secretsmanager'
|
2
4
|
require 'multi_json'
|
3
5
|
|
@@ -32,13 +34,13 @@ module Sekreto
|
|
32
34
|
# @param prefix [String] - An optional override of the prefix
|
33
35
|
# @return [String] - The value of the stored secret
|
34
36
|
def get_value(secret_id, prefix = nil)
|
35
|
-
|
37
|
+
raise 'Not allowed env' unless config.is_allowed_env.call
|
36
38
|
|
37
39
|
secrets_manager.get_secret_value(
|
38
40
|
secret_id: secret_name(secret_id, prefix)
|
39
41
|
).secret_string
|
40
|
-
rescue StandardError =>
|
41
|
-
logger.warn("[Sekreto] Failed to get value!\n#{
|
42
|
+
rescue StandardError => e
|
43
|
+
logger.warn("[Sekreto] Failed to get value for #{secret_name(secret_id, prefix)}!\n#{e}")
|
42
44
|
config.fallback_lookup.call(secret_id)
|
43
45
|
end
|
44
46
|
|
data/lib/sekreto/config.rb
CHANGED
data/lib/sekreto/railtie.rb
CHANGED
data/lib/sekreto/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sekreto
|
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
|
- Autolist Engineering
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-12-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-secretsmanager
|
@@ -42,16 +42,16 @@ dependencies:
|
|
42
42
|
name: autocop
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.2
|
47
|
+
version: 0.4.2
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.2
|
54
|
+
version: 0.4.2
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '13.0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '13.0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rspec
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,14 +128,14 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 0.
|
131
|
+
version: 0.17.0
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 0.
|
138
|
+
version: 0.17.0
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: stub_env
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|