-
Notifications
You must be signed in to change notification settings - Fork 567
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
make private classes private, dont pass params #107
Conversation
Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests |
@@ -1,85 +0,0 @@ | |||
GEM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove the commit that removes this file from the PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thoughts on how we get complete testing for all versions of puppet then? The Gemfile.lock pins puppet to 3.(something) currently which means traivs can't test 2.7 or the other versions of puppet in the 3 branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That can (AFAIK) be accomplished by using multiple Gemfiles and referencing them in the .travis.yml
. I included the Gemfile.lock
to keep some of our development environments synchronized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll back this commit out. I'm not familiar with what you're suggesting though so I'll leave that one to you. :)
Overall I think I get what you're going for and I'm cool with it. Did your editor automatically futz with a bunch of resources though? Moving the name up a line from: package {
'my-package' :
version => latest;
} to package { 'my-package' :
version => latest;
} |
Nope, the change from
to
was me standardizing the way we name resources - we have it both ways. The style guid seems to prefer the latter so that's what I went with. |
make private classes private, dont pass params
class { 'jenkins::proxy': | ||
host => $proxy_host, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to document these options. They aren't in the current parameters list at the top of file.
It is very difficult to test at the subclass level to ensure parameters set at the main class are passed correctly to the subclass, especially when the subclass has defaults of it's own. I have made the mistake numerous times of setting a subclass parameter and all of the tests succeed but I forgot to actually pass the value from the main class.
This PR removes parameter passing and pulls all variables directly from the main class.
Spec tests are updated to ensure subclasses behave as they should based on parameters to the main class
OS dependent testing removed from main spec, no OS dependent decisions are made there
Minor bug fixes
Minor lint cleanup