add Function extname()#949
add Function extname()#949david22swan merged 1 commit intopuppetlabs:masterfrom cocker-cc:feature/master/add_function_extname
Conversation
| # | ||
| # extname.rb | ||
| # | ||
| module Puppet::Parser::Functions |
There was a problem hiding this comment.
Please implement using the 4.x function API and namespace the function to stdlib
There was a problem hiding this comment.
Thanks for Your Review.
I changed the Function to using Puppet-4-Function-API now.
hlindberg
left a comment
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
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.