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

Resolve basePath first #67

Merged
merged 4 commits into from
Aug 23, 2016
Merged

Resolve basePath first #67

merged 4 commits into from
Aug 23, 2016

Conversation

doowb
Copy link
Member

@doowb doowb commented Aug 23, 2016

This PR resolves the basePath before expanding the glob into an absolute path. This is necessary for when paths contain "glob like" characters but aren't part of the actual glob pattern.

I wanted to get this up here for review. I'll be able to add a test for the specific gulp issue later today.

@@ -188,4 +187,11 @@ function globIsSingular(glob) {
});
}

function getBasePath(ourGlob, opt) {
if (opt.base) {
Copy link
Member

Choose a reason for hiding this comment

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

this check should happen in createStream, use a ternary on L18

@yocontra
Copy link
Member

Seems good, @phated ?

@doowb
Copy link
Member Author

doowb commented Aug 23, 2016

Thanks @contra. I moved the .base check outside of the function and I'm using ourOpts now since I know it will be an object at that point.

@@ -61,6 +61,25 @@ describe('glob-stream', function() {
});
});

it('should handle ( ) in directory paths', function(done) {
var cwd = join(__dirname, './fixtures/has (parens)');
Copy link
Member

Choose a reason for hiding this comment

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

what happens if the cwd is ./fixtures and you use **/*.dmc as the glob? Maybe that should be another test

Copy link
Member Author

Choose a reason for hiding this comment

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

I can add more tests or update some of the existing ones that already test that to include the test.dmc.

Copy link
Member

Choose a reason for hiding this comment

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

Either works for me. I just wanted to try to find other scenarios that might not be tested currently.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done. Added and updated a couple of the tests.

@phated
Copy link
Member

phated commented Aug 23, 2016

LGTM.

@doowb it's really awesome and very much appreciated that you can jump on issues like these and get them patched up (throughout the gulpjs org).

@doowb
Copy link
Member Author

doowb commented Aug 23, 2016

Thanks @phated, I'm glad I can help.

@phated phated merged commit 4a01f00 into gulpjs:master Aug 23, 2016
@doowb doowb deleted the issue-1744 branch August 25, 2016 20:10
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.

None yet

3 participants