Skip to content

add suffix() to go along with prefix() #138

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

Closed
wants to merge 2 commits into from

Conversation

floatingatoll
Copy link
Contributor

No description provided.

suffix = arguments[1] if arguments[1]

if suffix
unless suffix.is_a?(String)
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be good to have a test to ensure that the suffix method fails if the second argument is a string. Also, what happens if the suffixed value is an integer?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This "suffix" function is a carbon copy of stdlib's existing "prefix" function, with the only change being to append rather than prepend (which is a single line change, aside from s/prefix/suffix/g).

So I'm not sure how to respond to these comments, since they are actually comments about the already-shipping "prefix" function, authored by "Krzysztof Wilczynski" (perhaps on github somewhere?).

Given that "prefix" is considered good as-is, accepting 'suffix' and then filing an issue against puppetlabs-stdlib to address these comments for both prefix and suffix would ensure that your comments are addressed without unnecessarily delaying inclusion of a useful function.

(This pull request was submitted at the urging of our trainer, so you can also come find me in the PDX classroom today and tomorrow between 9a and 4p, if that's useful.)

@adrienthebo
Copy link
Contributor

@floatingatoll it looks like we don't have a CLA on file for you; would you be willing to sign it at https://cla.puppetlabs.com ?

@floatingatoll
Copy link
Contributor Author

done

On Wed, Mar 27, 2013 at 12:56 PM, Adrien Thebo [email protected]:

@floatingatoll https://github.com/floatingatoll it looks like we don't
have a CLA on file for you; would you be willing to sign it at
https://cla.puppetlabs.com ?


Reply to this email directly or view it on GitHubhttps://github.com//pull/138#issuecomment-15549297
.

@puppetcla
Copy link

CLA Signed by floatingatoll on 2013-03-27 13:02:33 -0700

@adrienthebo
Copy link
Contributor

Merged into master as f0db049.

Thanks again for the contribution!

-Adrien

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