Skip to content

Commit

Permalink
Lookup Contextify and Sizzle relative to JSDOM.
Browse files Browse the repository at this point in the history
  • Loading branch information
assaf committed Aug 21, 2012
1 parent 7bc86df commit d27f14f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
8 changes: 3 additions & 5 deletions CHANGELOG.md
Expand Up @@ -2,7 +2,7 @@ zombie.js-changelog(7) -- Changelog
===================================


## Version 1.4.0 2012-08-12
## Version 1.4.0 2012-08-20

Support for browser custom headers ():

Expand All @@ -25,10 +25,8 @@ Upgraded dependencies, tested with Node 0.8.6, jQuery 1.8.0, require.js 2.0.6.

Fail if Contextify module not available.



540 tests
14.4 sec to complete
549 tests
14.5 sec to complete


## Version 1.3.1 2012-06-05
Expand Down
9 changes: 6 additions & 3 deletions lib/zombie/index.coffee
@@ -1,11 +1,14 @@
Util = require("util")
Browser = require("./browser")
Path = require("path")
Util = require("util")


# Make sure Contextify is available to JSDOM
try
Contextify = require("jsdom/node_modules/contextify")
contextify = Path.resolve(require.resolve("jsdom"), "../../node_modules/contextify")
require contextify
catch ex
throw new LoadError("Zombie will not run correctly without the Contextify module")
throw new Error("Zombie will not run correctly without the Contextify module")


# ### zombie.visit(url, callback)
Expand Down
4 changes: 3 additions & 1 deletion lib/zombie/jsdom_patches.coffee
@@ -1,5 +1,7 @@
# Fix things that JSDOM doesn't do quite right.
createSizzle = require("../../node_modules/jsdom/lib/jsdom/selectors/sizzle")
Path = require("path")
sizzle = Path.resolve(require.resolve("jsdom"), "../jsdom/selectors/sizzle")
createSizzle = require(sizzle)
HTML = require("jsdom").dom.level3.html
URL = require("url")

Expand Down

0 comments on commit d27f14f

Please sign in to comment.