Skip to content

Fix to_yaml options parameter #1231

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 13, 2022
Merged

Conversation

alexjfisher
Copy link
Collaborator

Use Ruby 2.5's transform_keys method to symbolize the keys in the
options parameter before passing to Ruby's to_yaml function.

Note, this requires Puppet 6 and above for the required Ruby version to
be available on both the agent (for puppet apply) and the server
(Puppetserver 6 ships with JRuby 9.2.x which is Ruby 2.5 compatible).

Also fixed up the docs of the to_json function for better consistency
between the two functions.

Use Ruby 2.5's `transform_keys` method to symbolize the keys in the
`options` parameter before passing to Ruby's `to_yaml` function.

Note, this requires Puppet 6 and above for the required Ruby version to
be available on both the agent (for `puppet apply`) _and_ the server
(Puppetserver 6 ships with JRuby 9.2.x which is Ruby 2.5 compatible).

Also fixed up the docs of the `to_json` function for better consistency
between the two functions.
@alexjfisher alexjfisher requested a review from a team as a code owner April 13, 2022 09:57
@CLAassistant
Copy link

CLAassistant commented Apr 13, 2022

CLA assistant check
All committers have signed the CLA.

@puppet-community-rangefinder
Copy link

to_json is a function

Breaking changes to this file MAY impact these 14 modules (near match):

to_yaml is a function

Breaking changes to this file MAY impact these 35 modules (near match):

This module is declared in 318 of 579 indexed public Puppetfiles.


These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.

Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants