Skip to content
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 explicitly private, prevent setting params via rundeck::config #348

Merged
merged 1 commit into from
Nov 9, 2017
Merged

Conversation

wyardley
Copy link
Contributor

@wyardley wyardley commented Nov 8, 2017

Not sure what folks think about this, many of the classes have comments that they're private types; I think this makes it more explicit, and makes it impossible to pass params into classes that don't have datatypes.

Edit: was able to work out the issue with rundeck::config as well. Not sure if it was common for folks to pass stuff directly into rundeck::config; if so, we should call this breaking, but maybe not necessary, esp. since it was already mentioned in the docs that it's private.

Let's merge this before #351

@alexjfisher
Copy link
Member

Seems reasonable. Are the private classes only ever included/contained, not declared 'resource-style' by their parent classes? ie Is there much benefit of moving the parameters?

@wyardley
Copy link
Contributor Author

wyardley commented Nov 9, 2017

Seems reasonable. Are the private classes only ever included/contained, not declared 'resource-style' by their parent classes? ie Is there much benefit of moving the parameters?
I think the benefit is in making sure they can't be called directly, including from hiera, bypassing the data types in the main class (assert_private() may or may not accomplish that?)

'rundeck::config::global::web' is defined class-like, but it didn't have any explicit notes about being private, and isn't listed as a private class in README. That said, I'm guessing it could be converted too, at some point. This module is pretty sprawling.

@wyardley wyardley changed the title Add assert_private to private subclasses and move class params Make private classes explicitly private, prevent setting params via rundeck::config Nov 9, 2017
@wyardley wyardley merged commit fd08aa7 into voxpupuli:master Nov 9, 2017
@wyardley wyardley deleted the private_classes branch November 9, 2017 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants