yaml_recrypt 0.1.3 → 0.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: 01ac6e66f871130fed93617742163255154a08b1
4
- data.tar.gz: 6b943ea7b16dace9b4ac9ba27a6fd2607b31354e
3
+ metadata.gz: 38094fc05c4882b33ceca99f2b8c579cc295fda2
4
+ data.tar.gz: cf8a2c6f7d78bea1a3744d01680baea099181c13
5
5
  SHA512:
6
- metadata.gz: 4b7c0470abf504204f912fcdad39f4949950cbb4181349ddb0d37e125d713c35f514ff13f486e37b2c8c592107a8970fe21d7711f536d3405abbb0a39e7d6625
7
- data.tar.gz: b3d2f41027ec2fe1bd28b81dcbd48f4bd686bb8d76b2b884cdbe6e47f8fdb41008adb40af795194cace4fdda30c8f55c62d7f8c861486c01efbf235e25ec94aa
6
+ metadata.gz: ad778d97437779369a0667fc5af1fcb9bc4c4f9046b97d04da136449e7fd19156fada99e0ac6a7d02733ba2c71b1a31f5143a1c7029b80002ea90b26dbc2db68
7
+ data.tar.gz: 2b00d35beaf9c967adedc85b8f4c534f899ff3962f21f22ec207a0157acc26e2e098410cd58f591021e5176cc896827e57e7fc89cf2fdaf5d5ae35cfe25cbddf
@@ -51,8 +51,9 @@ module YamlRecrypt
51
51
  r, subtree = descend(gpg_home, eyaml_pub_key, v)
52
52
  value[i] = subtree
53
53
  replaced += r
54
- rescue GPGME::Error::NoData
55
- raise("Invalid GPG data detected in element #{i}")
54
+ rescue GPGME::Error::NoData => e
55
+ warn("Invalid GPG data detected in element #{i} or damaged cypher ")
56
+ raise e
56
57
  end
57
58
  i += 1
58
59
  }
@@ -63,7 +64,8 @@ module YamlRecrypt
63
64
  value[k] = subtree
64
65
  replaced += r
65
66
  rescue GPGME::Error::NoData
66
- raise("Invalid GPG data detected in key #{k}")
67
+ warn("Invalid GPG data detected in element #{k} or damaged cypher ")
68
+ raise e
67
69
  end
68
70
  }
69
71
  else
@@ -48,8 +48,11 @@ module YamlRecrypt
48
48
  txt.seek 0
49
49
  txt.read
50
50
  else
51
- warn("No usable keys found in #{gnupghome}. Check :gpg_gnupghome value in hiera.yaml is correct")
52
- raise ArgumentError, "No usable keys found in #{gnupghome}. Check :gpg_gnupghome value in hiera.yaml is correct"
51
+ raise "No usable keys found in #{gpg_home}. Things to check: permissions, "\
52
+ "correct paths, file integrity, trying to use an older gpg to read files "\
53
+ "from a newer one (export first). Some verions of gpg insist on having the "\
54
+ "--gpg-home directory as ~/.gnupg so please try moving your directory of gpg "\
55
+ "stuff to that location"
53
56
  end
54
57
  end
55
58
 
@@ -1,3 +1,3 @@
1
1
  module YamlRecrypt
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yaml_recrypt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geoff Williams