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

(maint) Define statically_defined_version for local modules #1224

Conversation

mwaggett
Copy link
Contributor

This commit adds a statically_defined_version method to the
R10K::Module::Local class. This method is called when instantiating a new
module definition, so previously, Puppetfiles that defined local modules could
not be evaluated because the method was missing.

@mwaggett mwaggett requested a review from a team September 17, 2021 16:34
This commit adds a `statically_defined_version` method to the
`R10K::Module::Local` class. This method is called when instantiating a new
module definition, so previously, Puppetfiles that defined local modules could
not be evaluated because the method was missing.
@mwaggett mwaggett force-pushed the maint/main/statically-defined-version-local branch from 6670da6 to 3e7aceb Compare September 17, 2021 16:59
@@ -11,10 +11,14 @@ def self.implement?(name, args)
args.is_a?(Hash) && (args[:local] || args[:type].to_s == 'local')
end

def version
def self.statically_defined_version(name, args)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since these args aren't used, should we drop them?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, we call this with args, since the other module types use them in their implementations: https://github.com/puppetlabs/r10k/blob/main/lib/r10k/module/definition.rb#L11

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case, it should be just *.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to make that edit?

@mwaggett mwaggett force-pushed the maint/main/statically-defined-version-local branch from 3e7aceb to cbcabdb Compare September 17, 2021 17:27
@justinstoller justinstoller merged commit de47d0d into puppetlabs:main Sep 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants