rlex/puppet-dnsmasq — pull request #30 by decibelhertz (2014-12-22 16:56:39+00:00)
Title: Clean up params logic. Add rspec tests.

A fairly substantial PR, but I hope it helps.

MacPorts is explicitly required for Darwin, so I added some logic in params to do this, rather than count on the (optional) ::provider Facter fact. Further, users should generally be able to override anything in params, so I set init to inherit that class. I also made use of some path paramters in several resources in order to not depend on variables from another class in all the defined types.

All this necessitated a change in what to include for all the defined types. Since the init class now controls everything, all defined types should include that, not params. To convince myself all was working, I paid the pain of writing a bunch of rspec tests for this module to confirm. While looking at this, there was some unneeded items in the templates that I cleaned out.

To test all that rspec, I had to hack on Gemfile, Rakefile and spec/spec_helper.rb. Not sure if whatever was being done will stay working; I'm happy to adjust that (or other items) upon request.