aboutsummaryrefslogtreecommitdiff
path: root/spec/unit
AgeCommit message (Collapse)Author
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-09-25(MODULES-7814) Ignore nil values when parsing commands. Fix for: Could not ↵Lavinia Foldenyi
evaluate: undefined method strip! for nil:NilClass
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-28pdk update using 1.6.0Josh Cooper
2018-06-27Use rspec let instead of instance variablesJosh Cooper
Also remove shebang line, as they are not executable via ruby.
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-27Update for pdk test unitJosh Cooper
Add tmpfile helper
2018-06-27Initial augeas import from puppet#2b83deb189Josh Cooper