Skip to content

Commit

Permalink
Workaround strings bug when generating function docs
Browse files Browse the repository at this point in the history
Added a newline between the require statement and start of documentation
to work around puppetlabs/puppet-strings#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

(cherry picked from commit dd4d8b8)
  • Loading branch information
joshcooper authored and github-actions[bot] committed Jul 26, 2024
1 parent 582d275 commit a5fd611
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/puppet/functions/hiera.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
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.
#
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/functions/yaml_data.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

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.
Expand Down

0 comments on commit a5fd611

Please sign in to comment.