{"push_id":636598779,"size":1,"distinct_size":1,"ref":"refs/heads/boolean_string_handling","head":"9fb20216df819fca2060a8e27bc59a444638c602","before":"7700f6d8791fb361d949a6ebfe792c459c95719d","commits":[{"sha":"9fb20216df819fca2060a8e27bc59a444638c602","author":{"email":"54669547a225ff20cba8b75a4adca540eef25858@mbs3.org","name":"Martin Smith"},"message":"Adjust boolean/string logic\n\n- It's much better to use 'true' and 'false' over true and false, as there's no guarantee that `true.to_s == 'true'`. I changed around the resources to accept TrueClass, FalseClass, or a String, but they will always convert whichever they get to Strings. Then you aren't relying on ruby to coerce booleans into strings and hope you get \"true\" and \"false\" (maybe one day you will get \"True\").\n\n- Many `if something.nil?` checks were replaced with `unless something && !something.empty?`. This prevents false and the empty string from being handed to various templates and logic, since the empty string is not nill.\n\n- NewRelic.to_boolean was called in a few places, but it wasn't in the NewRelic module, it was in the helpers module (so it failed to compile). I've moved it into the NewRelic module.\n\n- Removed `param value if value` from resource invocations. The providers all know how to handle nil and false, so there's no need to repeat the conditional so much.\n\n- One boolean value was still being passed a String in a recipe. Fixes https://github.com/escapestudios-cookbooks/newrelic/issues/179.","distinct":true,"url":"https://api.github.com/repos/martinb3/newrelic/commits/9fb20216df819fca2060a8e27bc59a444638c602"}]}