-
Notifications
You must be signed in to change notification settings - Fork 582
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
add Function extname() #949
Conversation
# | ||
# extname.rb | ||
# | ||
module Puppet::Parser::Functions |
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.
Please implement using the 4.x function API and namespace the function to stdlib
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.
Thanks for Your Review.
I changed the Function to using Puppet-4-Function-API now.
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.
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.
lib/puppet/functions/extname.rb
Outdated
# An empty String will also be returned, when the Period is the last Character | ||
# in Path. | ||
|
||
Puppet::Functions.create_function(:extname) do |
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.
please make that :'stdlib::extname'
to place it in the stdlib
namespace.
Then, the examples need to be updated to use stdlib::extname(...)
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.
Done.
Also I moved it into functions/stdlib/
according to the Documentation.
I adapted also README.md
, although this one might be auto-generated.
My concern is addressed - the maintainers of stdlib can decide if they want this function or not.
No description provided.