rcredstash 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cred_stash/version.rb +1 -1
- data/lib/cred_stash.rb +3 -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: 0c503a48bd56dbfee13222514549626a636005dd
|
4
|
+
data.tar.gz: f664fc01a74b9ae7e9914338dc590377d47746d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f387818f34421f318e478f98908467723e43c817e50fb47dcdc375de21166864b587f4676e0eef904bc80aa6bac5211436eaabfe4b79e228b91939a4c7c8cd4
|
7
|
+
data.tar.gz: 30df72810770015138b66e23c0fada77aa1a9b247ac913f9337ce83d8f95ade4e75aa87459e1d0bcf53568f1a5eeacf12bde50d97670c599041866ec7ad3ac3c
|
data/lib/cred_stash/version.rb
CHANGED
data/lib/cred_stash.rb
CHANGED
@@ -2,7 +2,7 @@ require 'aws-sdk'
|
|
2
2
|
|
3
3
|
module CredStash
|
4
4
|
class << self
|
5
|
-
def get(name, context: {})
|
5
|
+
def get(name, context: {}, raise_if_missing: false)
|
6
6
|
secret = Secret.find(name, context: context)
|
7
7
|
|
8
8
|
if secret.falsified?
|
@@ -11,7 +11,8 @@ module CredStash
|
|
11
11
|
|
12
12
|
secret.decrypted_value
|
13
13
|
|
14
|
-
rescue CredStash::ItemNotFound
|
14
|
+
rescue CredStash::ItemNotFound => e
|
15
|
+
raise e if raise_if_missing
|
15
16
|
nil
|
16
17
|
end
|
17
18
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rcredstash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- adorechic
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|