This file contains hidden or 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
class Zappa | |
constructor: -> | |
... | |
@locals = | |
app: (name,server) => @app name,server | |
... | |
app: (name,server) -> | |
@ensure_app name,server | |
@current_app = @apps[name] |
This file contains hidden or 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
diff --git a/bin.js b/bin.js | |
index 21a4f35..4a7c8ae 100755 | |
--- a/bin.js | |
+++ b/bin.js | |
@@ -14,6 +14,7 @@ var node = process.argv.shift() | |
, command = process.argv.shift() | |
, app = process.argv.shift() | |
, couch = process.argv.shift() | |
+ , auth = process.argv.shift() | |
; |
This file contains hidden or 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
diff -rub -x .git zappa-github//src/zappa.coffee zappa/src/zappa.coffee | |
--- zappa-github//src/zappa.coffee 2011-06-16 15:12:35.000000000 +0200 | |
+++ zappa/src/zappa.coffee 2011-05-16 20:33:06.000000000 +0200 | |
@@ -15,7 +15,7 @@ | |
@current_app = null | |
@locals = | |
- app: (name) => @app name | |
+ app: (name,server) => @app name, server | |
include: (path) => @include path |
This file contains hidden or 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
diff --git a/main.js b/main.js | |
index fa8466f..221ed8b 100644 | |
--- a/main.js | |
+++ b/main.js | |
@@ -8,8 +8,6 @@ var path = require('path') | |
, spawn = require('child_process').spawn | |
; | |
-var h = {'content-type':'application/json', 'accept-type':'application/json'} | |
- |
This file contains hidden or 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
zappa = | |
run: (f)-> | |
# Re-compile the function in a context that contains the Zappa | |
# methods as globals. | |
vm = require 'vm' | |
code = 'zappa_code='+f.toString() | |
views = {} | |
router = {} |
This file contains hidden or 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
diff -ru mauricemach-zappa-ac57545//src/zappa.coffee zappa-noclobber//src/zappa.coffee | |
--- mauricemach-zappa-ac57545//src/zappa.coffee 2011-09-17 03:12:51.000000000 +0200 | |
+++ zappa-noclobber//src/zappa.coffee 2011-09-20 10:42:15.000000000 +0200 | |
@@ -285,12 +285,19 @@ | |
names = [] | |
names.push k for k, v of ctx | |
+ data = [req.query, req.params, req.body] | |
+ | |
if app.settings['autoimport'] |
This file contains hidden or 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
@@ -280,10 +280,38 @@ zappa.app = (func,disable_io,require_css) -> | |
if typeof arguments[0] isnt 'object' | |
render.apply @, arguments | |
else | |
for k, v of arguments[0] | |
render.apply @, [k, v] | |
+ include: (paths) -> | |
+ | |
+ _end = res.end | |
+ _write = res.write |
This file contains hidden or 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
diff --git a/package.json b/package.json | |
index 3d90697..665b891 100644 | |
--- a/package.json | |
+++ b/package.json | |
@@ -6,7 +6,7 @@ | |
"homepage": "http://zappajs.github.com/zappajs/", | |
"repository": {"type": "git", "url": "git://github.com/zappajs/zappajs.git"}, | |
"dependencies": { | |
- "express": "2.5.9", | |
+ "express": "3.0.x", |
This file contains hidden or 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
#!/bin/bash | |
# Install this file as /etc/.git/hooks/post-commit | |
# Dependencies: etckeeper git-email | |
git send-email --from etckeeper --to root --confirm=never --quiet @{1} |
This file contains hidden or 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
require('zappajs') -> | |
@use 'zappa' | |
@enable 'default layout' | |
@get '/': -> | |
foo = 'bar' | |
@render 'index', foo: foo, hardcode: { coffee: export_params } | |
@view index: -> | |
@scripts = ['/zappa/jquery'] |
OlderNewer