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

add Function extname() #949

Merged
merged 1 commit into from
Oct 11, 2018
Merged

add Function extname() #949

merged 1 commit into from
Oct 11, 2018

Conversation

cocker-cc
Copy link
Contributor

No description provided.

#
# extname.rb
#
module Puppet::Parser::Functions
Copy link
Contributor

Choose a reason for hiding this comment

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

Please implement using the 4.x function API and namespace the function to stdlib

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for Your Review.
I changed the Function to using Puppet-4-Function-API now.

Copy link
Contributor

@hlindberg hlindberg left a comment

Choose a reason for hiding this comment

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

As commented, this should be in the stdlib namespace - and if it is I have no principle arguments against this function - and it is up to the maintainers of stdlib to decide if they want it or not.

# An empty String will also be returned, when the Period is the last Character
# in Path.

Puppet::Functions.create_function(:extname) do
Copy link
Contributor

Choose a reason for hiding this comment

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

please make that :'stdlib::extname' to place it in the stdlib namespace.
Then, the examples need to be updated to use stdlib::extname(...)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.
Also I moved it into functions/stdlib/ according to the Documentation.
I adapted also README.md, although this one might be auto-generated.

@hlindberg hlindberg dismissed their stale review September 14, 2018 19:26

My concern is addressed - the maintainers of stdlib can decide if they want this function or not.

@david22swan david22swan merged commit b9caf4d into puppetlabs:master Oct 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants