jfryman/puppet-nginx — pull request #199 by grooverdan (2013-12-18 06:49:23+00:00)
Title: Use vhost_location_directory if its parameters are defined

Since root can be defined at vhost level there isn't a need to define (www_)root in every location.

Here I've added every parameter that has a default of undef and is used by vhost_location_directory.erb to the condition that uses the vhost_location_directory.erb file.

As location_custom_cfg and location are only parameters used by the vhost_location_empty it makes sense to use vhost_location_directory.erb whenever possible.

No compatibility issues are raised as all of the tested vhost_location_directory variables aren't used in the vhost_location_empty.erb template.