secure_data_bag 2.0.0 → 2.0.1

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: fe94b528cef47838c539b57ce62634072750b5af
4
- data.tar.gz: d6c2ca03370f5c26c6888ac411741972b0e631a7
3
+ metadata.gz: 662183dad03789d520b8e0b694cc36df234c6e9f
4
+ data.tar.gz: 92b8ffd636742f51d46450b36bb262f44b91b4e2
5
5
  SHA512:
6
- metadata.gz: 41ea852190213e90f432c4ade570d6b8280dc1778c2d16ec29316032b81cb47bd78c64ed9679f488ab0e292d28090bfed1c2f00b025f8a14ac725365521c7c9f
7
- data.tar.gz: 026d10232c68d57bf8af33a9f6f75af0fda05576c3d28cb7ed6bde634ef751064d7ba674ecc9941044ff83e6673b566eefff8cc354828102104bb19c942c914d
6
+ metadata.gz: b5ffdd081a8ec0eb877bcbcc691607c609bfb16ea54f04cab792d0ee146280d1270d9055906daa8852ccf0e57913f4680ddf6d17d9a118cadc12b58ab58109bf
7
+ data.tar.gz: 141c7f48b0386383caf29fff2cc04c599d5dfc1132b8c0b245f53df023416423bc82e0f1a270a32902d475e818d3c18b0dbedcbe87fee8e4e2dd528b5554c0ae
@@ -14,18 +14,18 @@ module SecureDataBag
14
14
  #
15
15
 
16
16
  class Item < Chef::DataBagItem
17
- def initialize(key:nil, fields:nil, secret:nil, data:nil)
17
+ def initialize(opts={})
18
18
  super()
19
19
 
20
20
  @secret = Chef::Config[:encrypted_data_bag_secret]
21
- @key = key
21
+ @key = opts[:key]
22
22
 
23
- unless data.nil?
24
- self.raw_data = data
23
+ unless opts[:data].nil?
24
+ self.raw_data = opts[:data]
25
25
  end
26
26
 
27
27
  encoded_fields(
28
- fields ||
28
+ opts[:fields] ||
29
29
  Chef::Config[:knife][:secure_data_bag][:fields] ||
30
30
  ["password"]
31
31
  )
@@ -185,10 +185,10 @@ module SecureDataBag
185
185
  item
186
186
  end
187
187
 
188
- def to_hash(encoded: true)
189
- result = encoded ? encoded_data : @raw_data
188
+ def to_hash(opts={})
189
+ result = opts[:encoded] ? encoded_data : @raw_data
190
190
  result["chef_type"] = "data_bag_item"
191
- result["data_bag"] = self.data_bag
191
+ result["data_bag"] = data_bag
192
192
  result
193
193
  end
194
194
 
@@ -1,5 +1,5 @@
1
1
 
2
2
  module SecureDataBag
3
- VERSION = "2.0.0"
3
+ VERSION = "2.0.1"
4
4
  end
5
5
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: secure_data_bag
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Serafini