-
Notifications
You must be signed in to change notification settings - Fork 878
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Starting to use httpbin to test node-crawler and update dependencies
- Loading branch information
Showing
4 changed files
with
83 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,66 @@ | ||
{ | ||
"name": "crawler", | ||
"version": "0.2.5", | ||
"description": "Crawler is a web spider written with Nodejs. It gives you the full power of jQuery on the server to parse a big number of pages as they are downloaded, asynchronously. Scraping should be simple and fun!", | ||
"keywords": [ | ||
"dom", | ||
"javascript", | ||
"crawling", | ||
"spider", | ||
"scraper", | ||
"scraping", | ||
"jquery" | ||
], | ||
"maintainers": [ | ||
{ | ||
"name": "Sylvain Zimmer", | ||
"email": "sylvain@sylvainzimmer.com", | ||
"url": "http://sylvinus.org/" | ||
} | ||
], | ||
"bugs": { | ||
"mail": "sylvain@sylvainzimmer.com", | ||
"url": "http://github.com/sylvinus/node-crawler/issues" | ||
}, | ||
"licenses": [ | ||
{ | ||
"type": "MIT", | ||
"url": "http://github.com/sylvinus/node-crawler/blob/master/LICENSE.txt" | ||
} | ||
], | ||
"repository": | ||
{ | ||
"type": "git", | ||
"url": "https://github.com/sylvinus/node-crawler.git" | ||
} | ||
, | ||
"dependencies": { | ||
"htmlparser": "1.7.6", | ||
"request": "2.21.0", | ||
"jsdom": "0.8.2", | ||
"generic-pool": "2.0.3", | ||
"underscore": "1.4.4", | ||
"jschardet": "1.0.2", | ||
"iconv-lite": "0.2.8" | ||
}, | ||
"optionalDependencies":{ | ||
"iconv": "2.0.6" | ||
}, | ||
"devDependencies": { | ||
"qunit": "0.5.16", | ||
"express": "2.5.x", | ||
"memwatch": "0.2.2" | ||
}, | ||
"scripts": { | ||
"test": "node test/testrunner.js" | ||
}, | ||
"engines": [ | ||
"node >=0.6.x" | ||
], | ||
"directories": { | ||
"lib": "lib" | ||
}, | ||
"main": "./lib/crawler" | ||
"name": "crawler", | ||
"version": "0.2.5", | ||
"description": "Crawler is a web spider written with Nodejs. It gives you the full power of jQuery on the server to parse a big number of pages as they are downloaded, asynchronously. Scraping should be simple and fun!", | ||
"keywords": [ | ||
"dom", | ||
"javascript", | ||
"crawling", | ||
"spider", | ||
"scraper", | ||
"scraping", | ||
"jquery" | ||
], | ||
"maintainers": [ | ||
{ | ||
"name": "Sylvain Zimmer", | ||
"email": "sylvain@sylvainzimmer.com", | ||
"url": "http://sylvinus.org/" | ||
} | ||
], | ||
"bugs": { | ||
"mail": "sylvain@sylvainzimmer.com", | ||
"url": "http://github.com/sylvinus/node-crawler/issues" | ||
}, | ||
"licenses": [ | ||
{ | ||
"type": "MIT", | ||
"url": "http://github.com/sylvinus/node-crawler/blob/master/LICENSE.txt" | ||
} | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/sylvinus/node-crawler.git" | ||
}, | ||
"dependencies": { | ||
"htmlparser": "^1.7.7", | ||
"request": "^2.34.0", | ||
"jsdom": "^0.10.5", | ||
"generic-pool": "^2.0.4", | ||
"underscore": "^1.6.0", | ||
"jschardet": "^1.1.0", | ||
"iconv-lite": "^0.4.0-pre3", | ||
"express": "^4.2.0", | ||
"qunit": "^0.6.3", | ||
"iconv": "^2.1.0", | ||
"compression": "^1.0.2" | ||
}, | ||
"optionalDependencies": { | ||
"iconv": "*" | ||
}, | ||
"devDependencies": { | ||
"qunit": "*", | ||
"express": "*", | ||
"memwatch": "*" | ||
}, | ||
"scripts": { | ||
"test": "node test/testrunner.js" | ||
}, | ||
"engines": [ | ||
"node >=0.8.x" | ||
], | ||
"directories": { | ||
"lib": "lib" | ||
}, | ||
"main": "./lib/crawler" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,32 @@ | ||
#!/usr/bin/env node | ||
|
||
var testrunner = require( "qunit" ), | ||
var testrunner = require('qunit'), | ||
|
||
path = require('path').normalize( __dirname + '/..'); | ||
|
||
path = require( "path" ).normalize( __dirname + "/.." ); | ||
|
||
testrunner.setup({ | ||
|
||
}); | ||
|
||
var mockserver = require("./mockserver").app; | ||
|
||
mockserver.listen(30045); | ||
var mockserver = require('./mockserver').app.listen(30045); | ||
|
||
testrunner.run([ | ||
{ | ||
code: path + "/lib/crawler.js", | ||
code: path + '/lib/crawler.js', | ||
tests: [ | ||
path + "/test/units/simple.js", | ||
path + "/test/units/links.js", | ||
path + "/test/units/forceutf8.js", | ||
path + "/test/units/errors.js", | ||
path + "/test/units/leaks.js" | ||
path + '/test/units/simple.js', | ||
path + '/test/units/links.js', | ||
|
||
path + '/test/units/forceutf8.js', | ||
|
||
path + '/test/units/errors.js', | ||
|
||
path + '/test/units/leaks.js' | ||
|
||
] | ||
} | ||
],function(err, report) { | ||
console.log("Stopping mockserver..."); | ||
console.log('Stopping mockserver...'); | ||
mockserver.close(); | ||
process.exit((err || report.failed !== 0) ? 1 : 0); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters