In a custom type/provider I am writing it seems that the provider is not entirely idempotent.
The API always returns a boolean value as expected however the Puppet provider converts the boolean value provided to a symbol and presumably it is this that is causing the value to always be modified even if for example it is already the value specified in the resource.
Notice: Compiled catalog for iacon.cybertron.local in environment production in 0.06 seconds
FalseClass
{"name"=>"apitest", "has_wiki"=>:false}
Symbol
Notice: /Stage[main]/Main/Github_repo[apitest]/has_wiki: has_wiki changed 'false' to 'false'
Notice: Finished catalog run in 2.51 seconds
In the above I added some cheap and dirty debugging which shows;
FalseClass = This is the value returned by the GitHub API.
{"name"=>"apitest", "has_wiki"=>:false} - The values being sent in the body of the request to the GitHub API.
Symbol - As is probably clear this is the class of the 'has_wiki' value.
Any ideas how to correctly match up these values and not cause an unrequired update?