summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* eql -> eq in the specsTim Smith2020-07-211-17/+17
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Update spec/unit/resource/macos_user_defaults_spec.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-212-1/+7
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Avoid spelling warningTim Smith2020-07-211-1/+1
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Add testing of :delete action and fix failuresTim Smith2020-07-213-60/+21
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Add additional Test Kitchen testsTim Smith2020-07-212-1/+84
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Add spec for dict valuesTim Smith2020-07-201-0/+5
| | | | 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-202-11/+68
| | | | | | | | - 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-202-7/+40
| | | | 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 case in test resourceTim Smith2020-07-201-1/+1
| | | | 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>
* Add specs for defaults_export_cmdTim Smith2020-07-201-0/+22
| | | | 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>
* Test the default property valuesTim Smith2020-07-201-0/+12
| | | | 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-202-44/+81
| | | | | | 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>
* Merge pull request #10178 from chef/bump_depsTim Smith2020-07-202-14/+18
|\ | | | | Update InSpec to 4.22 and mixlib-shellout to 3.1.1
| * Update InSpec to 4.22 and mixlib-shellout to 3.1.1Tim Smith2020-07-202-14/+18
|/ | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Bump version to 16.3.17 by Chef Expeditorv16.3.17Chef Expeditor2020-07-207-19/+20
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Merge pull request #10177 from chef/lcg/fix-windows-package2Tim Smith2020-07-201-4/+9
|\ | | | | fix windows package for Chef-16 regression