Permalink
Browse files

Release v0.3.9

  • Loading branch information...
1 parent aa7a1a1 commit 6d88f2b1e4fc41248b1e7bbfbe2f3e218fbfd5ce @shimaore shimaore committed Jun 5, 2012
Showing with 23 additions and 14 deletions.
  1. +9 −0 CHANGELOG.md
  2. +1 −1 docs/reference.md
  3. +11 −11 docs/zappa.html
  4. +1 −1 package.json
  5. +1 −1 src/zappa.coffee
View
@@ -1,3 +1,12 @@
+**v0.3.9** (2012-06-05):
+
+ * Added support for https server.
+ * Added test for rooms (#4).
+ * Added test for @ack
+ * Updated jsdom & socket.io-client
+ * Updated examples so that they can be used for testing.
+ * Bumped socket.io to 0.9.x fix #21 [Radagaisus]
+
**v0.3.8** (2012-05-30):
* Added examples for connect-assets usage. (#18) [scien]
View
@@ -1,6 +1,6 @@
---
layout: default
-title: API Reference (v0.3.8)
+title: API Reference (v0.3.9)
permalink: /reference/index.html
---
View
@@ -1,6 +1,6 @@
<!DOCTYPE html> <html> <head> <title>zappa.coffee</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <link rel="stylesheet" media="all" href="docco.css" /> </head> <body> <div id="container"> <div id="background"></div> <div id="jump_to"> Jump To &hellip; <div id="jump_wrapper"> <div id="jump_page"> <a class="source" href="client.html"> client.coffee </a> <a class="source" href="zappa.html"> zappa.coffee </a> </div> </div> </div> <table cellpadding="0" cellspacing="0"> <thead> <tr> <th class="docs"> <h1> zappa.coffee </h1> </th> <th class="code"> </th> </tr> </thead> <tbody> <tr id="section-1"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-1">&#182;</a> </div> <p><strong>Zappa</strong> is a <a href="http://coffeescript.org">CoffeeScript</a> DSL-ish interface for building web apps on the
<a href="http://nodejs.org">node.js</a> runtime, integrating <a href="http://expressjs.com">express</a>, <a href="http://socket.io">socket.io</a>
-and other best-of-breed libraries.</p> </td> <td class="code"> <div class="highlight"><pre><span class="nv">zappa = version: </span><span class="s">&#39;0.3.8&#39;</span>
+and other best-of-breed libraries.</p> </td> <td class="code"> <div class="highlight"><pre><span class="nv">zappa = version: </span><span class="s">&#39;0.3.9&#39;</span>
<span class="nv">codename = </span><span class="s">&#39;Overture to a Holiday in Berlin&#39;</span>
@@ -70,10 +70,12 @@
Views are kept at the module level.</p> </td> <td class="code"> <div class="highlight"><pre> <span class="nv">ws_handlers = </span><span class="p">{}</span>
<span class="nv">helpers = </span><span class="p">{}</span>
<span class="nv">postrenders = </span><span class="p">{}</span>
-
- <span class="nv">app = context.app = </span><span class="nx">express</span><span class="p">.</span><span class="nx">createServer</span><span class="p">()</span>
- <span class="nv">io = </span><span class="k">if</span> <span class="nx">options</span><span class="p">.</span><span class="nx">disable_io</span> <span class="k">then</span> <span class="kc">null</span> <span class="k">else</span> <span class="nv">context.io = </span><span class="nx">socketio</span><span class="p">.</span><span class="nx">listen</span><span class="p">(</span><span class="nx">app</span><span class="p">)</span></pre></div> </td> </tr> <tr id="section-17"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-17">&#182;</a> </div> <p>Reference to the zappa client, the value will be set later.</p> </td> <td class="code"> <div class="highlight"><pre> <span class="nv">client = </span><span class="kc">null</span>
- </pre></div> </td> </tr> <tr id="section-18"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-18">&#182;</a> </div> <p>Tracks if the zappa middleware is already mounted (<code>@use 'zappa'</code>).</p> </td> <td class="code"> <div class="highlight"><pre> <span class="nv">zappa_used = </span><span class="kc">no</span></pre></div> </td> </tr> <tr id="section-19"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-19">&#182;</a> </div> <p>Zappa's default settings.</p> </td> <td class="code"> <div class="highlight"><pre> <span class="nx">app</span><span class="p">.</span><span class="nx">set</span> <span class="s">&#39;view engine&#39;</span><span class="p">,</span> <span class="s">&#39;coffee&#39;</span>
+
+ <span class="k">if</span> <span class="nx">options</span><span class="p">.</span><span class="nx">https</span><span class="o">?</span>
+ <span class="nv">app = context.app = </span><span class="nx">express</span><span class="p">.</span><span class="nx">createServer</span> <span class="nx">options</span><span class="p">.</span><span class="nx">https</span>
+ <span class="k">else</span>
+ <span class="nv">app = context.app = </span><span class="nx">express</span><span class="p">.</span><span class="nx">createServer</span><span class="p">()</span>
+ <span class="nv">io = </span><span class="k">if</span> <span class="nx">options</span><span class="p">.</span><span class="nx">disable_io</span> <span class="k">then</span> <span class="kc">null</span> <span class="k">else</span> <span class="nv">context.io = </span><span class="nx">socketio</span><span class="p">.</span><span class="nx">listen</span><span class="p">(</span><span class="nx">app</span><span class="p">)</span></pre></div> </td> </tr> <tr id="section-17"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-17">&#182;</a> </div> <p>Reference to the zappa client, the value will be set later.</p> </td> <td class="code"> <div class="highlight"><pre> <span class="nv">client = </span><span class="kc">null</span></pre></div> </td> </tr> <tr id="section-18"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-18">&#182;</a> </div> <p>Tracks if the zappa middleware is already mounted (<code>@use 'zappa'</code>).</p> </td> <td class="code"> <div class="highlight"><pre> <span class="nv">zappa_used = </span><span class="kc">no</span></pre></div> </td> </tr> <tr id="section-19"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-19">&#182;</a> </div> <p>Zappa's default settings.</p> </td> <td class="code"> <div class="highlight"><pre> <span class="nx">app</span><span class="p">.</span><span class="nx">set</span> <span class="s">&#39;view engine&#39;</span><span class="p">,</span> <span class="s">&#39;coffee&#39;</span>
<span class="nx">app</span><span class="p">.</span><span class="nx">register</span> <span class="s">&#39;.coffee&#39;</span><span class="p">,</span> <span class="nx">zappa</span><span class="p">.</span><span class="nx">adapter</span> <span class="nx">require</span><span class="p">(</span><span class="s">&#39;coffeecup&#39;</span><span class="p">).</span><span class="nx">adapters</span><span class="p">.</span><span class="nx">express</span><span class="p">,</span>
<span class="nv">blacklist: </span><span class="p">[</span><span class="s">&#39;format&#39;</span><span class="p">,</span> <span class="s">&#39;autoescape&#39;</span><span class="p">,</span> <span class="s">&#39;locals&#39;</span><span class="p">,</span> <span class="s">&#39;hardcode&#39;</span><span class="p">,</span> <span class="s">&#39;cache&#39;</span><span class="p">]</span></pre></div> </td> </tr> <tr id="section-20"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-20">&#182;</a> </div> <p>Sets default view dir to @root (<code>path.dirname(module.parent.filename)</code>).</p> </td> <td class="code"> <div class="highlight"><pre> <span class="nx">app</span><span class="p">.</span><span class="nx">set</span> <span class="s">&#39;views&#39;</span><span class="p">,</span> <span class="nx">path</span><span class="p">.</span><span class="nx">join</span><span class="p">(</span><span class="nx">context</span><span class="p">.</span><span class="nx">root</span><span class="p">,</span> <span class="s">&#39;/views&#39;</span><span class="p">)</span>
@@ -383,14 +385,11 @@
<span class="nx">style</span> <span class="nx">@style</span> <span class="k">if</span> <span class="nx">@style</span>
<span class="nx">body</span> <span class="nx">@body</span>
- <span class="nx">context</span></pre></div> </td> </tr> <tr id="section-34"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-34">&#182;</a> </div> <p>Takes a function and runs it as a zappa app. Optionally accepts a port number, and/or
+ <span class="nx">context</span></pre></div> </td> </tr> <tr id="section-34"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-34">&#182;</a> </div> <p>zappa.run [host,] [port,] [{options},] root_function
+Takes a function and runs it as a zappa app. Optionally accepts a port number, and/or
a hostname (any order). The hostname must be a string, and the port number must be
castable as a number.
-Returns an object where <code>app</code> is the express server and <code>io</code> is the socket.io handle.
-Ex.:
- require('zappa') -> get '/': 'hi'
- require('zappa').run 80, -> get '/': 'hi'
- require('zappa') -> 'domain.com', 80, -> get '/': 'hi'</p> </td> <td class="code"> <div class="highlight"><pre><span class="nv">zappa.run = </span><span class="o">-&gt;</span>
+Returns an object where <code>app</code> is the express server and <code>io</code> is the socket.io handle.</p> </td> <td class="code"> <div class="highlight"><pre><span class="nv">zappa.run = </span><span class="o">-&gt;</span>
<span class="nv">host = </span><span class="kc">null</span>
<span class="nv">port = </span><span class="mi">3000</span>
<span class="nv">root_function = </span><span class="kc">null</span>
@@ -412,6 +411,7 @@
<span class="k">when</span> <span class="s">&#39;port&#39;</span> <span class="k">then</span> <span class="nv">port = </span><span class="nx">v</span>
<span class="k">when</span> <span class="s">&#39;css&#39;</span> <span class="k">then</span> <span class="nv">options.require_css = </span><span class="nx">v</span>
<span class="k">when</span> <span class="s">&#39;disable_io&#39;</span> <span class="k">then</span> <span class="nv">options.disable_io = </span><span class="nx">v</span>
+ <span class="k">when</span> <span class="s">&#39;https&#39;</span> <span class="k">then</span> <span class="nv">options.https = </span><span class="nx">v</span>
<span class="nv">zapp = </span><span class="nx">zappa</span><span class="p">.</span><span class="nx">app</span><span class="p">(</span><span class="nx">root_function</span><span class="p">,</span><span class="nx">options</span><span class="p">)</span>
<span class="nv">app = </span><span class="nx">zapp</span><span class="p">.</span><span class="nx">app</span>
View
@@ -1,7 +1,7 @@
{
"name": "zappajs",
"description": "CoffeeScript minimalist interface to express, socket.io and others",
- "version": "0.3.8",
+ "version": "0.3.9",
"author": "Stephane Alnet <stephane@shimaore.net>",
"homepage": "http://zappajs.github.com/zappajs/",
"repository": {"type": "git", "url": "git://github.com/zappajs/zappajs.git"},
View
@@ -2,7 +2,7 @@
# [node.js](http://nodejs.org) runtime, integrating [express](http://expressjs.com), [socket.io](http://socket.io)
# and other best-of-breed libraries.
-zappa = version: '0.3.8'
+zappa = version: '0.3.9'
codename = 'Overture to a Holiday in Berlin'

0 comments on commit 6d88f2b

Please sign in to comment.