vulcan 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/vulcan/version.rb +1 -1
- data/server/Procfile +1 -0
- data/server/bin/make +39 -0
- data/server/lib/on.js +13 -0
- data/server/lib/spawner.js +101 -0
- data/server/node_modules/connect-form/History.md +28 -0
- data/server/node_modules/connect-form/LICENSE +22 -0
- data/server/node_modules/connect-form/Makefile +11 -0
- data/server/node_modules/connect-form/Readme.md +35 -0
- data/server/node_modules/connect-form/index.html +213 -0
- data/server/node_modules/connect-form/index.js +100 -0
- data/server/node_modules/connect-form/lib/connect-form.js +100 -0
- data/server/node_modules/connect-form/node_modules/formidable/Makefile +14 -0
- data/server/node_modules/connect-form/node_modules/formidable/Readme.md +264 -0
- data/server/node_modules/connect-form/node_modules/formidable/TODO +3 -0
- data/server/node_modules/connect-form/node_modules/formidable/benchmark/bench-multipart-parser.js +70 -0
- data/server/node_modules/connect-form/node_modules/formidable/example/post.js +43 -0
- data/server/node_modules/connect-form/node_modules/formidable/example/upload.js +48 -0
- data/server/node_modules/connect-form/node_modules/formidable/index.js +1 -0
- data/server/node_modules/connect-form/node_modules/formidable/lib/file.js +61 -0
- data/server/node_modules/connect-form/node_modules/formidable/lib/incoming_form.js +362 -0
- data/server/node_modules/connect-form/node_modules/formidable/lib/index.js +3 -0
- data/server/node_modules/connect-form/node_modules/formidable/lib/multipart_parser.js +301 -0
- data/server/node_modules/connect-form/node_modules/formidable/lib/querystring_parser.js +25 -0
- data/server/node_modules/connect-form/node_modules/formidable/lib/util.js +6 -0
- data/server/node_modules/connect-form/node_modules/formidable/package.json +19 -0
- data/server/node_modules/connect-form/node_modules/formidable/test/common.js +20 -0
- data/server/node_modules/connect-form/node_modules/formidable/test/fast/test-incoming-form.js +45 -0
- data/server/node_modules/connect-form/node_modules/formidable/test/fixture/file/: // ? % * | /" < > . /342/230/203 ; ' @ # $ ^ & ( ) - _ = + { } [ ] ` ~.txt" +1 -0
- data/server/node_modules/connect-form/node_modules/formidable/test/fixture/http/special-chars-in-filename/info.md +3 -0
- data/server/node_modules/connect-form/node_modules/formidable/test/fixture/http/special-chars-in-filename/osx-chrome-13.http +36 -0
- data/server/node_modules/connect-form/node_modules/formidable/test/fixture/http/special-chars-in-filename/osx-firefox-3.6.http +24 -0
- data/server/node_modules/connect-form/node_modules/formidable/test/fixture/http/special-chars-in-filename/osx-safari-5.http +23 -0
- data/server/node_modules/connect-form/node_modules/formidable/test/fixture/http/special-chars-in-filename/xp-chrome-12.http +33 -0
- data/server/node_modules/connect-form/node_modules/formidable/test/fixture/http/special-chars-in-filename/xp-ie-7.http +22 -0
- data/server/node_modules/connect-form/node_modules/formidable/test/fixture/http/special-chars-in-filename/xp-ie-8.http +22 -0
- data/server/node_modules/connect-form/node_modules/formidable/test/fixture/http/special-chars-in-filename/xp-safari-5.http +22 -0
- data/server/node_modules/connect-form/node_modules/formidable/test/fixture/js/special-chars-in-filename.js +21 -0
- data/server/node_modules/connect-form/node_modules/formidable/test/fixture/multi_video.upload +0 -0
- data/server/node_modules/connect-form/node_modules/formidable/test/fixture/multipart.js +72 -0
- data/server/node_modules/connect-form/node_modules/formidable/test/legacy/common.js +24 -0
- data/server/node_modules/connect-form/node_modules/formidable/test/legacy/integration/test-multipart-parser.js +80 -0
- data/server/node_modules/connect-form/node_modules/formidable/test/legacy/simple/test-file.js +104 -0
- data/server/node_modules/connect-form/node_modules/formidable/test/legacy/simple/test-incoming-form.js +715 -0
- data/server/node_modules/connect-form/node_modules/formidable/test/legacy/simple/test-multipart-parser.js +50 -0
- data/server/node_modules/connect-form/node_modules/formidable/test/legacy/simple/test-querystring-parser.js +45 -0
- data/server/node_modules/connect-form/node_modules/formidable/test/legacy/system/test-multi-video-upload.js +72 -0
- data/server/node_modules/connect-form/node_modules/formidable/test/run.js +7 -0
- data/server/node_modules/connect-form/node_modules/formidable/test/slow/test-fixtures.js +84 -0
- data/server/node_modules/connect-form/node_modules/formidable/tool/record.js +47 -0
- data/server/node_modules/connect-form/package.json +9 -0
- data/server/node_modules/connect-form/support/connect/History.md +120 -0
- data/server/node_modules/connect-form/support/connect/Makefile +85 -0
- data/server/node_modules/connect-form/support/connect/README.md +121 -0
- data/server/node_modules/connect-form/support/connect/benchmarks/graph +79 -0
- data/server/node_modules/connect-form/support/connect/benchmarks/hello-world/connect.js +19 -0
- data/server/node_modules/connect-form/support/connect/benchmarks/hello-world/node.js +16 -0
- data/server/node_modules/connect-form/support/connect/benchmarks/hello-world/rack.thin.ru +9 -0
- data/server/node_modules/connect-form/support/connect/benchmarks/hello-world/sinatra.thin.ru +10 -0
- data/server/node_modules/connect-form/support/connect/benchmarks/public/jquery.js +19 -0
- data/server/node_modules/connect-form/support/connect/benchmarks/run +60 -0
- data/server/node_modules/connect-form/support/connect/benchmarks/static/connect.js +10 -0
- data/server/node_modules/connect-form/support/connect/benchmarks/static/node.js +17 -0
- data/server/node_modules/connect-form/support/connect/benchmarks/static/sinatra.thin.ru +10 -0
- data/server/node_modules/connect-form/support/connect/docs/api.html +1973 -0
- data/server/node_modules/connect-form/support/connect/docs/bodyDecoder.1 +27 -0
- data/server/node_modules/connect-form/support/connect/docs/bodyDecoder.html +164 -0
- data/server/node_modules/connect-form/support/connect/docs/bodyDecoder.md +11 -0
- data/server/node_modules/connect-form/support/connect/docs/compiler.1 +66 -0
- data/server/node_modules/connect-form/support/connect/docs/compiler.html +193 -0
- data/server/node_modules/connect-form/support/connect/docs/compiler.md +32 -0
- data/server/node_modules/connect-form/support/connect/docs/conditionalGet.1 +16 -0
- data/server/node_modules/connect-form/support/connect/docs/conditionalGet.html +158 -0
- data/server/node_modules/connect-form/support/connect/docs/conditionalGet.md +7 -0
- data/server/node_modules/connect-form/support/connect/docs/cookieDecoder.1 +27 -0
- data/server/node_modules/connect-form/support/connect/docs/cookieDecoder.html +164 -0
- data/server/node_modules/connect-form/support/connect/docs/cookieDecoder.md +11 -0
- data/server/node_modules/connect-form/support/connect/docs/errorHandler.1 +58 -0
- data/server/node_modules/connect-form/support/connect/docs/errorHandler.html +181 -0
- data/server/node_modules/connect-form/support/connect/docs/errorHandler.md +28 -0
- data/server/node_modules/connect-form/support/connect/docs/format.1 +7 -0
- data/server/node_modules/connect-form/support/connect/docs/format.html +152 -0
- data/server/node_modules/connect-form/support/connect/docs/format.md +3 -0
- data/server/node_modules/connect-form/support/connect/docs/index.1 +260 -0
- data/server/node_modules/connect-form/support/connect/docs/index.html +332 -0
- data/server/node_modules/connect-form/support/connect/docs/index.md +171 -0
- data/server/node_modules/connect-form/support/connect/docs/jsonrpc.1 +62 -0
- data/server/node_modules/connect-form/support/connect/docs/jsonrpc.html +192 -0
- data/server/node_modules/connect-form/support/connect/docs/jsonrpc.md +39 -0
- data/server/node_modules/connect-form/support/connect/docs/layout/api.foot.html +3 -0
- data/server/node_modules/connect-form/support/connect/docs/layout/api.head.html +142 -0
- data/server/node_modules/connect-form/support/connect/docs/lint.1 +102 -0
- data/server/node_modules/connect-form/support/connect/docs/lint.html +232 -0
- data/server/node_modules/connect-form/support/connect/docs/lint.md +79 -0
- data/server/node_modules/connect-form/support/connect/docs/logger.1 +66 -0
- data/server/node_modules/connect-form/support/connect/docs/logger.html +184 -0
- data/server/node_modules/connect-form/support/connect/docs/logger.md +31 -0
- data/server/node_modules/connect-form/support/connect/docs/methodOverride.1 +31 -0
- data/server/node_modules/connect-form/support/connect/docs/methodOverride.html +171 -0
- data/server/node_modules/connect-form/support/connect/docs/methodOverride.md +17 -0
- data/server/node_modules/connect-form/support/connect/docs/responseTime.1 +7 -0
- data/server/node_modules/connect-form/support/connect/docs/responseTime.html +152 -0
- data/server/node_modules/connect-form/support/connect/docs/responseTime.md +3 -0
- data/server/node_modules/connect-form/support/connect/docs/router.1 +75 -0
- data/server/node_modules/connect-form/support/connect/docs/router.html +211 -0
- data/server/node_modules/connect-form/support/connect/docs/router.md +58 -0
- data/server/node_modules/connect-form/support/connect/docs/session.1 +115 -0
- data/server/node_modules/connect-form/support/connect/docs/session.html +214 -0
- data/server/node_modules/connect-form/support/connect/docs/session.md +55 -0
- data/server/node_modules/connect-form/support/connect/docs/staticProvider.1 +28 -0
- data/server/node_modules/connect-form/support/connect/docs/staticProvider.html +162 -0
- data/server/node_modules/connect-form/support/connect/docs/staticProvider.md +11 -0
- data/server/node_modules/connect-form/support/connect/examples/error/app.js +13 -0
- data/server/node_modules/connect-form/support/connect/examples/jsonrpc/app.js +38 -0
- data/server/node_modules/connect-form/support/connect/examples/less/app.js +21 -0
- data/server/node_modules/connect-form/support/connect/examples/less/public/index.html +8 -0
- data/server/node_modules/connect-form/support/connect/examples/less/public/style.less +8 -0
- data/server/node_modules/connect-form/support/connect/examples/lint/app.js +40 -0
- data/server/node_modules/connect-form/support/connect/examples/multitouch/app.js +61 -0
- data/server/node_modules/connect-form/support/connect/examples/multitouch/public/client.js +73 -0
- data/server/node_modules/connect-form/support/connect/examples/multitouch/public/favicon.ico +0 -0
- data/server/node_modules/connect-form/support/connect/examples/multitouch/public/index.html +16 -0
- data/server/node_modules/connect-form/support/connect/examples/multitouch/public/raphael.js +113 -0
- data/server/node_modules/connect-form/support/connect/examples/multitouch/public/style.css +23 -0
- data/server/node_modules/connect-form/support/connect/examples/router/app.js +63 -0
- data/server/node_modules/connect-form/support/connect/examples/sass/app.js +21 -0
- data/server/node_modules/connect-form/support/connect/examples/sass/public/index.html +8 -0
- data/server/node_modules/connect-form/support/connect/examples/sass/public/style.sass +4 -0
- data/server/node_modules/connect-form/support/connect/examples/session/app.js +60 -0
- data/server/node_modules/connect-form/support/connect/examples/stack-middleware/app.js +15 -0
- data/server/node_modules/connect-form/support/connect/examples/stack-middleware/hello.js +13 -0
- data/server/node_modules/connect-form/support/connect/examples/stack-middleware/world.js +13 -0
- data/server/node_modules/connect-form/support/connect/examples/static/app.js +10 -0
- data/server/node_modules/connect-form/support/connect/examples/static/public/style.css +3 -0
- data/server/node_modules/connect-form/support/connect/examples/url-rewrite/app.js +44 -0
- data/server/node_modules/connect-form/support/connect/examples/vhost/app.js +25 -0
- data/server/node_modules/connect-form/support/connect/install.sh +6 -0
- data/server/node_modules/connect-form/support/connect/lib/connect/index.js +309 -0
- data/server/node_modules/connect-form/support/connect/lib/connect/middleware/bodyDecoder.js +69 -0
- data/server/node_modules/connect-form/support/connect/lib/connect/middleware/cache.js +142 -0
- data/server/node_modules/connect-form/support/connect/lib/connect/middleware/cacheManifest.js +71 -0
- data/server/node_modules/connect-form/support/connect/lib/connect/middleware/compiler.js +150 -0
- data/server/node_modules/connect-form/support/connect/lib/connect/middleware/conditionalGet.js +71 -0
- data/server/node_modules/connect-form/support/connect/lib/connect/middleware/cookieDecoder.js +37 -0
- data/server/node_modules/connect-form/support/connect/lib/connect/middleware/errorHandler.js +91 -0
- data/server/node_modules/connect-form/support/connect/lib/connect/middleware/format.js +46 -0
- data/server/node_modules/connect-form/support/connect/lib/connect/middleware/gzip-compress.js +79 -0
- data/server/node_modules/connect-form/support/connect/lib/connect/middleware/gzip-proc.js +73 -0
- data/server/node_modules/connect-form/support/connect/lib/connect/middleware/gzip.js +8 -0
- data/server/node_modules/connect-form/support/connect/lib/connect/middleware/jsonrpc.js +235 -0
- data/server/node_modules/connect-form/support/connect/lib/connect/middleware/lint.js +136 -0
- data/server/node_modules/connect-form/support/connect/lib/connect/middleware/logger.js +107 -0
- data/server/node_modules/connect-form/support/connect/lib/connect/middleware/methodOverride.js +54 -0
- data/server/node_modules/connect-form/support/connect/lib/connect/middleware/pubsub.js +107 -0
- data/server/node_modules/connect-form/support/connect/lib/connect/middleware/repl.js +43 -0
- data/server/node_modules/connect-form/support/connect/lib/connect/middleware/responseTime.js +28 -0
- data/server/node_modules/connect-form/support/connect/lib/connect/middleware/router.js +158 -0
- data/server/node_modules/connect-form/support/connect/lib/connect/middleware/session.js +129 -0
- data/server/node_modules/connect-form/support/connect/lib/connect/middleware/session/memory.js +141 -0
- data/server/node_modules/connect-form/support/connect/lib/connect/middleware/session/session.js +71 -0
- data/server/node_modules/connect-form/support/connect/lib/connect/middleware/session/store.js +59 -0
- data/server/node_modules/connect-form/support/connect/lib/connect/middleware/staticProvider.js +144 -0
- data/server/node_modules/connect-form/support/connect/lib/connect/middleware/vhost.js +43 -0
- data/server/node_modules/connect-form/support/connect/lib/connect/public/error.html +13 -0
- data/server/node_modules/connect-form/support/connect/lib/connect/public/style.css +98 -0
- data/server/node_modules/connect-form/support/connect/lib/connect/response.js +56 -0
- data/server/node_modules/connect-form/support/connect/lib/connect/utils.js +428 -0
- data/server/node_modules/connect-form/support/connect/package.json +21 -0
- data/server/node_modules/connect-form/support/connect/support/highlight.js +26 -0
- data/server/node_modules/connect-form/support/connect/test/bodyDecoder.test.js +69 -0
- data/server/node_modules/connect-form/support/connect/test/compiler.test.js +23 -0
- data/server/node_modules/connect-form/support/connect/test/connect.test.js +187 -0
- data/server/node_modules/connect-form/support/connect/test/cookieDecoder.test.js +31 -0
- data/server/node_modules/connect-form/support/connect/test/errorHandler.test.js +60 -0
- data/server/node_modules/connect-form/support/connect/test/filters/uppercase.js +14 -0
- data/server/node_modules/connect-form/support/connect/test/fixtures/foo.bar.baz.sass +2 -0
- data/server/node_modules/connect-form/support/connect/test/fixtures/index.html +1 -0
- data/server/node_modules/connect-form/support/connect/test/fixtures/some text.txt +1 -0
- data/server/node_modules/connect-form/support/connect/test/fixtures/style.less +2 -0
- data/server/node_modules/connect-form/support/connect/test/fixtures/style.sass +3 -0
- data/server/node_modules/connect-form/support/connect/test/fixtures/user.json +4 -0
- data/server/node_modules/connect-form/support/connect/test/format.test.js +37 -0
- data/server/node_modules/connect-form/support/connect/test/gzip.test.js +55 -0
- data/server/node_modules/connect-form/support/connect/test/helpers/http.js +87 -0
- data/server/node_modules/connect-form/support/connect/test/helpers/index.js +12 -0
- data/server/node_modules/connect-form/support/connect/test/jsonrpc.test.js +225 -0
- data/server/node_modules/connect-form/support/connect/test/logger.test.js +52 -0
- data/server/node_modules/connect-form/support/connect/test/methodOverride.test.js +69 -0
- data/server/node_modules/connect-form/support/connect/test/providers/echo.js +10 -0
- data/server/node_modules/connect-form/support/connect/test/responseTime.test.js +29 -0
- data/server/node_modules/connect-form/support/connect/test/router.test.js +154 -0
- data/server/node_modules/connect-form/support/connect/test/session.test.js +127 -0
- data/server/node_modules/connect-form/support/connect/test/static.test.js +66 -0
- data/server/node_modules/connect-form/support/connect/test/utils.test.js +65 -0
- data/server/node_modules/connect-form/support/connect/test/vhost.test.js +46 -0
- data/server/node_modules/connect-form/support/expresso/History.md +54 -0
- data/server/node_modules/connect-form/support/expresso/Makefile +30 -0
- data/server/node_modules/connect-form/support/expresso/Readme.md +208 -0
- data/server/node_modules/connect-form/support/expresso/bin/expresso +647 -0
- data/server/node_modules/connect-form/support/expresso/lib/bar.js +4 -0
- data/server/node_modules/connect-form/support/expresso/lib/foo.js +16 -0
- data/server/node_modules/connect-form/support/expresso/package.json +9 -0
- data/server/node_modules/connect-form/support/expresso/seed.yml +6 -0
- data/server/node_modules/connect-form/support/expresso/test/assert.test.js +64 -0
- data/server/node_modules/connect-form/support/expresso/test/bar.test.js +12 -0
- data/server/node_modules/connect-form/support/expresso/test/foo.test.js +13 -0
- data/server/node_modules/connect-form/support/expresso/test/http.test.js +61 -0
- data/server/node_modules/connect-form/test/form.test.js +148 -0
- data/server/node_modules/cradle/LICENSE +20 -0
- data/server/node_modules/cradle/Makefile +10 -0
- data/server/node_modules/cradle/README.md +377 -0
- data/server/node_modules/cradle/lib/cradle.js +688 -0
- data/server/node_modules/cradle/lib/cradle/cache.js +102 -0
- data/server/node_modules/cradle/lib/cradle/response.js +127 -0
- data/server/node_modules/cradle/node_modules/vargs/LICENSE +20 -0
- data/server/node_modules/cradle/node_modules/vargs/README.md +34 -0
- data/server/node_modules/cradle/node_modules/vargs/lib/vargs.js +70 -0
- data/server/node_modules/cradle/node_modules/vargs/package.json +12 -0
- data/server/node_modules/cradle/node_modules/vows/LICENSE +20 -0
- data/server/node_modules/cradle/node_modules/vows/Makefile +7 -0
- data/server/node_modules/cradle/node_modules/vows/README.md +39 -0
- data/server/node_modules/cradle/node_modules/vows/bin/vows +515 -0
- data/server/node_modules/cradle/node_modules/vows/lib/assert/error.js +27 -0
- data/server/node_modules/cradle/node_modules/vows/lib/assert/macros.js +215 -0
- data/server/node_modules/cradle/node_modules/vows/lib/assert/utils.js +77 -0
- data/server/node_modules/cradle/node_modules/vows/lib/vows.js +193 -0
- data/server/node_modules/cradle/node_modules/vows/lib/vows/console.js +131 -0
- data/server/node_modules/cradle/node_modules/vows/lib/vows/context.js +55 -0
- data/server/node_modules/cradle/node_modules/vows/lib/vows/coverage/file.js +29 -0
- data/server/node_modules/cradle/node_modules/vows/lib/vows/coverage/fragments/coverage-foot.html +2 -0
- data/server/node_modules/cradle/node_modules/vows/lib/vows/coverage/fragments/coverage-head.html +61 -0
- data/server/node_modules/cradle/node_modules/vows/lib/vows/coverage/report-html.js +54 -0
- data/server/node_modules/cradle/node_modules/vows/lib/vows/coverage/report-json.js +54 -0
- data/server/node_modules/cradle/node_modules/vows/lib/vows/coverage/report-plain.js +38 -0
- data/server/node_modules/cradle/node_modules/vows/lib/vows/extras.js +28 -0
- data/server/node_modules/cradle/node_modules/vows/lib/vows/reporters/dot-matrix.js +67 -0
- data/server/node_modules/cradle/node_modules/vows/lib/vows/reporters/json.js +16 -0
- data/server/node_modules/cradle/node_modules/vows/lib/vows/reporters/silent.js +8 -0
- data/server/node_modules/cradle/node_modules/vows/lib/vows/reporters/spec.js +44 -0
- data/server/node_modules/cradle/node_modules/vows/lib/vows/reporters/watch.js +39 -0
- data/server/node_modules/cradle/node_modules/vows/lib/vows/reporters/xunit.js +90 -0
- data/server/node_modules/cradle/node_modules/vows/lib/vows/suite.js +319 -0
- data/server/node_modules/cradle/node_modules/vows/node_modules/eyes/LICENSE +20 -0
- data/server/node_modules/cradle/node_modules/vows/node_modules/eyes/Makefile +4 -0
- data/server/node_modules/cradle/node_modules/vows/node_modules/eyes/README.md +72 -0
- data/server/node_modules/cradle/node_modules/vows/node_modules/eyes/lib/eyes.js +233 -0
- data/server/node_modules/cradle/node_modules/vows/node_modules/eyes/package.json +14 -0
- data/server/node_modules/cradle/node_modules/vows/node_modules/eyes/test/eyes-test.js +55 -0
- data/server/node_modules/cradle/node_modules/vows/package.json +14 -0
- data/server/node_modules/cradle/node_modules/vows/test/assert-test.js +135 -0
- data/server/node_modules/cradle/node_modules/vows/test/fixtures/isolate/failing.js +18 -0
- data/server/node_modules/cradle/node_modules/vows/test/fixtures/isolate/log.js +18 -0
- data/server/node_modules/cradle/node_modules/vows/test/fixtures/isolate/passing.js +17 -0
- data/server/node_modules/cradle/node_modules/vows/test/fixtures/isolate/stderr.js +18 -0
- data/server/node_modules/cradle/node_modules/vows/test/isolate-test.js +140 -0
- data/server/node_modules/cradle/node_modules/vows/test/testInherit.js +133 -0
- data/server/node_modules/cradle/node_modules/vows/test/vows-error-test.js +51 -0
- data/server/node_modules/cradle/node_modules/vows/test/vows-test.js +374 -0
- data/server/node_modules/cradle/package.json +14 -0
- data/server/node_modules/cradle/test/cache-test.js +102 -0
- data/server/node_modules/cradle/test/cradle-test.js +651 -0
- data/server/node_modules/cradle/test/fixtures/databases.json +25 -0
- data/server/node_modules/cradle/test/helpers/seed.js +56 -0
- data/server/node_modules/cradle/test/response-test.js +73 -0
- data/server/node_modules/express/History.md +743 -0
- data/server/node_modules/express/LICENSE +22 -0
- data/server/node_modules/express/Makefile +35 -0
- data/server/node_modules/express/Readme.md +143 -0
- data/server/node_modules/express/bin/express +417 -0
- data/server/node_modules/express/index.js +2 -0
- data/server/node_modules/express/lib/express.js +79 -0
- data/server/node_modules/express/lib/http.js +583 -0
- data/server/node_modules/express/lib/https.js +52 -0
- data/server/node_modules/express/lib/request.js +309 -0
- data/server/node_modules/express/lib/response.js +459 -0
- data/server/node_modules/express/lib/router/collection.js +53 -0
- data/server/node_modules/express/lib/router/index.js +398 -0
- data/server/node_modules/express/lib/router/methods.js +70 -0
- data/server/node_modules/express/lib/router/route.js +88 -0
- data/server/node_modules/express/lib/utils.js +139 -0
- data/server/node_modules/express/lib/view.js +457 -0
- data/server/node_modules/express/lib/view/partial.js +40 -0
- data/server/node_modules/express/lib/view/view.js +209 -0
- data/server/node_modules/express/node_modules/connect/LICENSE +24 -0
- data/server/node_modules/express/node_modules/connect/index.js +2 -0
- data/server/node_modules/express/node_modules/connect/lib/cache.js +81 -0
- data/server/node_modules/express/node_modules/connect/lib/connect.js +106 -0
- data/server/node_modules/express/node_modules/connect/lib/http.js +215 -0
- data/server/node_modules/express/node_modules/connect/lib/https.js +47 -0
- data/server/node_modules/express/node_modules/connect/lib/index.js +46 -0
- data/server/node_modules/express/node_modules/connect/lib/middleware/basicAuth.js +93 -0
- data/server/node_modules/express/node_modules/connect/lib/middleware/bodyParser.js +92 -0
- data/server/node_modules/express/node_modules/connect/lib/middleware/compiler.js +163 -0
- data/server/node_modules/express/node_modules/connect/lib/middleware/cookieParser.js +46 -0
- data/server/node_modules/express/node_modules/connect/lib/middleware/csrf.js +105 -0
- data/server/node_modules/express/node_modules/connect/lib/middleware/directory.js +222 -0
- data/server/node_modules/express/node_modules/connect/lib/middleware/errorHandler.js +100 -0
- data/server/node_modules/express/node_modules/connect/lib/middleware/favicon.js +76 -0
- data/server/node_modules/express/node_modules/connect/lib/middleware/limit.js +78 -0
- data/server/node_modules/express/node_modules/connect/lib/middleware/logger.js +299 -0
- data/server/node_modules/express/node_modules/connect/lib/middleware/methodOverride.js +38 -0
- data/server/node_modules/express/node_modules/connect/lib/middleware/profiler.js +100 -0
- data/server/node_modules/express/node_modules/connect/lib/middleware/query.js +40 -0
- data/server/node_modules/express/node_modules/connect/lib/middleware/responseTime.js +34 -0
- data/server/node_modules/express/node_modules/connect/lib/middleware/router.js +379 -0
- data/server/node_modules/express/node_modules/connect/lib/middleware/session.js +346 -0
- data/server/node_modules/express/node_modules/connect/lib/middleware/session/cookie.js +126 -0
- data/server/node_modules/express/node_modules/connect/lib/middleware/session/memory.js +131 -0
- data/server/node_modules/express/node_modules/connect/lib/middleware/session/session.js +137 -0
- data/server/node_modules/express/node_modules/connect/lib/middleware/session/store.js +87 -0
- data/server/node_modules/express/node_modules/connect/lib/middleware/static.js +220 -0
- data/server/node_modules/express/node_modules/connect/lib/middleware/staticCache.js +122 -0
- data/server/node_modules/express/node_modules/connect/lib/middleware/vhost.js +44 -0
- data/server/node_modules/express/node_modules/connect/lib/patch.js +79 -0
- data/server/node_modules/express/node_modules/connect/lib/public/directory.html +75 -0
- data/server/node_modules/express/node_modules/connect/lib/public/error.html +13 -0
- data/server/node_modules/express/node_modules/connect/lib/public/favicon.ico +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_add.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_attach.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_code.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_copy.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_delete.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_edit.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_error.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_excel.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_find.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_gear.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_go.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_green.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_key.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_lightning.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_link.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_paintbrush.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_paste.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_red.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_refresh.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_save.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_acrobat.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_actionscript.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_add.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_c.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_camera.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_cd.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_code.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_code_red.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_coldfusion.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_compressed.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_copy.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_cplusplus.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_csharp.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_cup.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_database.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_delete.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_dvd.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_edit.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_error.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_excel.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_find.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_flash.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_freehand.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_gear.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_get.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_go.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_h.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_horizontal.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_key.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_lightning.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_link.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_magnify.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_medal.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_office.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_paint.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_paintbrush.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_paste.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_php.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_picture.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_powerpoint.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_put.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_ruby.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_stack.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_star.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_swoosh.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_text.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_text_width.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_tux.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_vector.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_visualstudio.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_width.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_word.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_world.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_wrench.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_white_zip.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_word.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/icons/page_world.png +0 -0
- data/server/node_modules/express/node_modules/connect/lib/public/style.css +141 -0
- data/server/node_modules/express/node_modules/connect/lib/utils.js +444 -0
- data/server/node_modules/express/node_modules/connect/package.json +24 -0
- data/server/node_modules/express/node_modules/connect/test.js +39 -0
- data/server/node_modules/express/node_modules/mime/LICENSE +19 -0
- data/server/node_modules/express/node_modules/mime/README.md +50 -0
- data/server/node_modules/express/node_modules/mime/index.js +1 -0
- data/server/node_modules/express/node_modules/mime/mime.js +92 -0
- data/server/node_modules/express/node_modules/mime/mime.types +1479 -0
- data/server/node_modules/express/node_modules/mime/node.types +26 -0
- data/server/node_modules/express/node_modules/mime/package.json +11 -0
- data/server/node_modules/express/node_modules/mime/test.js +80 -0
- data/server/node_modules/express/node_modules/qs/History.md +52 -0
- data/server/node_modules/express/node_modules/qs/Makefile +7 -0
- data/server/node_modules/express/node_modules/qs/Readme.md +49 -0
- data/server/node_modules/express/node_modules/qs/benchmark.js +17 -0
- data/server/node_modules/express/node_modules/qs/examples.js +48 -0
- data/server/node_modules/express/node_modules/qs/index.js +2 -0
- data/server/node_modules/express/node_modules/qs/lib/querystring.js +236 -0
- data/server/node_modules/express/node_modules/qs/package.json +9 -0
- data/server/node_modules/express/node_modules/qs/support/expresso/History.md +128 -0
- data/server/node_modules/express/node_modules/qs/support/expresso/Makefile +53 -0
- data/server/node_modules/express/node_modules/qs/support/expresso/Readme.md +61 -0
- data/server/node_modules/express/node_modules/qs/support/expresso/bin/expresso +856 -0
- data/server/node_modules/express/node_modules/qs/support/expresso/docs/api.html +1080 -0
- data/server/node_modules/express/node_modules/qs/support/expresso/docs/index.html +377 -0
- data/server/node_modules/express/node_modules/qs/support/expresso/docs/index.md +290 -0
- data/server/node_modules/express/node_modules/qs/support/expresso/docs/layout/foot.html +3 -0
- data/server/node_modules/express/node_modules/qs/support/expresso/docs/layout/head.html +42 -0
- data/server/node_modules/express/node_modules/qs/support/expresso/lib/bar.js +4 -0
- data/server/node_modules/express/node_modules/qs/support/expresso/lib/foo.js +16 -0
- data/server/node_modules/express/node_modules/qs/support/expresso/package.json +12 -0
- data/server/node_modules/express/node_modules/qs/support/expresso/test/assert.test.js +91 -0
- data/server/node_modules/express/node_modules/qs/support/expresso/test/async.test.js +12 -0
- data/server/node_modules/express/node_modules/qs/support/expresso/test/bar.test.js +13 -0
- data/server/node_modules/express/node_modules/qs/support/expresso/test/foo.test.js +14 -0
- data/server/node_modules/express/node_modules/qs/support/expresso/test/http.test.js +146 -0
- data/server/node_modules/express/node_modules/qs/support/expresso/test/serial/async.test.js +39 -0
- data/server/node_modules/express/node_modules/qs/support/expresso/test/serial/http.test.js +48 -0
- data/server/node_modules/express/node_modules/qs/support/should/History.md +22 -0
- data/server/node_modules/express/node_modules/qs/support/should/Makefile +6 -0
- data/server/node_modules/express/node_modules/qs/support/should/Readme.md +248 -0
- data/server/node_modules/express/node_modules/qs/support/should/examples/runner.js +53 -0
- data/server/node_modules/express/node_modules/qs/support/should/index.js +2 -0
- data/server/node_modules/express/node_modules/qs/support/should/lib/eql.js +91 -0
- data/server/node_modules/express/node_modules/qs/support/should/lib/should.js +548 -0
- data/server/node_modules/express/node_modules/qs/support/should/package.json +8 -0
- data/server/node_modules/express/node_modules/qs/support/should/test/should.test.js +358 -0
- data/server/node_modules/express/node_modules/qs/test/parse.test.js +156 -0
- data/server/node_modules/express/node_modules/qs/test/stringify.test.js +95 -0
- data/server/node_modules/express/package.json +38 -0
- data/server/node_modules/knox/History.md +41 -0
- data/server/node_modules/knox/Makefile +21 -0
- data/server/node_modules/knox/Readme.md +144 -0
- data/server/node_modules/knox/index.html +483 -0
- data/server/node_modules/knox/index.js +2 -0
- data/server/node_modules/knox/lib/knox/auth.js +190 -0
- data/server/node_modules/knox/lib/knox/client.js +355 -0
- data/server/node_modules/knox/lib/knox/index.js +36 -0
- data/server/node_modules/knox/lib/knox/mime/README.md +19 -0
- data/server/node_modules/knox/lib/knox/mime/index.js +308 -0
- data/server/node_modules/knox/lib/knox/mime/mime.js +308 -0
- data/server/node_modules/knox/lib/knox/mime/package.json +12 -0
- data/server/node_modules/knox/lib/knox/mime/test.js +59 -0
- data/server/node_modules/knox/lib/knox/utils.js +55 -0
- data/server/node_modules/knox/package.json +13 -0
- data/server/node_modules/knox/support/expresso/History.md +87 -0
- data/server/node_modules/knox/support/expresso/Makefile +53 -0
- data/server/node_modules/knox/support/expresso/Readme.md +39 -0
- data/server/node_modules/knox/support/expresso/bin/expresso +835 -0
- data/server/node_modules/knox/support/expresso/docs/api.html +1048 -0
- data/server/node_modules/knox/support/expresso/docs/index.html +373 -0
- data/server/node_modules/knox/support/expresso/docs/index.md +290 -0
- data/server/node_modules/knox/support/expresso/docs/layout/foot.html +3 -0
- data/server/node_modules/knox/support/expresso/docs/layout/head.html +42 -0
- data/server/node_modules/knox/support/expresso/lib/bar.js +4 -0
- data/server/node_modules/knox/support/expresso/lib/foo.js +16 -0
- data/server/node_modules/knox/support/expresso/package.json +9 -0
- data/server/node_modules/knox/support/expresso/test/assert.test.js +84 -0
- data/server/node_modules/knox/support/expresso/test/async.test.js +6 -0
- data/server/node_modules/knox/support/expresso/test/bar.test.js +12 -0
- data/server/node_modules/knox/support/expresso/test/foo.test.js +13 -0
- data/server/node_modules/knox/support/expresso/test/http.test.js +76 -0
- data/server/node_modules/knox/support/expresso/test/serial/async.test.js +38 -0
- data/server/node_modules/knox/support/expresso/test/serial/http.test.js +47 -0
- data/server/node_modules/knox/test/auth.test.js +59 -0
- data/server/node_modules/knox/test/fixtures/user.json +1 -0
- data/server/node_modules/knox/test/knox.test.js +188 -0
- data/server/node_modules/knox/test/utils.test.js +17 -0
- data/server/node_modules/node-uuid/LICENSE.md +3 -0
- data/server/node_modules/node-uuid/README.md +100 -0
- data/server/node_modules/node-uuid/package.json +12 -0
- data/server/node_modules/node-uuid/test/benchmark-native.c +34 -0
- data/server/node_modules/node-uuid/test/benchmark.js +27 -0
- data/server/node_modules/node-uuid/test/test.html +14 -0
- data/server/node_modules/node-uuid/test/test.js +83 -0
- data/server/node_modules/node-uuid/uuid.js +80 -0
- data/server/node_modules/restler/MIT-LICENSE +20 -0
- data/server/node_modules/restler/README.md +147 -0
- data/server/node_modules/restler/bin/restler +23 -0
- data/server/node_modules/restler/index.js +1 -0
- data/server/node_modules/restler/lib/multipartform.js +202 -0
- data/server/node_modules/restler/lib/restler.js +300 -0
- data/server/node_modules/restler/package.json +10 -0
- data/server/node_modules/restler/test/all.js +1 -0
- data/server/node_modules/restler/test/restler.js +148 -0
- data/server/node_modules/restler/test/test_helper.js +144 -0
- data/server/package.json +12 -0
- data/server/vendor/gems/bin/restclient +19 -0
- data/server/vendor/gems/cache/couchrest-1.1.2.gem +0 -0
- data/server/vendor/gems/cache/mime-types-1.16.gem +0 -0
- data/server/vendor/gems/cache/multi_json-1.0.3.gem +0 -0
- data/server/vendor/gems/cache/rest-client-1.6.7.gem +0 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/Gemfile +4 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/LICENSE +176 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/README.md +65 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/Rakefile +38 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/THANKS.md +21 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/VERSION +1 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/couchrest.gemspec +34 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/examples/word_count/markov +38 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/examples/word_count/views/books/chunked-map.js +3 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/examples/word_count/views/books/united-map.js +1 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/examples/word_count/views/markov/chain-map.js +6 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/examples/word_count/views/markov/chain-reduce.js +7 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/examples/word_count/views/word_count/count-map.js +6 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/examples/word_count/views/word_count/count-reduce.js +3 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/examples/word_count/word_count.rb +46 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/examples/word_count/word_count_query.rb +40 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/examples/word_count/word_count_views.rb +26 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/history.txt +194 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/init.rb +1 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/lib/couchrest.rb +134 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/lib/couchrest/attributes.rb +89 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/lib/couchrest/commands/generate.rb +71 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/lib/couchrest/commands/push.rb +103 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/lib/couchrest/database.rb +396 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/lib/couchrest/design.rb +91 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/lib/couchrest/document.rb +105 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/lib/couchrest/helper/attachments.rb +29 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/lib/couchrest/helper/pager.rb +103 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/lib/couchrest/helper/streamer.rb +58 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/lib/couchrest/helper/upgrade.rb +51 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/lib/couchrest/middlewares/logger.rb +263 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/lib/couchrest/monkeypatches.rb +25 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/lib/couchrest/rest_api.rb +159 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/lib/couchrest/server.rb +90 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/lib/couchrest/support/inheritable_attributes.rb +107 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/spec/couchrest/couchrest_spec.rb +202 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/spec/couchrest/database_spec.rb +921 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/spec/couchrest/design_spec.rb +206 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/spec/couchrest/document_spec.rb +400 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/spec/couchrest/helpers/pager_spec.rb +115 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/spec/couchrest/helpers/streamer_spec.rb +59 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/spec/couchrest/rest_api_spec.rb +212 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/spec/couchrest/server_spec.rb +35 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/spec/fixtures/attachments/README +3 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/spec/fixtures/attachments/couchdb.png +0 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/spec/fixtures/attachments/test.html +11 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/spec/fixtures/views/lib.js +3 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/spec/fixtures/views/test_view/lib.js +3 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/spec/fixtures/views/test_view/only-map.js +4 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/spec/fixtures/views/test_view/test-map.js +3 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/spec/fixtures/views/test_view/test-reduce.js +3 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/spec/spec.opts +5 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/spec/spec_helper.rb +46 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/utils/remap.rb +27 -0
- data/server/vendor/gems/gems/couchrest-1.1.2/utils/subset.rb +30 -0
- data/server/vendor/gems/gems/mime-types-1.16/History.txt +107 -0
- data/server/vendor/gems/gems/mime-types-1.16/Install.txt +17 -0
- data/server/vendor/gems/gems/mime-types-1.16/Licence.txt +15 -0
- data/server/vendor/gems/gems/mime-types-1.16/Manifest.txt +12 -0
- data/server/vendor/gems/gems/mime-types-1.16/README.txt +28 -0
- data/server/vendor/gems/gems/mime-types-1.16/Rakefile +316 -0
- data/server/vendor/gems/gems/mime-types-1.16/lib/mime/types.rb +751 -0
- data/server/vendor/gems/gems/mime-types-1.16/lib/mime/types.rb.data +1324 -0
- data/server/vendor/gems/gems/mime-types-1.16/mime-types.gemspec +43 -0
- data/server/vendor/gems/gems/mime-types-1.16/setup.rb +1585 -0
- data/server/vendor/gems/gems/mime-types-1.16/test/test_mime_type.rb +356 -0
- data/server/vendor/gems/gems/mime-types-1.16/test/test_mime_types.rb +122 -0
- data/server/vendor/gems/gems/multi_json-1.0.3/Gemfile +7 -0
- data/server/vendor/gems/gems/multi_json-1.0.3/LICENSE.md +20 -0
- data/server/vendor/gems/gems/multi_json-1.0.3/README.md +70 -0
- data/server/vendor/gems/gems/multi_json-1.0.3/Rakefile +23 -0
- data/server/vendor/gems/gems/multi_json-1.0.3/lib/multi_json.rb +74 -0
- data/server/vendor/gems/gems/multi_json-1.0.3/lib/multi_json/engines/json_gem.rb +21 -0
- data/server/vendor/gems/gems/multi_json-1.0.3/lib/multi_json/engines/json_pure.rb +21 -0
- data/server/vendor/gems/gems/multi_json-1.0.3/lib/multi_json/engines/ok_json.rb +48 -0
- data/server/vendor/gems/gems/multi_json-1.0.3/lib/multi_json/engines/yajl.rb +18 -0
- data/server/vendor/gems/gems/multi_json-1.0.3/lib/multi_json/vendor/ok_json.rb +581 -0
- data/server/vendor/gems/gems/multi_json-1.0.3/lib/multi_json/version.rb +3 -0
- data/server/vendor/gems/gems/multi_json-1.0.3/multi_json.gemspec +23 -0
- data/server/vendor/gems/gems/multi_json-1.0.3/spec/helper.rb +11 -0
- data/server/vendor/gems/gems/multi_json-1.0.3/spec/multi_json_spec.rb +134 -0
- data/server/vendor/gems/gems/rest-client-1.6.7/README.rdoc +285 -0
- data/server/vendor/gems/gems/rest-client-1.6.7/Rakefile +66 -0
- data/server/vendor/gems/gems/rest-client-1.6.7/VERSION +1 -0
- data/server/vendor/gems/gems/rest-client-1.6.7/bin/restclient +93 -0
- data/server/vendor/gems/gems/rest-client-1.6.7/history.md +134 -0
- data/server/vendor/gems/gems/rest-client-1.6.7/lib/rest-client.rb +2 -0
- data/server/vendor/gems/gems/rest-client-1.6.7/lib/rest_client.rb +2 -0
- data/server/vendor/gems/gems/rest-client-1.6.7/lib/restclient.rb +174 -0
- data/server/vendor/gems/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb +106 -0
- data/server/vendor/gems/gems/rest-client-1.6.7/lib/restclient/exceptions.rb +193 -0
- data/server/vendor/gems/gems/rest-client-1.6.7/lib/restclient/net_http_ext.rb +55 -0
- data/server/vendor/gems/gems/rest-client-1.6.7/lib/restclient/payload.rb +235 -0
- data/server/vendor/gems/gems/rest-client-1.6.7/lib/restclient/raw_response.rb +34 -0
- data/server/vendor/gems/gems/rest-client-1.6.7/lib/restclient/request.rb +316 -0
- data/server/vendor/gems/gems/rest-client-1.6.7/lib/restclient/resource.rb +169 -0
- data/server/vendor/gems/gems/rest-client-1.6.7/lib/restclient/response.rb +24 -0
- data/server/vendor/gems/gems/rest-client-1.6.7/spec/abstract_response_spec.rb +85 -0
- data/server/vendor/gems/gems/rest-client-1.6.7/spec/base.rb +16 -0
- data/server/vendor/gems/gems/rest-client-1.6.7/spec/exceptions_spec.rb +98 -0
- data/server/vendor/gems/gems/rest-client-1.6.7/spec/integration/certs/equifax.crt +19 -0
- data/server/vendor/gems/gems/rest-client-1.6.7/spec/integration/certs/verisign.crt +14 -0
- data/server/vendor/gems/gems/rest-client-1.6.7/spec/integration/request_spec.rb +25 -0
- data/server/vendor/gems/gems/rest-client-1.6.7/spec/integration_spec.rb +38 -0
- data/server/vendor/gems/gems/rest-client-1.6.7/spec/master_shake.jpg +0 -0
- data/server/vendor/gems/gems/rest-client-1.6.7/spec/payload_spec.rb +234 -0
- data/server/vendor/gems/gems/rest-client-1.6.7/spec/raw_response_spec.rb +17 -0
- data/server/vendor/gems/gems/rest-client-1.6.7/spec/request2_spec.rb +40 -0
- data/server/vendor/gems/gems/rest-client-1.6.7/spec/request_spec.rb +529 -0
- data/server/vendor/gems/gems/rest-client-1.6.7/spec/resource_spec.rb +134 -0
- data/server/vendor/gems/gems/rest-client-1.6.7/spec/response_spec.rb +169 -0
- data/server/vendor/gems/gems/rest-client-1.6.7/spec/restclient_spec.rb +73 -0
- data/server/vendor/gems/specifications/couchrest-1.1.2.gemspec +43 -0
- data/server/vendor/gems/specifications/mime-types-1.16.gemspec +42 -0
- data/server/vendor/gems/specifications/multi_json-1.0.3.gemspec +40 -0
- data/server/vendor/gems/specifications/rest-client-1.6.7.gemspec +37 -0
- data/server/web.js +93 -0
- metadata +633 -7
@@ -0,0 +1,377 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<title>Expresso - TDD Framework For Node</title>
|
4
|
+
<style>
|
5
|
+
body {
|
6
|
+
font: 13px/1.4 "Helvetica", "Lucida Grande", Arial, sans-serif;
|
7
|
+
text-align: center;
|
8
|
+
}
|
9
|
+
#ribbon {
|
10
|
+
position: absolute;
|
11
|
+
top: 0;
|
12
|
+
right: 0;
|
13
|
+
z-index: 10;
|
14
|
+
}
|
15
|
+
#wrapper {
|
16
|
+
margin: 0 auto;
|
17
|
+
padding: 50px 80px;
|
18
|
+
width: 700px;
|
19
|
+
text-align: left;
|
20
|
+
}
|
21
|
+
h1, h2, h3 {
|
22
|
+
margin: 25px 0 15px 0;
|
23
|
+
}
|
24
|
+
h1 {
|
25
|
+
font-size: 35px;
|
26
|
+
}
|
27
|
+
pre {
|
28
|
+
margin: 0 5px;
|
29
|
+
padding: 15px;
|
30
|
+
border: 1px solid #eee;
|
31
|
+
}
|
32
|
+
a {
|
33
|
+
color: #00aaff;
|
34
|
+
}
|
35
|
+
</style>
|
36
|
+
</head>
|
37
|
+
<body>
|
38
|
+
<a href="http://github.com/visionmedia/expresso">
|
39
|
+
<img alt="Fork me on GitHub" id="ribbon" src="http://s3.amazonaws.com/github/ribbons/forkme_right_white_ffffff.png" />
|
40
|
+
</a>
|
41
|
+
<div id="wrapper">
|
42
|
+
<h1>Expresso</h1>
|
43
|
+
<div class='mp'>
|
44
|
+
<h2 id="NAME">NAME</h2>
|
45
|
+
<p class="man-name">
|
46
|
+
<code>index</code>
|
47
|
+
</p>
|
48
|
+
<p><a href="http://github.com/visionmedia/expresso">Expresso</a> is a JavaScript <a href="http://en.wikipedia.org/wiki/Test-driven_development">TDD</a> framework written for <a href="http://nodejs.org">nodejs</a>. Expresso is extremely fast, and is packed with features such as additional assertion methods, code coverage reporting, CI support, and more.</p>
|
49
|
+
|
50
|
+
<h2 id="Features">Features</h2>
|
51
|
+
|
52
|
+
<ul>
|
53
|
+
<li>light-weight</li>
|
54
|
+
<li>intuitive async support</li>
|
55
|
+
<li>intuitive test runner executable</li>
|
56
|
+
<li>test coverage support and reporting via <a href="http://github.com/visionmedia/node-jscoverage">node-jscoverage</a></li>
|
57
|
+
<li>uses and extends the core <em>assert</em> module</li>
|
58
|
+
<li><code>assert.eql()</code> alias of <code>assert.deepEqual()</code></li>
|
59
|
+
<li><code>assert.response()</code> http response utility</li>
|
60
|
+
<li><code>assert.includes()</code></li>
|
61
|
+
<li><code>assert.isNull()</code></li>
|
62
|
+
<li><code>assert.isUndefined()</code></li>
|
63
|
+
<li><code>assert.isNotNull()</code></li>
|
64
|
+
<li><code>assert.isDefined()</code></li>
|
65
|
+
<li><code>assert.match()</code></li>
|
66
|
+
<li><code>assert.length()</code></li>
|
67
|
+
</ul>
|
68
|
+
|
69
|
+
|
70
|
+
<h2 id="Installation">Installation</h2>
|
71
|
+
|
72
|
+
<p>To install both expresso <em>and</em> node-jscoverage run
|
73
|
+
the command below, which will first compile node-jscoverage:</p>
|
74
|
+
|
75
|
+
<pre><code>$ make install
|
76
|
+
</code></pre>
|
77
|
+
|
78
|
+
<p>To install expresso alone without coverage reporting run:</p>
|
79
|
+
|
80
|
+
<pre><code>$ make install-expresso
|
81
|
+
</code></pre>
|
82
|
+
|
83
|
+
<p>Install via npm:</p>
|
84
|
+
|
85
|
+
<pre><code>$ npm install expresso
|
86
|
+
</code></pre>
|
87
|
+
|
88
|
+
<h2 id="Examples">Examples</h2>
|
89
|
+
|
90
|
+
<p>To define tests we simply export several functions:</p>
|
91
|
+
|
92
|
+
<pre><code>exports['test String#length'] = function(){
|
93
|
+
assert.equal(6, 'foobar'.length);
|
94
|
+
};
|
95
|
+
</code></pre>
|
96
|
+
|
97
|
+
<p>Alternatively for large numbers of tests you may want to
|
98
|
+
export your own object containing the tests, however this
|
99
|
+
is essentially the as above:</p>
|
100
|
+
|
101
|
+
<pre><code>module.exports = {
|
102
|
+
'test String#length': function(){
|
103
|
+
assert.equal(6, 'foobar'.length);
|
104
|
+
}
|
105
|
+
};
|
106
|
+
</code></pre>
|
107
|
+
|
108
|
+
<p>If you prefer not to use quoted keys:</p>
|
109
|
+
|
110
|
+
<pre><code>exports.testsStringLength = function(){
|
111
|
+
assert.equal(6, 'foobar'.length);
|
112
|
+
};
|
113
|
+
</code></pre>
|
114
|
+
|
115
|
+
<p>The argument passed to each callback is <em>beforeExit</em>,
|
116
|
+
which is typically used to assert that callbacks have been
|
117
|
+
invoked.</p>
|
118
|
+
|
119
|
+
<pre><code>exports.testAsync = function(beforeExit){
|
120
|
+
var n = 0;
|
121
|
+
setTimeout(function(){
|
122
|
+
++n;
|
123
|
+
assert.ok(true);
|
124
|
+
}, 200);
|
125
|
+
setTimeout(function(){
|
126
|
+
++n;
|
127
|
+
assert.ok(true);
|
128
|
+
}, 200);
|
129
|
+
beforeExit(function(){
|
130
|
+
assert.equal(2, n, 'Ensure both timeouts are called');
|
131
|
+
});
|
132
|
+
};
|
133
|
+
</code></pre>
|
134
|
+
|
135
|
+
<h2 id="Assert-Utilities">Assert Utilities</h2>
|
136
|
+
|
137
|
+
<h3 id="assert-isNull-val-msg-">assert.isNull(val[, msg])</h3>
|
138
|
+
|
139
|
+
<p>Asserts that the given <em>val</em> is <em>null</em>.</p>
|
140
|
+
|
141
|
+
<pre><code>assert.isNull(null);
|
142
|
+
</code></pre>
|
143
|
+
|
144
|
+
<h3 id="assert-isNotNull-val-msg-">assert.isNotNull(val[, msg])</h3>
|
145
|
+
|
146
|
+
<p>Asserts that the given <em>val</em> is not <em>null</em>.</p>
|
147
|
+
|
148
|
+
<pre><code>assert.isNotNull(undefined);
|
149
|
+
assert.isNotNull(false);
|
150
|
+
</code></pre>
|
151
|
+
|
152
|
+
<h3 id="assert-isUndefined-val-msg-">assert.isUndefined(val[, msg])</h3>
|
153
|
+
|
154
|
+
<p>Asserts that the given <em>val</em> is <em>undefined</em>.</p>
|
155
|
+
|
156
|
+
<pre><code>assert.isUndefined(undefined);
|
157
|
+
</code></pre>
|
158
|
+
|
159
|
+
<h3 id="assert-isDefined-val-msg-">assert.isDefined(val[, msg])</h3>
|
160
|
+
|
161
|
+
<p>Asserts that the given <em>val</em> is not <em>undefined</em>.</p>
|
162
|
+
|
163
|
+
<pre><code>assert.isDefined(null);
|
164
|
+
assert.isDefined(false);
|
165
|
+
</code></pre>
|
166
|
+
|
167
|
+
<h3 id="assert-match-str-regexp-msg-">assert.match(str, regexp[, msg])</h3>
|
168
|
+
|
169
|
+
<p>Asserts that the given <em>str</em> matches <em>regexp</em>.</p>
|
170
|
+
|
171
|
+
<pre><code>assert.match('foobar', /^foo(bar)?/);
|
172
|
+
assert.match('foo', /^foo(bar)?/);
|
173
|
+
</code></pre>
|
174
|
+
|
175
|
+
<h3 id="assert-length-val-n-msg-">assert.length(val, n[, msg])</h3>
|
176
|
+
|
177
|
+
<p>Assert that the given <em>val</em> has a length of <em>n</em>.</p>
|
178
|
+
|
179
|
+
<pre><code>assert.length([1,2,3], 3);
|
180
|
+
assert.length('foo', 3);
|
181
|
+
</code></pre>
|
182
|
+
|
183
|
+
<h3 id="assert-type-obj-type-msg-">assert.type(obj, type[, msg])</h3>
|
184
|
+
|
185
|
+
<p>Assert that the given <em>obj</em> is typeof <em>type</em>.</p>
|
186
|
+
|
187
|
+
<pre><code>assert.type(3, 'number');
|
188
|
+
</code></pre>
|
189
|
+
|
190
|
+
<h3 id="assert-eql-a-b-msg-">assert.eql(a, b[, msg])</h3>
|
191
|
+
|
192
|
+
<p>Assert that object <em>b</em> is equal to object <em>a</em>. This is an
|
193
|
+
alias for the core <em>assert.deepEqual()</em> method which does complex
|
194
|
+
comparisons, opposed to <em>assert.equal()</em> which uses <em>==</em>.</p>
|
195
|
+
|
196
|
+
<pre><code>assert.eql('foo', 'foo');
|
197
|
+
assert.eql([1,2], [1,2]);
|
198
|
+
assert.eql({ foo: 'bar' }, { foo: 'bar' });
|
199
|
+
</code></pre>
|
200
|
+
|
201
|
+
<h3 id="assert-includes-obj-val-msg-">assert.includes(obj, val[, msg])</h3>
|
202
|
+
|
203
|
+
<p>Assert that <em>obj</em> is within <em>val</em>. This method supports <em>Array_s
|
204
|
+
and </em>Strings_s.</p>
|
205
|
+
|
206
|
+
<pre><code>assert.includes([1,2,3], 3);
|
207
|
+
assert.includes('foobar', 'foo');
|
208
|
+
assert.includes('foobar', 'bar');
|
209
|
+
</code></pre>
|
210
|
+
|
211
|
+
<h3 id="assert-response-server-req-res-fn-msg-fn-">assert.response(server, req, res|fn[, msg|fn])</h3>
|
212
|
+
|
213
|
+
<p>Performs assertions on the given <em>server</em>, which should <em>not</em> call
|
214
|
+
listen(), as this is handled internally by expresso and the server
|
215
|
+
is killed after all responses have completed. This method works with
|
216
|
+
any <em>http.Server</em> instance, so <em>Connect</em> and <em>Express</em> servers will work
|
217
|
+
as well.</p>
|
218
|
+
|
219
|
+
<p>The <em>req</em> object may contain:</p>
|
220
|
+
|
221
|
+
<ul>
|
222
|
+
<li><em>url</em> request url</li>
|
223
|
+
<li><em>timeout</em> timeout in milliseconds</li>
|
224
|
+
<li><em>method</em> HTTP method</li>
|
225
|
+
<li><em>data</em> request body</li>
|
226
|
+
<li><em>headers</em> headers object</li>
|
227
|
+
</ul>
|
228
|
+
|
229
|
+
|
230
|
+
<p>The <em>res</em> object may be a callback function which
|
231
|
+
receives the response for assertions, or an object
|
232
|
+
which is then used to perform several assertions
|
233
|
+
on the response with the following properties:</p>
|
234
|
+
|
235
|
+
<ul>
|
236
|
+
<li><em>body</em> assert response body (regexp or string)</li>
|
237
|
+
<li><em>status</em> assert response status code</li>
|
238
|
+
<li><em>header</em> assert that all given headers match (unspecified are ignored, use a regexp or string)</li>
|
239
|
+
</ul>
|
240
|
+
|
241
|
+
|
242
|
+
<p>When providing <em>res</em> you may then also pass a callback function
|
243
|
+
as the fourth argument for additional assertions.</p>
|
244
|
+
|
245
|
+
<p>Below are some examples:</p>
|
246
|
+
|
247
|
+
<pre><code>assert.response(server, {
|
248
|
+
url: '/', timeout: 500
|
249
|
+
}, {
|
250
|
+
body: 'foobar'
|
251
|
+
});
|
252
|
+
|
253
|
+
assert.response(server, {
|
254
|
+
url: '/',
|
255
|
+
method: 'GET'
|
256
|
+
},{
|
257
|
+
body: '{"name":"tj"}',
|
258
|
+
status: 200,
|
259
|
+
headers: {
|
260
|
+
'Content-Type': 'application/json; charset=utf8',
|
261
|
+
'X-Foo': 'bar'
|
262
|
+
}
|
263
|
+
});
|
264
|
+
|
265
|
+
assert.response(server, {
|
266
|
+
url: '/foo',
|
267
|
+
method: 'POST',
|
268
|
+
data: 'bar baz'
|
269
|
+
},{
|
270
|
+
body: '/foo bar baz',
|
271
|
+
status: 200
|
272
|
+
}, 'Test POST');
|
273
|
+
|
274
|
+
assert.response(server, {
|
275
|
+
url: '/foo',
|
276
|
+
method: 'POST',
|
277
|
+
data: 'bar baz'
|
278
|
+
},{
|
279
|
+
body: '/foo bar baz',
|
280
|
+
status: 200
|
281
|
+
}, function(res){
|
282
|
+
// All done, do some more tests if needed
|
283
|
+
});
|
284
|
+
|
285
|
+
assert.response(server, {
|
286
|
+
url: '/'
|
287
|
+
}, function(res){
|
288
|
+
assert.ok(res.body.indexOf('tj') >= 0, 'Test assert.response() callback');
|
289
|
+
});
|
290
|
+
</code></pre>
|
291
|
+
|
292
|
+
<h2 id="expresso-1-">expresso(1)</h2>
|
293
|
+
|
294
|
+
<p>To run a single test suite (file) run:</p>
|
295
|
+
|
296
|
+
<pre><code>$ expresso test/a.test.js
|
297
|
+
</code></pre>
|
298
|
+
|
299
|
+
<p>To run several suites we may simply append another:</p>
|
300
|
+
|
301
|
+
<pre><code>$ expresso test/a.test.js test/b.test.js
|
302
|
+
</code></pre>
|
303
|
+
|
304
|
+
<p>We can also pass a whitelist of tests to run within all suites:</p>
|
305
|
+
|
306
|
+
<pre><code>$ expresso --only "foo()" --only "bar()"
|
307
|
+
</code></pre>
|
308
|
+
|
309
|
+
<p>Or several with one call:</p>
|
310
|
+
|
311
|
+
<pre><code>$ expresso --only "foo(), bar()"
|
312
|
+
</code></pre>
|
313
|
+
|
314
|
+
<p>Globbing is of course possible as well:</p>
|
315
|
+
|
316
|
+
<pre><code>$ expresso test/*
|
317
|
+
</code></pre>
|
318
|
+
|
319
|
+
<p>When expresso is called without any files, <em>test/*</em> is the default,
|
320
|
+
so the following is equivalent to the command above:</p>
|
321
|
+
|
322
|
+
<pre><code>$ expresso
|
323
|
+
</code></pre>
|
324
|
+
|
325
|
+
<p>If you wish to unshift a path to <code>require.paths</code> before
|
326
|
+
running tests, you may use the <code>-I</code> or <code>--include</code> flag.</p>
|
327
|
+
|
328
|
+
<pre><code>$ expresso --include lib test/*
|
329
|
+
</code></pre>
|
330
|
+
|
331
|
+
<p>The previous example is typically what I would recommend, since expresso
|
332
|
+
supports test coverage via <a href="http://github.com/visionmedia/node-jscoverage">node-jscoverage</a> (bundled with expresso),
|
333
|
+
so you will need to expose an instrumented version of you library.</p>
|
334
|
+
|
335
|
+
<p>To instrument your library, simply run <a href="http://github.com/visionmedia/node-jscoverage">node-jscoverage</a>,
|
336
|
+
passing the <em>src</em> and <em>dest</em> directories:</p>
|
337
|
+
|
338
|
+
<pre><code>$ node-jscoverage lib lib-cov
|
339
|
+
</code></pre>
|
340
|
+
|
341
|
+
<p>Now we can run our tests again, using the <em>lib-cov</em> directory that has been
|
342
|
+
instrumented with coverage statements:</p>
|
343
|
+
|
344
|
+
<pre><code>$ expresso -I lib-cov test/*
|
345
|
+
</code></pre>
|
346
|
+
|
347
|
+
<p>The output will look similar to below, depending on your test coverage of course :)</p>
|
348
|
+
|
349
|
+
<p><img src="http://dl.dropbox.com/u/6396913/cov.png" alt="node coverage" /></p>
|
350
|
+
|
351
|
+
<p>To make this process easier expresso has the <em>-c</em> or <em>--cov</em> which essentially
|
352
|
+
does the same as the two commands above. The following two commands will
|
353
|
+
run the same tests, however one will auto-instrument, and unshift <em>lib-cov</em>,
|
354
|
+
and the other will run tests normally:</p>
|
355
|
+
|
356
|
+
<pre><code>$ expresso -I lib test/*
|
357
|
+
$ expresso -I lib --cov test/*
|
358
|
+
</code></pre>
|
359
|
+
|
360
|
+
<p>Currently coverage is bound to the <em>lib</em> directory, however in the
|
361
|
+
future <code>--cov</code> will most likely accept a path.</p>
|
362
|
+
|
363
|
+
<h2 id="Async-Exports">Async Exports</h2>
|
364
|
+
|
365
|
+
<p>Sometimes it is useful to postpone running of tests until a callback or event has fired, currently the <em>exports.foo = function(){};</em> syntax is supported for this:</p>
|
366
|
+
|
367
|
+
<pre><code>setTimeout(function(){
|
368
|
+
exports['test async exports'] = function(){
|
369
|
+
assert.ok('wahoo');
|
370
|
+
};
|
371
|
+
}, 100);
|
372
|
+
</code></pre>
|
373
|
+
|
374
|
+
</div>
|
375
|
+
</div>
|
376
|
+
</body>
|
377
|
+
</html>
|
@@ -0,0 +1,290 @@
|
|
1
|
+
|
2
|
+
[Expresso](http://github.com/visionmedia/expresso) is a JavaScript [TDD](http://en.wikipedia.org/wiki/Test-driven_development) framework written for [nodejs](http://nodejs.org). Expresso is extremely fast, and is packed with features such as additional assertion methods, code coverage reporting, CI support, and more.
|
3
|
+
|
4
|
+
## Features
|
5
|
+
|
6
|
+
- light-weight
|
7
|
+
- intuitive async support
|
8
|
+
- intuitive test runner executable
|
9
|
+
- test coverage support and reporting via [node-jscoverage](http://github.com/visionmedia/node-jscoverage)
|
10
|
+
- uses and extends the core _assert_ module
|
11
|
+
- `assert.eql()` alias of `assert.deepEqual()`
|
12
|
+
- `assert.response()` http response utility
|
13
|
+
- `assert.includes()`
|
14
|
+
- `assert.isNull()`
|
15
|
+
- `assert.isUndefined()`
|
16
|
+
- `assert.isNotNull()`
|
17
|
+
- `assert.isDefined()`
|
18
|
+
- `assert.match()`
|
19
|
+
- `assert.length()`
|
20
|
+
|
21
|
+
## Installation
|
22
|
+
|
23
|
+
To install both expresso _and_ node-jscoverage run
|
24
|
+
the command below, which will first compile node-jscoverage:
|
25
|
+
|
26
|
+
$ make install
|
27
|
+
|
28
|
+
To install expresso alone without coverage reporting run:
|
29
|
+
|
30
|
+
$ make install-expresso
|
31
|
+
|
32
|
+
Install via npm:
|
33
|
+
|
34
|
+
$ npm install expresso
|
35
|
+
|
36
|
+
## Examples
|
37
|
+
|
38
|
+
To define tests we simply export several functions:
|
39
|
+
|
40
|
+
exports['test String#length'] = function(){
|
41
|
+
assert.equal(6, 'foobar'.length);
|
42
|
+
};
|
43
|
+
|
44
|
+
Alternatively for large numbers of tests you may want to
|
45
|
+
export your own object containing the tests, however this
|
46
|
+
is essentially the as above:
|
47
|
+
|
48
|
+
module.exports = {
|
49
|
+
'test String#length': function(){
|
50
|
+
assert.equal(6, 'foobar'.length);
|
51
|
+
}
|
52
|
+
};
|
53
|
+
|
54
|
+
If you prefer not to use quoted keys:
|
55
|
+
|
56
|
+
exports.testsStringLength = function(){
|
57
|
+
assert.equal(6, 'foobar'.length);
|
58
|
+
};
|
59
|
+
|
60
|
+
The argument passed to each callback is _beforeExit_,
|
61
|
+
which is typically used to assert that callbacks have been
|
62
|
+
invoked.
|
63
|
+
|
64
|
+
exports.testAsync = function(beforeExit){
|
65
|
+
var n = 0;
|
66
|
+
setTimeout(function(){
|
67
|
+
++n;
|
68
|
+
assert.ok(true);
|
69
|
+
}, 200);
|
70
|
+
setTimeout(function(){
|
71
|
+
++n;
|
72
|
+
assert.ok(true);
|
73
|
+
}, 200);
|
74
|
+
beforeExit(function(){
|
75
|
+
assert.equal(2, n, 'Ensure both timeouts are called');
|
76
|
+
});
|
77
|
+
};
|
78
|
+
|
79
|
+
## Assert Utilities
|
80
|
+
|
81
|
+
### assert.isNull(val[, msg])
|
82
|
+
|
83
|
+
Asserts that the given _val_ is _null_.
|
84
|
+
|
85
|
+
assert.isNull(null);
|
86
|
+
|
87
|
+
### assert.isNotNull(val[, msg])
|
88
|
+
|
89
|
+
Asserts that the given _val_ is not _null_.
|
90
|
+
|
91
|
+
assert.isNotNull(undefined);
|
92
|
+
assert.isNotNull(false);
|
93
|
+
|
94
|
+
### assert.isUndefined(val[, msg])
|
95
|
+
|
96
|
+
Asserts that the given _val_ is _undefined_.
|
97
|
+
|
98
|
+
assert.isUndefined(undefined);
|
99
|
+
|
100
|
+
### assert.isDefined(val[, msg])
|
101
|
+
|
102
|
+
Asserts that the given _val_ is not _undefined_.
|
103
|
+
|
104
|
+
assert.isDefined(null);
|
105
|
+
assert.isDefined(false);
|
106
|
+
|
107
|
+
### assert.match(str, regexp[, msg])
|
108
|
+
|
109
|
+
Asserts that the given _str_ matches _regexp_.
|
110
|
+
|
111
|
+
assert.match('foobar', /^foo(bar)?/);
|
112
|
+
assert.match('foo', /^foo(bar)?/);
|
113
|
+
|
114
|
+
### assert.length(val, n[, msg])
|
115
|
+
|
116
|
+
Assert that the given _val_ has a length of _n_.
|
117
|
+
|
118
|
+
assert.length([1,2,3], 3);
|
119
|
+
assert.length('foo', 3);
|
120
|
+
|
121
|
+
### assert.type(obj, type[, msg])
|
122
|
+
|
123
|
+
Assert that the given _obj_ is typeof _type_.
|
124
|
+
|
125
|
+
assert.type(3, 'number');
|
126
|
+
|
127
|
+
### assert.eql(a, b[, msg])
|
128
|
+
|
129
|
+
Assert that object _b_ is equal to object _a_. This is an
|
130
|
+
alias for the core _assert.deepEqual()_ method which does complex
|
131
|
+
comparisons, opposed to _assert.equal()_ which uses _==_.
|
132
|
+
|
133
|
+
assert.eql('foo', 'foo');
|
134
|
+
assert.eql([1,2], [1,2]);
|
135
|
+
assert.eql({ foo: 'bar' }, { foo: 'bar' });
|
136
|
+
|
137
|
+
### assert.includes(obj, val[, msg])
|
138
|
+
|
139
|
+
Assert that _obj_ is within _val_. This method supports _Array_s
|
140
|
+
and _Strings_s.
|
141
|
+
|
142
|
+
assert.includes([1,2,3], 3);
|
143
|
+
assert.includes('foobar', 'foo');
|
144
|
+
assert.includes('foobar', 'bar');
|
145
|
+
|
146
|
+
### assert.response(server, req, res|fn[, msg|fn])
|
147
|
+
|
148
|
+
Performs assertions on the given _server_, which should _not_ call
|
149
|
+
listen(), as this is handled internally by expresso and the server
|
150
|
+
is killed after all responses have completed. This method works with
|
151
|
+
any _http.Server_ instance, so _Connect_ and _Express_ servers will work
|
152
|
+
as well.
|
153
|
+
|
154
|
+
The _req_ object may contain:
|
155
|
+
|
156
|
+
- _url_ request url
|
157
|
+
- _timeout_ timeout in milliseconds
|
158
|
+
- _method_ HTTP method
|
159
|
+
- _data_ request body
|
160
|
+
- _headers_ headers object
|
161
|
+
|
162
|
+
The _res_ object may be a callback function which
|
163
|
+
receives the response for assertions, or an object
|
164
|
+
which is then used to perform several assertions
|
165
|
+
on the response with the following properties:
|
166
|
+
|
167
|
+
- _body_ assert response body (regexp or string)
|
168
|
+
- _status_ assert response status code
|
169
|
+
- _header_ assert that all given headers match (unspecified are ignored, use a regexp or string)
|
170
|
+
|
171
|
+
When providing _res_ you may then also pass a callback function
|
172
|
+
as the fourth argument for additional assertions.
|
173
|
+
|
174
|
+
Below are some examples:
|
175
|
+
|
176
|
+
assert.response(server, {
|
177
|
+
url: '/', timeout: 500
|
178
|
+
}, {
|
179
|
+
body: 'foobar'
|
180
|
+
});
|
181
|
+
|
182
|
+
assert.response(server, {
|
183
|
+
url: '/',
|
184
|
+
method: 'GET'
|
185
|
+
},{
|
186
|
+
body: '{"name":"tj"}',
|
187
|
+
status: 200,
|
188
|
+
headers: {
|
189
|
+
'Content-Type': 'application/json; charset=utf8',
|
190
|
+
'X-Foo': 'bar'
|
191
|
+
}
|
192
|
+
});
|
193
|
+
|
194
|
+
assert.response(server, {
|
195
|
+
url: '/foo',
|
196
|
+
method: 'POST',
|
197
|
+
data: 'bar baz'
|
198
|
+
},{
|
199
|
+
body: '/foo bar baz',
|
200
|
+
status: 200
|
201
|
+
}, 'Test POST');
|
202
|
+
|
203
|
+
assert.response(server, {
|
204
|
+
url: '/foo',
|
205
|
+
method: 'POST',
|
206
|
+
data: 'bar baz'
|
207
|
+
},{
|
208
|
+
body: '/foo bar baz',
|
209
|
+
status: 200
|
210
|
+
}, function(res){
|
211
|
+
// All done, do some more tests if needed
|
212
|
+
});
|
213
|
+
|
214
|
+
assert.response(server, {
|
215
|
+
url: '/'
|
216
|
+
}, function(res){
|
217
|
+
assert.ok(res.body.indexOf('tj') >= 0, 'Test assert.response() callback');
|
218
|
+
});
|
219
|
+
|
220
|
+
|
221
|
+
## expresso(1)
|
222
|
+
|
223
|
+
To run a single test suite (file) run:
|
224
|
+
|
225
|
+
$ expresso test/a.test.js
|
226
|
+
|
227
|
+
To run several suites we may simply append another:
|
228
|
+
|
229
|
+
$ expresso test/a.test.js test/b.test.js
|
230
|
+
|
231
|
+
We can also pass a whitelist of tests to run within all suites:
|
232
|
+
|
233
|
+
$ expresso --only "foo()" --only "bar()"
|
234
|
+
|
235
|
+
Or several with one call:
|
236
|
+
|
237
|
+
$ expresso --only "foo(), bar()"
|
238
|
+
|
239
|
+
Globbing is of course possible as well:
|
240
|
+
|
241
|
+
$ expresso test/*
|
242
|
+
|
243
|
+
When expresso is called without any files, _test/*_ is the default,
|
244
|
+
so the following is equivalent to the command above:
|
245
|
+
|
246
|
+
$ expresso
|
247
|
+
|
248
|
+
If you wish to unshift a path to `require.paths` before
|
249
|
+
running tests, you may use the `-I` or `--include` flag.
|
250
|
+
|
251
|
+
$ expresso --include lib test/*
|
252
|
+
|
253
|
+
The previous example is typically what I would recommend, since expresso
|
254
|
+
supports test coverage via [node-jscoverage](http://github.com/visionmedia/node-jscoverage) (bundled with expresso),
|
255
|
+
so you will need to expose an instrumented version of you library.
|
256
|
+
|
257
|
+
To instrument your library, simply run [node-jscoverage](http://github.com/visionmedia/node-jscoverage),
|
258
|
+
passing the _src_ and _dest_ directories:
|
259
|
+
|
260
|
+
$ node-jscoverage lib lib-cov
|
261
|
+
|
262
|
+
Now we can run our tests again, using the _lib-cov_ directory that has been
|
263
|
+
instrumented with coverage statements:
|
264
|
+
|
265
|
+
$ expresso -I lib-cov test/*
|
266
|
+
|
267
|
+
The output will look similar to below, depending on your test coverage of course :)
|
268
|
+
|
269
|
+
![node coverage](http://dl.dropbox.com/u/6396913/cov.png)
|
270
|
+
|
271
|
+
To make this process easier expresso has the _-c_ or _--cov_ which essentially
|
272
|
+
does the same as the two commands above. The following two commands will
|
273
|
+
run the same tests, however one will auto-instrument, and unshift _lib-cov_,
|
274
|
+
and the other will run tests normally:
|
275
|
+
|
276
|
+
$ expresso -I lib test/*
|
277
|
+
$ expresso -I lib --cov test/*
|
278
|
+
|
279
|
+
Currently coverage is bound to the _lib_ directory, however in the
|
280
|
+
future `--cov` will most likely accept a path.
|
281
|
+
|
282
|
+
## Async Exports
|
283
|
+
|
284
|
+
Sometimes it is useful to postpone running of tests until a callback or event has fired, currently the _exports.foo = function(){};_ syntax is supported for this:
|
285
|
+
|
286
|
+
setTimeout(function(){
|
287
|
+
exports['test async exports'] = function(){
|
288
|
+
assert.ok('wahoo');
|
289
|
+
};
|
290
|
+
}, 100);
|