hiera-eyaml-age 0.2.1 → 0.2.2

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: 705b8add5ef02f0dded07812e427e71e66bb8d9fb232d5caa0a479408186f2b3
4
- data.tar.gz: dceba351e19d85bc85a716beb1a6cc765bdc343bc1ad33d6113a47d39537ae1c
3
+ metadata.gz: ac5587ac5f3381c45ce33c739810dde864afc461f0432345c623bc288d76341f
4
+ data.tar.gz: b7303a828c2ab455323f7727c1cbd21baee76be804ab3afaecc4cd3464623cc6
5
5
  SHA512:
6
- metadata.gz: eabe1f74179e9013b2d6f410a1e92d76a01990a23bd067a6c637e68394e65bda7061f5272c091a1581de741af2631e842877b80ee81f85540202cdb3b5074cc4
7
- data.tar.gz: 062a51fa6e8ab4212f6cf1134be570abaf8229d15c3e67c22a723516701afbf9cf910b657d47401f10d49df7838ff91b8cd91dcc3f5729f1273c1ed2aa5453eb
6
+ metadata.gz: e5c7b091d59aaa2bb591cdf0f628684b98cab0867fc168a6fe8933003bdab43f0728400879d8bfaf508f9791a22812e3dc47930a73c5822728c3ff799b5569b8
7
+ data.tar.gz: a402ebfbe69fb8e199bc91054ab9a619bd592b05cde1901d496a1201c20361d41c1c2b14789eaa4ebcc76e639c3bb223e15fa2498337bc5c82032513247d0c85
data/CHANGELOG.md CHANGED
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.2.2] - 2026-05-27
9
+
10
+ ### Fixed
11
+
12
+ - Fix option lookup: rename some option keys that still had `age_` prepended, to avoid double-prefixing by eyaml
13
+ - Override `option()` to correctly apply defined defaults when running on a Puppet server
14
+
8
15
  ## [0.2.1] - 2026-05-27
9
16
 
10
17
  ### Fixed
data/Makefile CHANGED
@@ -10,11 +10,8 @@ gem: hiera-eyaml-age-$(VERSION).gem
10
10
  deb: hiera-eyaml-age-$(VERSION).gem
11
11
  gem2deb --package hiera-eyaml-age hiera-eyaml-age-$(VERSION).gem
12
12
 
13
- targz:
14
- git archive --output hiera-eyaml-age_$(VERSION).tar.gz --prefix hiera-eyaml-age main
15
-
16
13
  .PHONY: packages
17
- packages: deb gem targz
14
+ packages: deb gem
18
15
 
19
16
  hiera-eyaml-age-$(VERSION).gem:
20
17
  gem build hiera-eyaml-age.gemspec
data/README.md CHANGED
@@ -75,11 +75,13 @@ hierarchy:
75
75
  - name: "Per-node data"
76
76
  lookup_key: eyaml_lookup_key
77
77
  options:
78
+ age_binary_path: /path/to/age
78
79
  age_identity_file: /opt/puppetlabs/server/data/puppetserver/.age/identity.txt
79
80
  path: "nodes/%{::trusted.certname}.yaml"
80
81
  - name: "Common data"
81
82
  lookup_key: eyaml_lookup_key
82
83
  options:
84
+ age_binary_path: /path/to/age
83
85
  age_identity_file: /opt/puppetlabs/server/data/puppetserver/.age/identity.txt
84
86
  path: "common.yaml"
85
87
  ```
@@ -3,7 +3,7 @@ class Hiera
3
3
  module Eyaml
4
4
  module Encryptors
5
5
  module AgeVersion
6
- VERSION = "0.2.1".freeze
6
+ VERSION = "0.2.2".freeze
7
7
  end
8
8
  end
9
9
  end
@@ -13,7 +13,7 @@ class Hiera
13
13
  self.tag = "AGE"
14
14
 
15
15
  self.options = {
16
- age_binary_path: {
16
+ binary_path: {
17
17
  desc: "Full path to the age executable (use an absolute path in production to avoid PATH-based substitution)",
18
18
  type: :string,
19
19
  default: "age"
@@ -40,6 +40,10 @@ class Hiera
40
40
  }
41
41
  }
42
42
 
43
+ def self.option(name)
44
+ super || (self.options[name] || {})[:default]
45
+ end
46
+
43
47
  def self.encrypt(plaintext)
44
48
  recipients = determine_recipients
45
49
  debug("Recipients are #{recipients}")
@@ -54,7 +58,7 @@ class Hiera
54
58
 
55
59
  stdout, stderr, status =
56
60
  Open3.capture3(
57
- option(:age_binary_path),
61
+ option(:binary_path),
58
62
  "--encrypt",
59
63
  *recipient_args,
60
64
  stdin_data: plaintext,
@@ -99,7 +103,7 @@ class Hiera
99
103
 
100
104
  stdout, stderr, status =
101
105
  Open3.capture3(
102
- option(:age_binary_path),
106
+ option(:binary_path),
103
107
  "--decrypt",
104
108
  "--identity",
105
109
  identity_arg,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hiera-eyaml-age
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - IAS Network