-
-
Notifications
You must be signed in to change notification settings - Fork 881
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add include files to locations #390
Conversation
It would be nice if this was pulled. |
Two things before we can merge:
|
@3flex if you could point me in the right direction I'd be happy to help but I've never written a test and don't even know where to start. |
@cdenneen take a look at the spec/defines/resource_location_spec.rb file. You would add the new tests around https://github.com/jfryman/puppet-nginx/blob/master/spec/defines/resource_location_spec.rb#L167, and can base them on https://github.com/jfryman/puppet-nginx/blob/master/spec/defines/resource_location_spec.rb#L90-L98 (another parameter that accepts arrays). Essentially you're adding a test that says when "include_files" is set to a given array, you expect certain output (though please rename parameter to "include" as I mentioned above). When you commit then push to this branch you'll get Travis to test the results so for now you won't have to get the tests running locally, though if you do you'll get much faster feedback. PuppetLabs has a getting started guide which will help: https://github.com/puppetlabs/puppetlabs-apache/blob/master/CONTRIBUTING.md#getting-started. You can ignore what it says about beaker. |
@3flex so do you know if someone will be updating this to be include instead of include_files as well? |
That will come later - there are some refactorings and internal module changes that will be worked on in the next little while. One of the items is to make sure the parameter/directive names match up as much as possible between the module and nginx. For right now though it will be left as is. |
shouldn't we be using prepended values though? vhost_include, location_include, etc? otherwise what's to stop @include populating location include files in vhost includes? |
Forgive my ignorance, I don't see how that would happen? According to Puppet docs
So |
true... ok... modifying the patch now... |
Fantastic, thanks for making those changes and adding tests! Last thing before we merge: can you please squash this down to a single commit. I promise I'll merge as soon as that's done! |
Update location.pp Update resource_location_spec.rb Update resource_location_spec.rb Update location.pp Update location_footer.erb
@3flex done |
No description provided.