secure_data_bag 1.1.3 → 1.1.4

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: 00dd6f53ed498ae42f0d7d0eed25523add5c24d8
4
- data.tar.gz: 36c3fcb28c5d55245e2c7bbc41d8e473016d4caf
3
+ metadata.gz: 7b6fcbd13a41e6f976656fdbe7bb6e43f02031ae
4
+ data.tar.gz: a433da64df0447378ea05e5cecda6aa8b24cf1d9
5
5
  SHA512:
6
- metadata.gz: 65c0efb5dae67a1dbe192e1794052bc0e2143ec275910791ea43b6445694b77282854f2f474b454b8071f54d6f403301741c45751a20b3e0e19320f1e67367c3
7
- data.tar.gz: e46b32b2a0b08df9aa77bf8dda567c77c3aa17c10a2e39866b92a4597c66196e23f3b6ce402e68ae50fc3a3977017f2a7362270e901a2ce1f580a53e0e0f7de7
6
+ metadata.gz: 6203e56251f529905b373645c7af57f1fe4834a0ff4bf8cb8836613783995224e64a1f259bdbbce2e51e17c06112677800e831cf0d121acb04ffa3343e96c771
7
+ data.tar.gz: 15134db5f30add0a8bdd30bef9e63ff8b343dec7b60f1a9eb85e45507c23a8b4d202e0ff81aa851629aaf75849cd5ebcee5ba55537d27b875583c64381cc8467
@@ -24,7 +24,7 @@ class Chef
24
24
  option :encode_fields,
25
25
  long: "--encode-fields FIELD1,FIELD2,FIELD3",
26
26
  description: "List of attribute keys for which to encode values",
27
- default: Array.new
27
+ default: ""
28
28
  end
29
29
  end
30
30
 
@@ -51,7 +51,7 @@ class Chef
51
51
  end
52
52
 
53
53
  def encoded_fields_for(item)
54
- [].concat(config[:encode_fields]).
54
+ [].concat(config[:encode_fields].split(",")).
55
55
  concat(item.encode_fields).
56
56
  uniq
57
57
  end
@@ -18,8 +18,10 @@ class Chef
18
18
  item = Chef::EncryptedDataBagItem.new(@raw_data, read_secret)
19
19
  end
20
20
 
21
- #item = SecureDataBag::Item.from_item(item, read_secret)
22
- item.to_hash
21
+ item = SecureDataBag::Item.from_item(item, read_secret)
22
+ data = item.to_hash(false)
23
+ data[:encryption][:encoded_fields] = item.encode_fields
24
+ data
23
25
  end
24
26
 
25
27
  def run
@@ -119,6 +119,10 @@ module SecureDataBag
119
119
  set_or_return(:encode_fields, arg, kind_of: Array).uniq
120
120
  end
121
121
 
122
+ def encoded_fields
123
+ encryption[:encoded_fields]
124
+ end
125
+
122
126
  #
123
127
  # Encoder / Decoder
124
128
  #
@@ -1,5 +1,5 @@
1
1
 
2
2
  module SecureDataBag
3
- VERSION = "1.1.3"
3
+ VERSION = "1.1.4"
4
4
  end
5
5
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: secure_data_bag
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Serafini
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-17 00:00:00.000000000 Z
11
+ date: 2014-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef