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

quote paths for windows compatability #567

Merged
merged 2 commits into from
Jan 27, 2014
Merged

quote paths for windows compatability #567

merged 2 commits into from
Jan 27, 2014

Conversation

jlambert121
Copy link
Contributor

I believe I have found all of the paths to quote for spaces in the paths for Windows compatibility, but I'd love some other eyes to review my changes. I think I correctly quoted the type:path paths as well as straight paths. Since I had to change the tests for my new quoting it is possible I did something incorrectly.

Fixes #472

@igalic
Copy link
Contributor

igalic commented Jan 13, 2014

This may or may not break our unofficial recommendation to use ~ for creating LocationMatch and FilesMatch and DirectoryMatch.

We should provide a better way to create those then…

@jlambert121
Copy link
Contributor Author

I'm not familiar with that pattern - could you give me an example and I can see if I can rework?

@igalic
Copy link
Contributor

igalic commented Jan 13, 2014

See Location's documentation as an example, scroll down to where we explain:

<Location ~ "/(extra|special)/data">

@jlambert121
Copy link
Contributor Author

OK - wasn't sure if the Match directives were any different. Would it make sense on this PR to add a test for the Match directives for a ~ as the first character and quote them as your comment above, else quote as here? Am I over-simplifying the problem?

@igalic
Copy link
Contributor

igalic commented Jan 13, 2014

I think the easiest way would actually be to fix this in Erb:

path = directory['path']
directive = directory['provider']
if directory[path] =~ '^~' {
  path = substring (or whatevz)
  directive += 'Match'
}

@jlambert121
Copy link
Contributor Author

K - I'll take a look at that a bit later and see if I can improve this. Thanks!

@igalic
Copy link
Contributor

igalic commented Jan 13, 2014

I'd recommend we land this one first, then the *Match stuff in a new pr.

@jlambert121
Copy link
Contributor Author

Works for me. Let me know if there's anything else I need to update in this.

@igalic
Copy link
Contributor

igalic commented Jan 13, 2014

But before go down that road, could you please also fix up the spec/acceptance tests?

@jlambert121
Copy link
Contributor Author

With the switch to beaker I haven't been able to get it to run successfully on master (let alone my own branch). What's the command to kick it off (or is it documented somewhere I didn't see)?

@igalic
Copy link
Contributor

igalic commented Jan 13, 2014

sigh I should've documented that a long time ago :S
but time is scarce when all you do is shave yaks. That hair grows so quickly, and we really need it to stuff the pillows.

@igalic
Copy link
Contributor

igalic commented Jan 13, 2014

@jlambert121
Copy link
Contributor Author

Awesome! I haven't looked in there forever since it's always been very out of date. Sorry I didn't check though. I'll get the acceptance tests updated.

@inetdavid
Copy link

David Schmidt
[email protected]
509-869-0928 (cell, text messages preferred)

On Jan 13, 2014, at 7:48 AM, Igor Galić [email protected] wrote:

sigh I should've documented that a long time ago :S
but time is scarce when all you do is shave yaks. That hair grows so quickly, and we really need it to stuff the pillows.


Reply to this email directly or view it on GitHub.

@jlambert121
Copy link
Contributor Author

It seemed like the best way to fix the acceptance tests was just to implement Match, everything should be happy now.

@igalic
Copy link
Contributor

igalic commented Jan 15, 2014

Can you please also add support for (directorymatch|filesmatch|locationmatch) as provider (as alternative)

Then it'll be perfect ;) (if we also had some new tests)

@igalic
Copy link
Contributor

igalic commented Jan 15, 2014

Actually, no. Let's do this in a new PR. But you should still fix up the tests under spec/acceptance. @apenney is planning to axe the spec/system tests soon.

@blkperl
Copy link
Contributor

blkperl commented Jan 26, 2014

This PR no longer merges cleanly, you will need to rebase against master.

@jlambert121
Copy link
Contributor Author

Rebased, anything else needed to merge this?

@blkperl
Copy link
Contributor

blkperl commented Jan 27, 2014

👍

igalic added a commit that referenced this pull request Jan 27, 2014
quote paths for windows compatability
@igalic igalic merged commit 9883dcd into puppetlabs:master Jan 27, 2014
blkperl added a commit to blkperl/puppetlabs-apache that referenced this pull request Jan 28, 2014
traylenator pushed a commit to traylenator/puppetlabs-apache that referenced this pull request Jun 7, 2022
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.

5 participants