summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix chef-resource-inspector to handle classes in equal_toTim Smith2020-07-231-1/+7
| | | | | | | | | Rescue argumenterrors and just return the array unsorted. I'd flip the inspect and sort, but that would result in incorrectly sorted data. Signed-off-by: Tim Smith <tsmith@chef.io>
* Bump version to 16.3.28 by Chef Expeditorv16.3.28Chef Expeditor2020-07-231-1/+1
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Bump version to 16.3.27 by Chef Expeditorv16.3.27Chef Expeditor2020-07-231-1/+1
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Bump version to 16.3.26 by Chef Expeditorv16.3.26Chef Expeditor2020-07-231-1/+1
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Bump version to 16.3.25 by Chef Expeditorv16.3.25Chef Expeditor2020-07-221-1/+1
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Bump version to 16.3.24 by Chef Expeditorv16.3.24Chef Expeditor2020-07-221-1/+1
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Bump version to 16.3.23 by Chef Expeditorv16.3.23Chef Expeditor2020-07-221-1/+1
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Merge pull request #10118 from chef/macos_userdefaultsTim Smith2020-07-221-61/+176
|\ | | | | Rework macos_userdefaults resource
| * Update lib/chef/resource/macos_userdefaults.rb macos_userdefaultsTim Smith2020-07-211-1/+1
| | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io> Co-authored-by: pete higgins <pete@peterhiggins.org>
| * Update lib/chef/resource/macos_userdefaults.rb Tim Smith2020-07-211-1/+1
| | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io> Co-authored-by: pete higgins <pete@peterhiggins.org>
| * Simplify the shell_out usageTim Smith2020-07-211-15/+3
| | | | | | | | | | | | Lamont was right. If you pass a nil user it just skips it. Signed-off-by: Tim Smith <tsmith@chef.io>
| * Make sure we can compare keys in dictsTim Smith2020-07-211-1/+2
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Add testing of :delete action and fix failuresTim Smith2020-07-211-2/+3
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Clarify our magic. There's less than beforeTim Smith2020-07-201-1/+1
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Make key part of the desired state so we can handle new keysTim Smith2020-07-201-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This improved log output and prevents failures when no key has been set: ``` ❰tsmith❙~/dev/work/chef(git✱≠macos_userdefaults)❱✔≻ bundle exec chef-apply test.rb Recipe: (chef-apply cookbook)::(chef-apply recipe) * macos_userdefaults[Add String key] action write - create Add String key - set key to "StringKey2" - set value to "/usr/local/tim" * macos_userdefaults[Add boolean key] action write (up to date) * macos_userdefaults[Add array key] action write (up to date) ❰tsmith❙~/dev/work/chef(git✱≠macos_userdefaults)❱✔≻ bundle exec chef-apply test.rb Recipe: (chef-apply cookbook)::(chef-apply recipe) * macos_userdefaults[Add String key] action write - update Add String key - set value to "/usr/local/tim2" (was "/usr/local/tim") * macos_userdefaults[Add boolean key] action write (up to date) * macos_userdefaults[Add array key] action write (up to date) ``` Signed-off-by: Tim Smith <tsmith@chef.io>
| * Prevent failures when the key doesn't existTim Smith2020-07-201-1/+5
| | | | | | | | | | | | | | Setting it to nil was throwing a required value error from the property validation Signed-off-by: Tim Smith <tsmith@chef.io>
| * Add specs and squash bugs that showed upTim Smith2020-07-201-4/+36
| | | | | | | | | | | | | | | | - Add back method to convert boolean-ish values to TRUE/FALSE - Be explicit about string values as well as all the other types so we always pass a type - Fix the type flag in the write command Signed-off-by: Tim Smith <tsmith@chef.io>
| * Enforce inputs to the type propertyTim Smith2020-07-201-0/+1
| | | | | | | | | | | | This also automatically generates the docs for allowed values Signed-off-by: Tim Smith <tsmith@chef.io>
| * Avoid failures if the host was named "current" and add some more testsTim Smith2020-07-201-6/+7
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Improve examples a bitTim Smith2020-07-201-5/+4
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Avoid spellcheck complaintTim Smith2020-07-201-3/+3
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Avoid passing around the action we're inTim Smith2020-07-201-8/+8
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Fix a few failuresTim Smith2020-07-201-2/+3
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Use concat in another placeTim Smith2020-07-201-5/+17
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Concat to avoid a flattenTim Smith2020-07-201-4/+4
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Remove the now unused coerce methodTim Smith2020-07-201-10/+0
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Make sure to require plist since we use it hereTim Smith2020-07-201-0/+1
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Trade a bit of memory for slightly slower debug runsTim Smith2020-07-201-6/+4
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * WIP: Delete actionTim Smith2020-07-201-28/+39
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * use default export to load current valueTim Smith2020-07-201-33/+24
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Avoid one failure condition with booleansTim Smith2020-07-201-1/+2
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Add new current_host_level propertyTim Smith2020-07-201-3/+12
| | | | | | | | | | | | Allow setting at the currenthost level. Signed-off-by: Tim Smith <tsmith@chef.io>
| * Update comment to reflect actual formatTim Smith2020-07-201-1/+1
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Parse out the data structure to build current_resourceTim Smith2020-07-201-4/+31
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Work entirely in arrays and make sure we single quote all valuesTim Smith2020-07-201-11/+10
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Fail if we can't set the defaultsTim Smith2020-07-201-2/+2
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Quote non dict/array values to support spacesTim Smith2020-07-201-6/+11
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Switch to shellout instead of using executeTim Smith2020-07-201-3/+8
| | | | | | | | | | | | This improves the log output Signed-off-by: Tim Smith <tsmith@chef.io>
| * Update description of what you need to use the sudo propertyTim Smith2020-07-201-1/+1
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Simplify logic and fix a few failuresTim Smith2020-07-201-2/+2
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Add logging and fix shellout with user propertyTim Smith2020-07-201-4/+7
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * If it's an array work it like an arrayTim Smith2020-07-201-2/+2
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Don't default type to an empty stringTim Smith2020-07-201-2/+1
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * updatesTim Smith2020-07-201-4/+5
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Update lib/chef/resource/macos_userdefaults.rb Tim Smith2020-07-201-1/+1
| | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io> Co-authored-by: pete higgins <pete@peterhiggins.org>
| * Rework macos_userdefaults resourceTim Smith2020-07-201-42/+73
| | | | | | | | | | | | This is a reboot of sorts on the macos_userdefaults resource to fix some fundamental flaws in the UX of the resource and how it gets state / sets the values. Signed-off-by: Tim Smith <tsmith@chef.io>
* | Bump version to 16.3.22 by Chef Expeditorv16.3.22Chef Expeditor2020-07-221-1/+1
| | | | | | | | Obvious fix; these changes are the result of automation not creative thinking.
* | Merge pull request #10137 from chef/lcg/extract-mixlib-shelloutLamont Granquist2020-07-227-221/+85
|\ \
| * | clean up the chefutils wiring with a common helper classlcg/extract-mixlib-shelloutLamont Granquist2020-07-215-41/+48
| | | | | | | | | | | | | | | | | | also fixes a FIXME in the YARD Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
| * | just code changes, no spec modificationsLamont Granquist2020-07-216-215/+72
| | | | | | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>