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

replaced jsdom with cheerio, made a test that works #12

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

rgarcia
Copy link

@rgarcia rgarcia commented Nov 30, 2011

jsdom seems way too strict. cheerio is much more flexible. had to change the semantics of the spider() call on new links since I couldn't get the same _.extend() call to work on the cheerio jquery object. the way I have it now it just recycles the call to get() instead. this seems cleaner to me but there might be something I've broken...

rgarcia and others added 9 commits November 29, 2011 21:44
Get url in route callback
…nd invoke matching route handlers regardless of HTTP response code

Replaced headers, body and fromCache components of the 'this' injected into route handlers with the full HTTP response. This response contains the body and the fromCache aspect is available from the HTTP statusCode that is also part of the response. The body component now comes from the response rather than the body parameter passed into the request.get callback.

Also, removed conditions that prevented route handlers being invoked if the status code was not 200 or 304. Fixed broken tests. Added a new test that uses assert.
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.

3 participants