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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ea3cd7ba405a9a440dc66ddf26379e904c484e94
4
- data.tar.gz: 23fb203668882a96ea148386e6a5ea35e6652a52
3
+ metadata.gz: 0c503a48bd56dbfee13222514549626a636005dd
4
+ data.tar.gz: f664fc01a74b9ae7e9914338dc590377d47746d4
5
5
  SHA512:
6
- metadata.gz: b61ee691050374e84cb9ad0daa23f2d048c277ffc71ab6c866e4d8edbcabe9a44d079dfeaa6df3f243d79c5166b3a4fa6553ddbfd9ae9fd25d74035313b01b57
7
- data.tar.gz: cc7ba804a45cce07e2067909195c03a427ae90c9eec031f115cf55ef1f3fcf034a23d35430356a5d5ed74dbcade98d2f4e5733b0c7651b191b6918e8b6544777
6
+ metadata.gz: 1f387818f34421f318e478f98908467723e43c817e50fb47dcdc375de21166864b587f4676e0eef904bc80aa6bac5211436eaabfe4b79e228b91939a4c7c8cd4
7
+ data.tar.gz: 30df72810770015138b66e23c0fada77aa1a9b247ac913f9337ce83d8f95ade4e75aa87459e1d0bcf53568f1a5eeacf12bde50d97670c599041866ec7ad3ac3c
@@ -1,3 +1,3 @@
1
1
  module CredStash
2
- VERSION = "0.7.0"
2
+ VERSION = "0.8.0"
3
3
  end
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.7.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-13 00:00:00.000000000 Z
11
+ date: 2017-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk