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
  • Loading branch information
joshcooper committed Jul 22, 2024
1 parent 82ad86e commit dd4d8b8
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,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.
#
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,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.
Expand Down

0 comments on commit dd4d8b8

Please sign in to comment.