Skip to content

Commit

Permalink
Added magical zombie girl and PDF.
Browse files Browse the repository at this point in the history
  • Loading branch information
assaf committed Dec 30, 2010
1 parent 9e9bb1f commit 71ad9f8
Show file tree
Hide file tree
Showing 8 changed files with 103 additions and 26 deletions.
34 changes: 17 additions & 17 deletions CHANGELOG.md
Expand Up @@ -2,7 +2,7 @@ zombie.js-changelog(7) -- Changelog
===================================


## Version 0.8.2 2010-12-30
### Version 0.8.2 2010-12-30

Fixed bug whereby Zombie hangs when making requests to a URL that has no
path (e.g. `http://localhost`).
Expand All @@ -11,7 +11,7 @@ path (e.g. `http://localhost`).
2.5 sec to complete


## Version 0.8.1 2010-12-29
### Version 0.8.1 2010-12-29

Added User-Agent string. You can change it by setting the browser
option `userAgent`.
Expand All @@ -28,7 +28,7 @@ in the browser. Changed it to load the page (add caching later on).
2.6 sec to complete


## Version 0.8.0 2010-12-29
### Version 0.8.0 2010-12-29

Fixed issue 8, wrong location of package.json.

Expand All @@ -51,15 +51,15 @@ Added new page covering the browser API.
2.5 sec to complete


## Version 0.7.7 2010-12-28
### Version 0.7.7 2010-12-28

Fix JSDOM queue and with it issue #6.

189 Tests
2.3 sec to complete


## Version 0.7.6 2010-12-28
### Version 0.7.6 2010-12-28

HTML5 doesn't play nice with JSDOM, bringing back html-parser to handle
innerHTML (full document parsing still handled by HTML5).
Expand All @@ -74,15 +74,15 @@ Added zombie.version.
2.3 sec to complete


## Version 0.7.5 2010-12-28
### Version 0.7.5 2010-12-28

Previous fix for document.write was incomplete, this one works better.

189 Tests
2.5 sec to complete


## Version 0.7.4 2010-12-28
### Version 0.7.4 2010-12-28

Now parsing documents using HTML5, which can deal better with tag soup.

Expand All @@ -97,7 +97,7 @@ lastResponse and lastError.
2.5 sec to complete


## Version 0.7.3 2010-12-27
### Version 0.7.3 2010-12-27

Fixed non-sensical error message when selector fails matching a node
(`fill`, `check`, `select`, etc).
Expand All @@ -122,7 +122,7 @@ can!
1.8 sec to complete


## Version 0.7.2 2010-12-27
### Version 0.7.2 2010-12-27

In CoffeeScript 1.0 loops no longer try preserve block scope when
functions are being generated within the loop body. Unfortunately, this
Expand All @@ -136,12 +136,12 @@ navigate to a different page.
1.8 sec to complete


## Version 0.7.1 2010-12-22
### Version 0.7.1 2010-12-22

Removed CoffeeScript from runtime dependency list.


## Version 0.7.0 2010-12-22
### Version 0.7.0 2010-12-22

Added `querySelector` and `querySelectorAll` based on the [DOM Selector
API](http://www.w3.org/TR/selectors-api/). Use this instead of `find`
Expand All @@ -159,27 +159,27 @@ More, better, documentation.
2.0 sec to complete


## Version 0.6.5 2010-12-21
### Version 0.6.5 2010-12-21

Fixed lack of JavaScript source code: CoffeeScript moved to src,
JavaScript compiled into lib, life is grand again.

Changelog is now Markdown file and part of the documentation.


## Version 0.6.4 2010-12-21
### Version 0.6.4 2010-12-21

First documentation you can actually use.


## Version 0.6.3 2010-12-21
### Version 0.6.3 2010-12-21

Fixed documentation link.

`man zombie`


## Version 0.6.2 2010-12-21
### Version 0.6.2 2010-12-21

First NPM release.

Expand All @@ -195,7 +195,7 @@ spec/.scripts.
1.8 sec to complete


## Version 0.6.1 2010-12-20
### Version 0.6.1 2010-12-20

Changed browser.cookies from getter to function that accepts cookie domain
(host and port) and path, and returns wrapper to access specific cookie
Expand All @@ -209,7 +209,7 @@ Added window.JSON.
1.8 sec to complete


## Version 0.6.0 2010-12-20
### Version 0.6.0 2010-12-20

First release that I could use to test an existing project.

Expand Down
13 changes: 12 additions & 1 deletion Cakefile
Expand Up @@ -129,16 +129,27 @@ generateMan = (callback)->
process.stdout.write "\n"
convert()

generatePDF = (callback)->
log "Generating PDF documentation ...", green
files = "index api selectors troubleshoot".split(" ").map((f)-> "html/#{f}.html")
options = "--book --disable-javascript --outline --print-media-type --title Zombie.js --header-html doc/_header.html --cover doc/cover.html"
margins = "--margin-left 20 --margin-right 20 --margin-top 20 --margin-bottom 20 --header-spacing 5"
exec "wkhtmltopdf #{options} #{margins} #{files.join(" ")} html/zombie.pdf", callback

generateDocs = (callback)->
log "Generating documentation ...", green
documentPages (err)->
onerror err
documentSource (err)->
onerror err
generateMan callback
generatePDF (err)->
onerror err
generateMan callback

task "doc:pages", "Generate documentation for main pages", -> documentPages onerror
task "doc:source", "Generate documentation from source files", -> documentSource onerror
task "doc:man", "Generate man pages", -> generateMan onerror
task "doc:pdf", "Generate PDF documentation", -> generatePDF onerror
task "doc", "Generate all documentation", -> generateDocs onerror


Expand Down
12 changes: 7 additions & 5 deletions README.md
Expand Up @@ -238,17 +238,19 @@ outstanding [to-dos](todo.html).
## Brains

Zombie.js is copyright of [Assaf Arkin](http://labnotes.org), released
under the MIT License.
under the MIT License

Zombie.js is written in
[CoffeeScript](http://jashkenas.github.com/coffee-script/) for
[Node.js](http://nodejs.org/).
[Node.js](http://nodejs.org/)

DOM emulation by Elijah Insua's [JSDOM](http://jsdom.org/).
DOM emulation by Elijah Insua's [JSDOM](http://jsdom.org/)

HTML5 parsing by Aria Stewart's [HTML5](https://github.com/aredridel/html5).
HTML5 parsing by Aria Stewart's [HTML5](https://github.com/aredridel/html5)

CSS selectors by John Resig's [Sizzle.js](http://sizzlejs.com/).
CSS selectors by John Resig's [Sizzle.js](http://sizzlejs.com/)

Magical Zombie Girl by [Toho Scope](http://www.flickr.com/people/tohoscope/)


## See Also
Expand Down
34 changes: 34 additions & 0 deletions doc/_header.html
@@ -0,0 +1,34 @@
<html>
<head>
<script>
function subst() {
var vars={};
var x=document.location.search.substring(1).split('&');
for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);}
var x=['frompage','topage','page','webpage','section','subsection','subsubsection'];
for(var i in x) {
var y = document.getElementsByClassName(x[i]);
for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]];
}
}
</script>
<style>
body { margin: 0; padding: 0; height: 2em }
.header {
font-size: 10pt;
margin: 0;
padding: 0;
border-bottom: 1px solid #ccc;
width: 100%;
}
</style>
</head>
<body onload="subst()">
<table class="header">
<tr>
<td class="section"></td>
<td style="text-align:right"><span class="page"></span></td>
</tr>
</table>
</body>
</html>
6 changes: 4 additions & 2 deletions doc/_layout.html
Expand Up @@ -17,9 +17,11 @@
<li><a href="/troubleshoot.html">Troubleshooting</a></li>
<li><a href="/guts.html">The Guts</a></li>
<li><a href="/changelog.html">Changelog</a></li>
<li><a href="/todo.html">Todo</a></li>
<li><a href="/source/">Annotated Source</a></li>
<li><a href="/zombie.pdf">Download PDF</a></li>
<li>&nbsp;</li>
<li><a href="http://www.w3.org/DOM/DOMTR">DOM API</a></li>
<li><a href="/source/">Annotated Source</a></li>
<li><a href="/todo.html">Todo</a></li>
<li><a href="https://github.com/assaf/zombie">Github/Issues</a></li>
</ul>
<div class="donate">
Expand Down
28 changes: 28 additions & 0 deletions doc/cover.html
@@ -0,0 +1,28 @@
<html>
<head>
<title>Zombie.js</title>
<style>
body {
font-family: Baskerville, Palatino, "Palatino Linotype", Georgia, serif;
color: #222;
}
h1, h2 {
font-family: "Gill Sans", "Gill Sans MT", Calibri, sans-serif;
text-align: center;
}
h1 {
color: #600;
font-size: 48pt;
}
img {
width: 500px;
margin: 24px auto;
}
</style>
</head>
<body>
<h1>Zombie.js</h1>
<img src="zombie.png" width="500" height="375">
<h2>Insanely fast, full-stack, headless browser testing</h2>
</body>
</html>
2 changes: 1 addition & 1 deletion doc/print.css
Expand Up @@ -26,7 +26,7 @@ pre, code {
text-decoration: none;
color: #600;
}
#header .navigation {
#sidebar {
display: none;
}

Expand Down
Binary file added doc/zombie.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 71ad9f8

Please sign in to comment.