File tree Expand file tree Collapse file tree 3 files changed +42
-2
lines changed
Expand file tree Collapse file tree 3 files changed +42
-2
lines changed Original file line number Diff line number Diff line change 1+ # Test against these versions of Node.js
2+ environment :
3+ matrix :
4+ # node.js
5+ - nodejs_version : " 6.0"
6+ - nodejs_version : " 5.0"
7+ - nodejs_version : " 4.0"
8+ - nodejs_version : " 0.12"
9+ - nodejs_version : " 0.10"
10+
11+ # Install scripts. (runs after repo cloning)
12+ install :
13+ # Get the latest stable version of Node.js or io.js
14+ - ps : Install-Product node $env:nodejs_version
15+ # install modules
16+ - npm install
17+
18+ # Post-install test scripts.
19+ test_script :
20+ # Output useful info for debugging.
21+ - node --version
22+ - npm --version
23+ # run tests
24+ - npm test
25+
26+ # Don't actually build.
27+ build : off
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ var resolveGlob = require('to-absolute-glob');
1010var globParent = require ( 'glob-parent' ) ;
1111var path = require ( 'path' ) ;
1212var extend = require ( 'extend' ) ;
13+ var sepRe = ( process . platform === 'win32' ? / [ \/ \\ ] / : / \/ + / ) ;
1314
1415var gs = {
1516 // Creates a stream for a single glob or filter
@@ -190,7 +191,19 @@ function globIsSingular(glob) {
190191}
191192
192193function getBasePath ( ourGlob , opt ) {
193- return resolveGlob ( globParent ( ourGlob ) + path . sep , opt ) ;
194+ var basePath ;
195+ var parent = globParent ( ourGlob ) ;
196+
197+ if ( parent === '/' && opt && opt . root ) {
198+ basePath = path . normalize ( opt . root ) ;
199+ } else {
200+ basePath = resolveGlob ( parent , opt ) ;
201+ }
202+
203+ if ( ! sepRe . test ( basePath . charAt ( basePath . length - 1 ) ) ) {
204+ basePath += path . sep ;
205+ }
206+ return basePath ;
194207}
195208
196209module . exports = gs ;
Original file line number Diff line number Diff line change 1515 " index.js"
1616 ],
1717 "scripts" : {
18- "lint" : " eslint . && jscs *.js test/" ,
18+ "lint" : " eslint . && jscs . test/" ,
1919 "pretest" : " npm run lint" ,
2020 "test" : " mocha" ,
2121 "coveralls" : " istanbul cover _mocha --report lcovonly && istanbul-coveralls"
You can’t perform that action at this time.
0 commit comments