aboutsummaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2023-09-14(PA-5722) Add frozen string magic commentjbond
puppetlabs-augeas_core and puppet-augeasproviders_core both provide the augeas feature. However the both have slightly different files (this lacking the frozen strings magic comment. This causes puppet to perform a change on every puppet run. This PR updates the feature in this repo to add the magic comment so both files match. More then happy to explore alternate fixes
2021-09-30(MODULES-8183) Fix ToC truncation in REFERENCE.mdGabriel Nagy
Puppet Strings prefers a `@summary` tag with a max of 140 characters to fill in the Table of Contents summary. Without this, the description will appear truncated. Add `@summary` and `@example` tags to the type documentation.
2021-09-30(MODULES-11197) Rubocop fixesBobosila Victor
2021-09-30(MODULES-11197) Update puppetlabs-augeas_core to latest pdk templateBobosila Victor
Also updated `.sync` file to include the `auto_release.yml` workflow
2021-02-22(MODULES-10950) Infer application name from run modeGabriel Nagy
Fix a regression introduced by MODULES-7397[1] which incorrectly assumed that the application name can be queried through `Puppet::Application.name`, causing lenses that are pluginsynced not to be loaded. Since we only need to find out whether or not we're running as part of `puppet agent`, it should be enough to use `Puppet.run_mode.name`, which returns `:agent` in this case, and `:user` otherwise. [1] https://github.com/puppetlabs/puppetlabs-augeas_core/pull/27
2020-09-03(MODULES-7397) Load Augeas lenses from modulesLuchian Nemes
When creating the load path for Augeas, the module directories are now also searched for lenses and their folder path is added accordingly. This happens in every context except `agent` application. Through plugin syncing (and later cached lenses) it does not need these extra paths.
2018-10-01(MODULES-8014) relatively require helper codeMelissa Stone
Prior to this commit, when the augeas_core module was installed via `puppet module install`, the helper code loaded came from the vendored module rather than the installed module. Moving the `require` to `require_relative` fixes that.
2018-09-25(MODULES-7814) Ignore nil values when parsing commands. Fix for: Could not ↵Lavinia Foldenyi
evaluate: undefined method strip! for nil:NilClass
2018-09-18(maint) Consolidate translated stringsMelissa Stone
2018-07-16(maint) Move array parser logic into a util moduleJacob Helwig
2018-07-12(MODULE-7443) Safely deserialize stringified arrayJacob Helwig
This ports PUP-8974, and the related follow-up maintenance commits from the Puppet repo. The augeas provider used Kernel#eval to convert stringified arrays to Ruby arrays. For example, it extracted the array part of the "clause" below: onlyif => 'values HostKey == ["/etc/ssh/ssh_host_rsa_key"]' and called Kernel#eval with '["/etc/ssh/ssh_host_rsa_key"]'. Using eval is bad because it executes arbitrary code. This commit changes the provider to convert the comma delimited string to a Ruby array. This mostly maintains the functionality of the original Kernel#eval (minus running arbitrary code) except for no longer handling the \M-x, \M-\C-x, \M-\cx, \c\M-x, \c?, and \C-? escape sequences in double-quoted strings, and \u{nnnn ...} is more lenient about whitespace.
2018-06-28Don't eval stringsJosh Cooper
Previously we were using eval to convert stringified arrays from the manifest into a ruby array. Use JSON instead, and ensure values are double quoted as required by JSON.
2018-06-28Use loop with breakJosh Cooper
See https://github.com/rubocop-hq/ruby-style-guide/commit/df933c0f9b3a805c00e5ef81889992b1aec787a7
2018-06-27Use guard clause and avoid assignment in conditionalJosh Cooper
2018-06-27Automatic update of rubocop violationsJosh Cooper
Add exclusions for: Layout/IndentHeredoc, Metrics/BlockNesting: Metrics/LineLength: Style/AccessorMethodName: Style/DoubleNegation: Style/MultipleComparison: Style/NumericPredicate: Style/PredicateName: Style/SignalException: Style/VariableName: SignalException is disabled because Puppet::Type#fail overrides Kernel#fail, and we really do want fail and not raise.
2018-06-27Initial augeas import from puppet#2b83deb189Josh Cooper