puppetlabs/Razor — pull request #444 by cr3 (2013-04-01 14:18:01+00:00)
Title: (#443) Added inverse.to_s in TagRule.add_tag_matcher

This change modifies the TagRule.add_tag_matcher method to call to_s
on the inverse tag_matcher option instead of the compare option. The
reason is that inverse might be a boolean or a string whereas compare
should always be a string. The original code was the other way around,
suggesting this problem might simply be an oversight.

The reason this change is necessary is that the inverse tag_matcher option
might be a boolean. When this is the case, the TagRule.add_tag_matcher
will not add the tag_matcher and simply return false. This was rather
obscur to troubleshoot so his change also added some warning when the
tag_matcher options have unexpected values.

This pull request fixes issue #443.