-
-
Notifications
You must be signed in to change notification settings - Fork 113
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
Improvement to $destination param (issue #51) #58
Conversation
awesome, LGTM |
4c2a5d3
to
a112f4e
Compare
I haven't learned spec tests yet. I made an attempt but now checks are failing. Can you give me some guidance? I was attempting to:
|
That first attempt at rewriting the spec test was horrible. What was I thinking? I'm gonna try it again. Will update this PR within a few days |
you probably don't want to change existing tests, add one more or less like
|
Got it, will do |
@carlossg that spec test looked OK to me but it didn't work. i'm gonna keep at it, but if you have any advice let me know |
…nger have to specify filename
c414c5b
to
c40bfa3
Compare
OK, test added. We are good to go |
Improvement to $destination param (issue #51)
thanks @carlossg. on second look, the |
This is for Issue #51. First attempt was PR #56, which was closed because owner of repo wanted it improved further. I'll quote the original PR below.
To make it work, owner originally requested the improvement be: No new params for this feature, so make it if
$destination
already exists as a directory, then treat it as a directory. But checking to see if a directory exists is difficult to do with Puppet (and impossible to do cleanly).So I settled on the following design which looks and works great. Better than the original PR too imho: If
$destination
ends in a forward or backward slash, then treat as a directory. With this, we were able to achieve:Old style still works too: