Age | Commit message (Collapse) | Author | |
---|---|---|---|
2023-11-22 | Convert ProcessOutput to String explicitly | Josh Cooper | |
The `filetype` provider executes `crontab` using Puppet's execution API, which returns ProcessOutput objects that inherit from String. See puppetlabs/puppet@732d450 The provider later uses String#gsub to strip off the HEADER. In Ruby 2.7, the gsub method returns a new instance of ProcessOutput: irb(main):002:0> Puppet::Util::Execution::ProcessOutput.new("# HEADER\n0 4 * * * /etc/init.d/script.sh\n", 0).gsub(/# HEADER/, '').class => Puppet::Util::Execution::ProcessOutput If you later serialize the crontab entries to YAML using `puppet resource`, then puppet warns about serializing unknown data types: # puppet resource cron --to_yaml Warning: Cron[unmanaged:/etc/init.d/script.sh-1]['command'] contains a Puppet::Util::Execution::ProcessOutput value. It will be converted to the String '/etc/init.d/script.sh' This wasn't an issue with Ruby 3.2, because String#gsub always returns a String: irb(main):002:0> Puppet::Util::Execution::ProcessOutput.new("# HEADER\n0 4 * * * /etc/init.d/script.sh\n", 0).gsub(/# HEADER/, '').class => String This commit explicitly converts the ProcessOutput to a String so the provider behaves consistently on all Ruby versions. Fixes #61 | |||
2021-10-01 | (MODULES-11197) Update to pdk-templates 2.2.0 | Gabriel Nagy | |
Includes REFERENCE.md ToC fixes for MODULES-8183. | |||
2021-03-11 | (maint) Switch to rspec-mocks | Gabriel Nagy | |
2020-05-06 | (MODULES-8603) Ignore .keep_* files | Ewoud Kohl van Wijngaarden | |
On Gentoo there's always a .keep_<package>-<slot> (e.g., .keep_cronbase-0) file inside the cron directory to ensure it's not removed with rmdir. Since usernames are very unlikely to start with .keep_, we can safely filter out these hidden files. | |||
2018-12-07 | (MODULES-8306) Port over the crontab filetypes from Puppet | Enis Inan | |
2018-11-28 | Update tests to pass on puppet 4 | Josh Cooper | |
2018-11-27 | (MODULES-8301) Update the unit tests with the crontab filetype fix | Enis Inan | |
Commit 420049f2 in Puppet fixed the crontab filetype's #read method to use Puppet::Util::Execution.execute instead of %x. This commit updates the unit tests to account for this change. | |||
2018-08-08 | Fix Layout/CommentIndentation violation | Jorie Tappa | |
2018-08-01 | Fix RSpec/RepeatedExample violations | Jorie Tappa | |
2018-08-01 | Disable Security/YAMLLoad | Jorie Tappa | |
2018-08-01 | Fix Lint/AmbiguousBlockAssociation violation | Jorie Tappa | |
2018-08-01 | Fix Lint/ScriptPermission violations | Jorie Tappa | |
2018-08-01 | Apply automatic pdk validate fixes | Jorie Tappa | |
2018-07-31 | Initial cron import from puppet 7a4c5f07bdf61a7bc7aa32a50e99489a604eac52 | Jorie Tappa | |