jfryman/puppet-nginx — pull request #423 by jfryman (2014-08-25 00:07:44+00:00)
Title: The Road to 1.0: Cleanup part 1

I have been thinking for some time it's long overdue to clean up this module. Chief complaints include:

* Whoa, what's happening in these specs?
* Specs do not cover XXX
* My package and how it gets installed is super different than XXX
* What is even happening in `params.pp`
* Why are all of the defined types in `nginx::resources` namespace?

Furthermore, there are a ton of bad things that have made it into the module that really shouldn't be there and may be causing unknown consequences:

* Resource defaults in defined types,
* WAY too many attributes currently able to be placed on the `vhost` and `location` resources.

So, I began the great slog to start working on this stuff. The journey of 1000 miles begins with the first step, right?

This PR covers a few starting items:
* Clean up `params.pp`. Introduces `puppet_module_data`, and obliterates `params.pp` completely. A good writeup of this can be found at http://www.devco.net/archives/2013/12/08/better-puppet-modules-using-hiera-data.php
* Deprecate the `resources` namespace. We will not get rid of these just yet, but once this lands, no new features will be added to the old resources.
* Factory pattern for class/service management. I will be writing a blog post soon to explain this pattern.

This PR does not pass tests yet, but it is far enough along where I can publish it for comments and help getting things cleaned up. Once this is merged, I will start looking for places where we can break out `vhost` and `location` into more manageable chunks. Bonus points for anyone who helps clean this up. :heart:

For any change on the way to v1.0, we will keep old interfaces intact for now. However, once we hit v1.0, you can and should expect things to change. I will do my best to keep it measured and make sure deprecation warnings are in place so you know what will be coming.

/cc @3flex