Update to load_current_resource replacing 'truthy' with 'truefalse'.
Update to load_current_resource replacing 'truthy' with 'truefalse'.

    defaults --help
    <value> is one of:
      -bool[ean] (true | false | yes | no)

Right now we only convert 'TRUE' or 'true' which leads to a situation whereby chef-client reapplies settings (defaults write <DOMAIN> <KEY> -bool 'false') upon each run because the recipe value may validly be 'false'.

Example recipe snippet which triggers this situation -

  mac_os_x_userdefaults "dont show quarantine warnings on downloaded files" do
    domain "com.apple.LaunchServices"
    key "LSQuarantine"
    value "false"
    type "bool"
    notifies :run, 'execute[killall Finder]'
    only_if { node[:platform_version].to_f >= 10.5 }
  end

I've also taken the opportunity to extend things so that "YES" and "yes" are considered to be true values, because they would be accepted on the command-line by /usr/bin/defaults as valid input.
aeode-cookbooks/osx,chef-osx/mac_os_x,keen99/mac_os_x,unixboy/mac_os_x,serfdom/mac_os_x,clakeb/mac_os_x-cookbook,tya/osx