From dd4d8b811ad3aa4d963f1b3d4529c13df9034542 Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Mon, 22 Jul 2024 15:37:55 -0700 Subject: [PATCH] Workaround strings bug when generating function docs Added a newline between the require statement and start of documentation to work around https://github.com/puppetlabs/puppet-strings/issues/296 To verify, run: echo 'gem "puppet-strings"' >> Gemfile.local bundle update bundle exec puppet strings generate --format json --out /tmp/strings.json jq -r '.puppet_functions[] | select(.name == "yaml_data").docstring.text ' /tmp/strings.json | head --- lib/puppet/functions/hiera.rb | 1 + lib/puppet/functions/yaml_data.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/puppet/functions/hiera.rb b/lib/puppet/functions/hiera.rb index ed18c6009ad..10228b25700 100644 --- a/lib/puppet/functions/hiera.rb +++ b/lib/puppet/functions/hiera.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true require 'hiera/puppet_function' + # Performs a standard priority lookup of the hierarchy and returns the most specific value # for a given key. The returned value can be any type of data. # diff --git a/lib/puppet/functions/yaml_data.rb b/lib/puppet/functions/yaml_data.rb index f122e734826..7a3ab40994d 100644 --- a/lib/puppet/functions/yaml_data.rb +++ b/lib/puppet/functions/yaml_data.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true require 'yaml' + # The `yaml_data` is a hiera 5 `data_hash` data provider function. # See [the configuration guide documentation](https://puppet.com/docs/puppet/latest/hiera_config_yaml_5.html#configuring-a-hierarchy-level-built-in-backends) for # how to use this function.