hiera-eyaml-cli 0.2 → 0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 991556c46821c35532265701859a6edfb8362e298c93a28c035fb2b4b2e1baf8
4
- data.tar.gz: dac9fa2afbce6fdcb2cf21a0e31cda4364ee9994e8d29bb307ce2f1ac9f16aa9
3
+ metadata.gz: b07a03e1ba41497fdf653da45d13251baa0db9d237ca941dbda33214bf22b316
4
+ data.tar.gz: fa8650737d84f4d1afea45030ca205097d0bf903a474a9773fc5246c4584abbb
5
5
  SHA512:
6
- metadata.gz: d45fd488d535621545ee1c1f295d6c740b35d8ddc7ead123417f071d469b428dc0b97c0abd46a514acec9f28c26f98801dbba66b03b9c35846cacd29be76c3ba
7
- data.tar.gz: 7459500daad9cc90063712c2652929328946efaa857a7a907aea1021f58e237ebef9fbe0f66447c7bad2e24b3444c97f1d14ee6e833c072adad649cb24d634b1
6
+ metadata.gz: 797d735dcd60950fa30c9105473fa71e294f6611876fbc3249a5390210098c93e2e54cfc88dc0c25a2640b3852561f3a163e6c50cd36ce80ab752b345f10839f
7
+ data.tar.gz: 72ad06fcf93e38c3d5ffdc193b5396ceba72de7985050189d09693f61efcd24dc824cdcc59a5eb8ff2243c5c48bb578aa0238ac4d3ae49d25c5c3e75a1a4a191
@@ -1,4 +1,4 @@
1
- require 'Open3'
1
+ require 'open3'
2
2
 
3
3
  class Hiera
4
4
  module Backend
@@ -50,11 +50,12 @@ class Hiera
50
50
  def self.encrypt(plaintext)
51
51
  if self.stderr
52
52
  out, status = Open3.capture2(self.encrypt_command, :stdin_data=>plaintext)
53
+ err = ''
53
54
  else
54
55
  out, err, status = Open3.capture3(self.encrypt_command, :stdin_data=>plaintext)
55
56
  end
56
57
  if status != 0
57
- raise 'Call to encrypt subcommand failed'
58
+ raise 'Call to encrypt subcommand failed:\n%s\n%s' % [out, err]
58
59
  end
59
60
  out
60
61
  end
@@ -62,11 +63,12 @@ class Hiera
62
63
  def self.decrypt(ciphertext)
63
64
  if self.stderr
64
65
  out, status = Open3.capture2(self.decrypt_command, :stdin_data=>ciphertext)
66
+ err = ''
65
67
  else
66
68
  out, err, status = Open3.capture3(self.decrypt_command, :stdin_data=>ciphertext)
67
69
  end
68
70
  if status != 0
69
- raise 'Call to decrypt subcommand failed'
71
+ raise 'Call to decrypt subcommand failed:\n%s\n%s' % [out, err]
70
72
  end
71
73
  out
72
74
  end
@@ -3,7 +3,7 @@ class Hiera
3
3
  module Eyaml
4
4
  module Encryptors
5
5
  module Cli
6
- VERSION = '0.2'.freeze
6
+ VERSION = '0.3'.freeze
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hiera-eyaml-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: '0.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ethan Smith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-01 00:00:00.000000000 Z
11
+ date: 2020-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hiera-eyaml