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,128 @@
|
|
1
|
+
|
2
|
+
0.7.2 / 2010-12-29
|
3
|
+
==================
|
4
|
+
|
5
|
+
* Fixed problem with `listen()` sometimes firing on the same tick [guillermo]
|
6
|
+
|
7
|
+
0.7.1 / 2010-12-28
|
8
|
+
==================
|
9
|
+
|
10
|
+
* Fixed `assert.request()` client logic into an issue() function, fired upon the `listen()` callback if the server doesn't have an assigned fd. [guillermo]
|
11
|
+
* Removed `--watch`
|
12
|
+
|
13
|
+
0.7.0 / 2010-11-19
|
14
|
+
==================
|
15
|
+
|
16
|
+
* Removed `assert` from test function signature
|
17
|
+
Just use `require('assert')` :) this will make integration
|
18
|
+
with libraries like [should](http://github.com/visionmedia/should) cleaner.
|
19
|
+
|
20
|
+
0.6.4 / 2010-11-02
|
21
|
+
==================
|
22
|
+
|
23
|
+
* Added regexp support to `assert.response()` headers
|
24
|
+
* Removed `waitForExit` code, causing issues
|
25
|
+
|
26
|
+
0.6.3 / 2010-11-02
|
27
|
+
==================
|
28
|
+
|
29
|
+
* Added `assert.response()` body RegExp support
|
30
|
+
* Fixed issue with _--serial_ not executing files sequentially. Closes #42
|
31
|
+
* Fixed hang when modules use `setInterval` - monitor running tests & force the process to quit after all have completed + timeout [Steve Mason]
|
32
|
+
|
33
|
+
0.6.2 / 2010-09-17
|
34
|
+
==================
|
35
|
+
|
36
|
+
* Added _node-jsocoverage_ to package.json (aka will respect npm's binroot)
|
37
|
+
* Added _-t, --timeout_ MS option, defaulting to 2000 ms
|
38
|
+
* Added _-s, --serial_
|
39
|
+
* __PREFIX__ clobberable
|
40
|
+
* Fixed `assert.response()` for latest node
|
41
|
+
* Fixed cov reporting from exploding on empty files
|
42
|
+
|
43
|
+
0.6.2 / 2010-08-03
|
44
|
+
==================
|
45
|
+
|
46
|
+
* Added `assert.type()`
|
47
|
+
* Renamed `assert.isNotUndefined()` to `assert.isDefined()`
|
48
|
+
* Fixed `assert.includes()` param ordering
|
49
|
+
|
50
|
+
0.6.0 / 2010-07-31
|
51
|
+
==================
|
52
|
+
|
53
|
+
* Added _docs/api.html_
|
54
|
+
* Added -w, --watch
|
55
|
+
* Added `Array` support to `assert.includes()`
|
56
|
+
* Added; outputting exceptions immediately. Closes #19
|
57
|
+
* Fixed `assert.includes()` param ordering
|
58
|
+
* Fixed `assert.length()` param ordering
|
59
|
+
* Fixed jscoverage links
|
60
|
+
|
61
|
+
0.5.0 / 2010-07-16
|
62
|
+
==================
|
63
|
+
|
64
|
+
* Added support for async exports
|
65
|
+
* Added timeout support to `assert.response()`. Closes #3
|
66
|
+
* Added 4th arg callback support to `assert.response()`
|
67
|
+
* Added `assert.length()`
|
68
|
+
* Added `assert.match()`
|
69
|
+
* Added `assert.isUndefined()`
|
70
|
+
* Added `assert.isNull()`
|
71
|
+
* Added `assert.includes()`
|
72
|
+
* Added growlnotify support via -g, --growl
|
73
|
+
* Added -o, --only TESTS. Ex: --only "test foo()" --only "test foo(), test bar()"
|
74
|
+
* Removed profanity
|
75
|
+
|
76
|
+
0.4.0 / 2010-07-09
|
77
|
+
==================
|
78
|
+
|
79
|
+
* Added reporting source coverage (respects --boring for color haters)
|
80
|
+
* Added callback to assert.response(). Closes #12
|
81
|
+
* Fixed; putting exceptions to stderr. Closes #13
|
82
|
+
|
83
|
+
0.3.1 / 2010-06-28
|
84
|
+
==================
|
85
|
+
|
86
|
+
* Faster assert.response()
|
87
|
+
|
88
|
+
0.3.0 / 2010-06-28
|
89
|
+
==================
|
90
|
+
|
91
|
+
* Added -p, --port NUM flags
|
92
|
+
* Added assert.response(). Closes #11
|
93
|
+
|
94
|
+
0.2.1 / 2010-06-25
|
95
|
+
==================
|
96
|
+
|
97
|
+
* Fixed issue with reporting object assertions
|
98
|
+
|
99
|
+
0.2.0 / 2010-06-21
|
100
|
+
==================
|
101
|
+
|
102
|
+
* Added `make uninstall`
|
103
|
+
* Added better readdir() failure message
|
104
|
+
* Fixed `make install` for kiwi
|
105
|
+
|
106
|
+
0.1.0 / 2010-06-15
|
107
|
+
==================
|
108
|
+
|
109
|
+
* Added better usage docs via --help
|
110
|
+
* Added better conditional color support
|
111
|
+
* Added pre exit assertion support
|
112
|
+
|
113
|
+
0.0.3 / 2010-06-02
|
114
|
+
==================
|
115
|
+
|
116
|
+
* Added more room for filenames in test coverage
|
117
|
+
* Added boring output support via --boring (suppress colored output)
|
118
|
+
* Fixed async failure exit status
|
119
|
+
|
120
|
+
0.0.2 / 2010-05-30
|
121
|
+
==================
|
122
|
+
|
123
|
+
* Fixed exit status for CI support
|
124
|
+
|
125
|
+
0.0.1 / 2010-05-30
|
126
|
+
==================
|
127
|
+
|
128
|
+
* Initial release
|
@@ -0,0 +1,53 @@
|
|
1
|
+
|
2
|
+
PREFIX ?= /usr/local
|
3
|
+
BIN = bin/expresso
|
4
|
+
JSCOV = deps/jscoverage/node-jscoverage
|
5
|
+
DOCS = docs/index.md
|
6
|
+
HTMLDOCS = $(DOCS:.md=.html)
|
7
|
+
|
8
|
+
test: $(BIN)
|
9
|
+
@./$(BIN) -I lib --growl $(TEST_FLAGS) test/*.test.js
|
10
|
+
|
11
|
+
test-cov:
|
12
|
+
@./$(BIN) -I lib --cov $(TEST_FLAGS) test/*.test.js
|
13
|
+
|
14
|
+
test-serial:
|
15
|
+
@./$(BIN) --serial -I lib $(TEST_FLAGS) test/serial/*.test.js
|
16
|
+
|
17
|
+
install: install-jscov install-expresso
|
18
|
+
|
19
|
+
uninstall:
|
20
|
+
rm -f $(PREFIX)/bin/expresso
|
21
|
+
rm -f $(PREFIX)/bin/node-jscoverage
|
22
|
+
|
23
|
+
install-jscov: $(JSCOV)
|
24
|
+
install $(JSCOV) $(PREFIX)/bin
|
25
|
+
|
26
|
+
install-expresso:
|
27
|
+
install $(BIN) $(PREFIX)/bin
|
28
|
+
|
29
|
+
$(JSCOV):
|
30
|
+
cd deps/jscoverage && ./configure && make && mv jscoverage node-jscoverage
|
31
|
+
|
32
|
+
clean:
|
33
|
+
@cd deps/jscoverage && git clean -fd
|
34
|
+
|
35
|
+
docs: docs/api.html $(HTMLDOCS)
|
36
|
+
|
37
|
+
%.html: %.md
|
38
|
+
@echo "... $< > $@"
|
39
|
+
@ronn -5 --pipe --fragment $< \
|
40
|
+
| cat docs/layout/head.html - docs/layout/foot.html \
|
41
|
+
> $@
|
42
|
+
|
43
|
+
docs/api.html: bin/expresso
|
44
|
+
dox \
|
45
|
+
--title "Expresso" \
|
46
|
+
--ribbon "http://github.com/visionmedia/expresso" \
|
47
|
+
--desc "Insanely fast TDD framework for [node](http://nodejs.org) featuring code coverage reporting." \
|
48
|
+
$< > $@
|
49
|
+
|
50
|
+
docclean:
|
51
|
+
rm -f docs/*.html
|
52
|
+
|
53
|
+
.PHONY: test test-cov install uninstall install-expresso install-jscov clean docs docclean
|
@@ -0,0 +1,61 @@
|
|
1
|
+
|
2
|
+
# Expresso
|
3
|
+
|
4
|
+
TDD framework for [nodejs](http://nodejs.org).
|
5
|
+
|
6
|
+
## Features
|
7
|
+
|
8
|
+
- light-weight
|
9
|
+
- intuitive async support
|
10
|
+
- intuitive test runner executable
|
11
|
+
- test coverage support and reporting
|
12
|
+
- uses the _assert_ module
|
13
|
+
- `assert.eql()` alias of `assert.deepEqual()`
|
14
|
+
- `assert.response()` http response utility
|
15
|
+
- `assert.includes()`
|
16
|
+
- `assert.type()`
|
17
|
+
- `assert.isNull()`
|
18
|
+
- `assert.isUndefined()`
|
19
|
+
- `assert.isNotNull()`
|
20
|
+
- `assert.isDefined()`
|
21
|
+
- `assert.match()`
|
22
|
+
- `assert.length()`
|
23
|
+
|
24
|
+
## Installation
|
25
|
+
|
26
|
+
To install both expresso _and_ node-jscoverage run:
|
27
|
+
|
28
|
+
$ make install
|
29
|
+
|
30
|
+
To install expresso alone (no build required) run:
|
31
|
+
|
32
|
+
$ make install-expresso
|
33
|
+
|
34
|
+
Install via npm:
|
35
|
+
|
36
|
+
$ npm install expresso
|
37
|
+
|
38
|
+
## License
|
39
|
+
|
40
|
+
(The MIT License)
|
41
|
+
|
42
|
+
Copyright (c) 2010 TJ Holowaychuk <tj@vision-media.ca>
|
43
|
+
|
44
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
45
|
+
a copy of this software and associated documentation files (the
|
46
|
+
'Software'), to deal in the Software without restriction, including
|
47
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
48
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
49
|
+
permit persons to whom the Software is furnished to do so, subject to
|
50
|
+
the following conditions:
|
51
|
+
|
52
|
+
The above copyright notice and this permission notice shall be
|
53
|
+
included in all copies or substantial portions of the Software.
|
54
|
+
|
55
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
56
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
57
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
58
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
59
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
60
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
61
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,856 @@
|
|
1
|
+
#!/usr/bin/env node
|
2
|
+
|
3
|
+
/*
|
4
|
+
* Expresso
|
5
|
+
* Copyright(c) TJ Holowaychuk <tj@vision-media.ca>
|
6
|
+
* (MIT Licensed)
|
7
|
+
*/
|
8
|
+
|
9
|
+
/**
|
10
|
+
* Module dependencies.
|
11
|
+
*/
|
12
|
+
|
13
|
+
var assert = require('assert'),
|
14
|
+
childProcess = require('child_process'),
|
15
|
+
http = require('http'),
|
16
|
+
path = require('path'),
|
17
|
+
sys = require('sys'),
|
18
|
+
cwd = process.cwd(),
|
19
|
+
fs = require('fs'),
|
20
|
+
defer;
|
21
|
+
|
22
|
+
/**
|
23
|
+
* Expresso version.
|
24
|
+
*/
|
25
|
+
|
26
|
+
var version = '0.7.2';
|
27
|
+
|
28
|
+
/**
|
29
|
+
* Failure count.
|
30
|
+
*/
|
31
|
+
|
32
|
+
var failures = 0;
|
33
|
+
|
34
|
+
|
35
|
+
/**
|
36
|
+
* Number of tests executed.
|
37
|
+
*/
|
38
|
+
|
39
|
+
var testcount = 0;
|
40
|
+
|
41
|
+
/**
|
42
|
+
* Whitelist of tests to run.
|
43
|
+
*/
|
44
|
+
|
45
|
+
var only = [];
|
46
|
+
|
47
|
+
/**
|
48
|
+
* Boring output.
|
49
|
+
*/
|
50
|
+
|
51
|
+
var boring = false;
|
52
|
+
|
53
|
+
/**
|
54
|
+
* Growl notifications.
|
55
|
+
*/
|
56
|
+
|
57
|
+
var growl = false;
|
58
|
+
|
59
|
+
/**
|
60
|
+
* Server port.
|
61
|
+
*/
|
62
|
+
|
63
|
+
var port = 5555;
|
64
|
+
|
65
|
+
/**
|
66
|
+
* Execute serially.
|
67
|
+
*/
|
68
|
+
|
69
|
+
var serial = false;
|
70
|
+
|
71
|
+
/**
|
72
|
+
* Default timeout.
|
73
|
+
*/
|
74
|
+
|
75
|
+
var timeout = 2000;
|
76
|
+
|
77
|
+
/**
|
78
|
+
* Quiet output.
|
79
|
+
*/
|
80
|
+
|
81
|
+
var quiet = false;
|
82
|
+
|
83
|
+
/**
|
84
|
+
* Usage documentation.
|
85
|
+
*/
|
86
|
+
|
87
|
+
var usage = ''
|
88
|
+
+ '[bold]{Usage}: expresso [options] <file ...>'
|
89
|
+
+ '\n'
|
90
|
+
+ '\n[bold]{Options}:'
|
91
|
+
+ '\n -g, --growl Enable growl notifications'
|
92
|
+
+ '\n -c, --coverage Generate and report test coverage'
|
93
|
+
+ '\n -q, --quiet Suppress coverage report if 100%'
|
94
|
+
+ '\n -t, --timeout MS Timeout in milliseconds, defaults to 2000'
|
95
|
+
+ '\n -r, --require PATH Require the given module path'
|
96
|
+
+ '\n -o, --only TESTS Execute only the comma sperated TESTS (can be set several times)'
|
97
|
+
+ '\n -I, --include PATH Unshift the given path to require.paths'
|
98
|
+
+ '\n -p, --port NUM Port number for test servers, starts at 5555'
|
99
|
+
+ '\n -s, --serial Execute tests serially'
|
100
|
+
+ '\n -b, --boring Suppress ansi-escape colors'
|
101
|
+
+ '\n -v, --version Output version number'
|
102
|
+
+ '\n -h, --help Display help information'
|
103
|
+
+ '\n';
|
104
|
+
|
105
|
+
// Parse arguments
|
106
|
+
|
107
|
+
var files = [],
|
108
|
+
args = process.argv.slice(2);
|
109
|
+
|
110
|
+
while (args.length) {
|
111
|
+
var arg = args.shift();
|
112
|
+
switch (arg) {
|
113
|
+
case '-h':
|
114
|
+
case '--help':
|
115
|
+
print(usage + '\n');
|
116
|
+
process.exit(1);
|
117
|
+
break;
|
118
|
+
case '-v':
|
119
|
+
case '--version':
|
120
|
+
sys.puts(version);
|
121
|
+
process.exit(1);
|
122
|
+
break;
|
123
|
+
case '-i':
|
124
|
+
case '-I':
|
125
|
+
case '--include':
|
126
|
+
if (arg = args.shift()) {
|
127
|
+
require.paths.unshift(arg);
|
128
|
+
} else {
|
129
|
+
throw new Error('--include requires a path');
|
130
|
+
}
|
131
|
+
break;
|
132
|
+
case '-o':
|
133
|
+
case '--only':
|
134
|
+
if (arg = args.shift()) {
|
135
|
+
only = only.concat(arg.split(/ *, */));
|
136
|
+
} else {
|
137
|
+
throw new Error('--only requires comma-separated test names');
|
138
|
+
}
|
139
|
+
break;
|
140
|
+
case '-p':
|
141
|
+
case '--port':
|
142
|
+
if (arg = args.shift()) {
|
143
|
+
port = parseInt(arg, 10);
|
144
|
+
} else {
|
145
|
+
throw new Error('--port requires a number');
|
146
|
+
}
|
147
|
+
break;
|
148
|
+
case '-r':
|
149
|
+
case '--require':
|
150
|
+
if (arg = args.shift()) {
|
151
|
+
require(arg);
|
152
|
+
} else {
|
153
|
+
throw new Error('--require requires a path');
|
154
|
+
}
|
155
|
+
break;
|
156
|
+
case '-t':
|
157
|
+
case '--timeout':
|
158
|
+
if (arg = args.shift()) {
|
159
|
+
timeout = parseInt(arg, 10);
|
160
|
+
} else {
|
161
|
+
throw new Error('--timeout requires an argument');
|
162
|
+
}
|
163
|
+
break;
|
164
|
+
case '-c':
|
165
|
+
case '--cov':
|
166
|
+
case '--coverage':
|
167
|
+
defer = true;
|
168
|
+
childProcess.exec('rm -fr lib-cov && node-jscoverage lib lib-cov', function(err){
|
169
|
+
if (err) throw err;
|
170
|
+
require.paths.unshift('lib-cov');
|
171
|
+
run(files);
|
172
|
+
})
|
173
|
+
break;
|
174
|
+
case '-q':
|
175
|
+
case '--quiet':
|
176
|
+
quiet = true;
|
177
|
+
break;
|
178
|
+
case '-b':
|
179
|
+
case '--boring':
|
180
|
+
boring = true;
|
181
|
+
break;
|
182
|
+
case '-g':
|
183
|
+
case '--growl':
|
184
|
+
growl = true;
|
185
|
+
break;
|
186
|
+
case '-s':
|
187
|
+
case '--serial':
|
188
|
+
serial = true;
|
189
|
+
break;
|
190
|
+
default:
|
191
|
+
if (/\.js$/.test(arg)) {
|
192
|
+
files.push(arg);
|
193
|
+
}
|
194
|
+
break;
|
195
|
+
}
|
196
|
+
}
|
197
|
+
|
198
|
+
/**
|
199
|
+
* Colorized sys.error().
|
200
|
+
*
|
201
|
+
* @param {String} str
|
202
|
+
*/
|
203
|
+
|
204
|
+
function print(str){
|
205
|
+
sys.error(colorize(str));
|
206
|
+
}
|
207
|
+
|
208
|
+
/**
|
209
|
+
* Colorize the given string using ansi-escape sequences.
|
210
|
+
* Disabled when --boring is set.
|
211
|
+
*
|
212
|
+
* @param {String} str
|
213
|
+
* @return {String}
|
214
|
+
*/
|
215
|
+
|
216
|
+
function colorize(str){
|
217
|
+
var colors = { bold: 1, red: 31, green: 32, yellow: 33 };
|
218
|
+
return str.replace(/\[(\w+)\]\{([^]*?)\}/g, function(_, color, str){
|
219
|
+
return boring
|
220
|
+
? str
|
221
|
+
: '\x1B[' + colors[color] + 'm' + str + '\x1B[0m';
|
222
|
+
});
|
223
|
+
}
|
224
|
+
|
225
|
+
// Alias deepEqual as eql for complex equality
|
226
|
+
|
227
|
+
assert.eql = assert.deepEqual;
|
228
|
+
|
229
|
+
/**
|
230
|
+
* Assert that `val` is null.
|
231
|
+
*
|
232
|
+
* @param {Mixed} val
|
233
|
+
* @param {String} msg
|
234
|
+
*/
|
235
|
+
|
236
|
+
assert.isNull = function(val, msg) {
|
237
|
+
assert.strictEqual(null, val, msg);
|
238
|
+
};
|
239
|
+
|
240
|
+
/**
|
241
|
+
* Assert that `val` is not null.
|
242
|
+
*
|
243
|
+
* @param {Mixed} val
|
244
|
+
* @param {String} msg
|
245
|
+
*/
|
246
|
+
|
247
|
+
assert.isNotNull = function(val, msg) {
|
248
|
+
assert.notStrictEqual(null, val, msg);
|
249
|
+
};
|
250
|
+
|
251
|
+
/**
|
252
|
+
* Assert that `val` is undefined.
|
253
|
+
*
|
254
|
+
* @param {Mixed} val
|
255
|
+
* @param {String} msg
|
256
|
+
*/
|
257
|
+
|
258
|
+
assert.isUndefined = function(val, msg) {
|
259
|
+
assert.strictEqual(undefined, val, msg);
|
260
|
+
};
|
261
|
+
|
262
|
+
/**
|
263
|
+
* Assert that `val` is not undefined.
|
264
|
+
*
|
265
|
+
* @param {Mixed} val
|
266
|
+
* @param {String} msg
|
267
|
+
*/
|
268
|
+
|
269
|
+
assert.isDefined = function(val, msg) {
|
270
|
+
assert.notStrictEqual(undefined, val, msg);
|
271
|
+
};
|
272
|
+
|
273
|
+
/**
|
274
|
+
* Assert that `obj` is `type`.
|
275
|
+
*
|
276
|
+
* @param {Mixed} obj
|
277
|
+
* @param {String} type
|
278
|
+
* @api public
|
279
|
+
*/
|
280
|
+
|
281
|
+
assert.type = function(obj, type, msg){
|
282
|
+
var real = typeof obj;
|
283
|
+
msg = msg || 'typeof ' + sys.inspect(obj) + ' is ' + real + ', expected ' + type;
|
284
|
+
assert.ok(type === real, msg);
|
285
|
+
};
|
286
|
+
|
287
|
+
/**
|
288
|
+
* Assert that `str` matches `regexp`.
|
289
|
+
*
|
290
|
+
* @param {String} str
|
291
|
+
* @param {RegExp} regexp
|
292
|
+
* @param {String} msg
|
293
|
+
*/
|
294
|
+
|
295
|
+
assert.match = function(str, regexp, msg) {
|
296
|
+
msg = msg || sys.inspect(str) + ' does not match ' + sys.inspect(regexp);
|
297
|
+
assert.ok(regexp.test(str), msg);
|
298
|
+
};
|
299
|
+
|
300
|
+
/**
|
301
|
+
* Assert that `val` is within `obj`.
|
302
|
+
*
|
303
|
+
* Examples:
|
304
|
+
*
|
305
|
+
* assert.includes('foobar', 'bar');
|
306
|
+
* assert.includes(['foo', 'bar'], 'foo');
|
307
|
+
*
|
308
|
+
* @param {String|Array} obj
|
309
|
+
* @param {Mixed} val
|
310
|
+
* @param {String} msg
|
311
|
+
*/
|
312
|
+
|
313
|
+
assert.includes = function(obj, val, msg) {
|
314
|
+
msg = msg || sys.inspect(obj) + ' does not include ' + sys.inspect(val);
|
315
|
+
assert.ok(obj.indexOf(val) >= 0, msg);
|
316
|
+
};
|
317
|
+
|
318
|
+
/**
|
319
|
+
* Assert length of `val` is `n`.
|
320
|
+
*
|
321
|
+
* @param {Mixed} val
|
322
|
+
* @param {Number} n
|
323
|
+
* @param {String} msg
|
324
|
+
*/
|
325
|
+
|
326
|
+
assert.length = function(val, n, msg) {
|
327
|
+
msg = msg || sys.inspect(val) + ' has length of ' + val.length + ', expected ' + n;
|
328
|
+
assert.equal(n, val.length, msg);
|
329
|
+
};
|
330
|
+
|
331
|
+
/**
|
332
|
+
* Assert response from `server` with
|
333
|
+
* the given `req` object and `res` assertions object.
|
334
|
+
*
|
335
|
+
* @param {Server} server
|
336
|
+
* @param {Object} req
|
337
|
+
* @param {Object|Function} res
|
338
|
+
* @param {String} msg
|
339
|
+
*/
|
340
|
+
|
341
|
+
assert.response = function(server, req, res, msg){
|
342
|
+
// Check that the server is ready or defer
|
343
|
+
if (!server.fd) {
|
344
|
+
if (!('__deferred' in server)) {
|
345
|
+
server.__deferred = [];
|
346
|
+
}
|
347
|
+
server.__deferred.push(arguments);
|
348
|
+
if (!server.__started) {
|
349
|
+
server.listen(server.__port = port++, '127.0.0.1', function(){
|
350
|
+
if (server.__deferred) {
|
351
|
+
process.nextTick(function(){
|
352
|
+
server.__deferred.forEach(function(args){
|
353
|
+
assert.response.apply(assert, args);
|
354
|
+
});
|
355
|
+
});
|
356
|
+
}
|
357
|
+
});
|
358
|
+
server.__started = true;
|
359
|
+
}
|
360
|
+
return;
|
361
|
+
}
|
362
|
+
|
363
|
+
// Callback as third or fourth arg
|
364
|
+
var callback = typeof res === 'function'
|
365
|
+
? res
|
366
|
+
: typeof msg === 'function'
|
367
|
+
? msg
|
368
|
+
: function(){};
|
369
|
+
|
370
|
+
// Default messate to test title
|
371
|
+
if (typeof msg === 'function') msg = null;
|
372
|
+
msg = msg || assert.testTitle;
|
373
|
+
msg += '. ';
|
374
|
+
|
375
|
+
// Pending responses
|
376
|
+
server.__pending = server.__pending || 0;
|
377
|
+
server.__pending++;
|
378
|
+
|
379
|
+
// Create client
|
380
|
+
if (!server.fd) {
|
381
|
+
server.listen(server.__port = port++, '127.0.0.1', issue);
|
382
|
+
} else {
|
383
|
+
issue();
|
384
|
+
}
|
385
|
+
|
386
|
+
function issue(){
|
387
|
+
if (!server.client)
|
388
|
+
server.client = http.createClient(server.__port);
|
389
|
+
|
390
|
+
// Issue request
|
391
|
+
var timer,
|
392
|
+
client = server.client,
|
393
|
+
method = req.method || 'GET',
|
394
|
+
status = res.status || res.statusCode,
|
395
|
+
data = req.data || req.body,
|
396
|
+
requestTimeout = req.timeout || 0;
|
397
|
+
|
398
|
+
var request = client.request(method, req.url, req.headers);
|
399
|
+
|
400
|
+
// Timeout
|
401
|
+
if (requestTimeout) {
|
402
|
+
timer = setTimeout(function(){
|
403
|
+
--server.__pending || server.close();
|
404
|
+
delete req.timeout;
|
405
|
+
assert.fail(msg + 'Request timed out after ' + requestTimeout + 'ms.');
|
406
|
+
}, requestTimeout);
|
407
|
+
}
|
408
|
+
|
409
|
+
if (data) request.write(data);
|
410
|
+
request.on('response', function(response){
|
411
|
+
response.body = '';
|
412
|
+
response.setEncoding('utf8');
|
413
|
+
response.on('data', function(chunk){ response.body += chunk; });
|
414
|
+
response.on('end', function(){
|
415
|
+
--server.__pending || server.close();
|
416
|
+
if (timer) clearTimeout(timer);
|
417
|
+
|
418
|
+
// Assert response body
|
419
|
+
if (res.body !== undefined) {
|
420
|
+
var eql = res.body instanceof RegExp
|
421
|
+
? res.body.test(response.body)
|
422
|
+
: res.body === response.body;
|
423
|
+
assert.ok(
|
424
|
+
eql,
|
425
|
+
msg + 'Invalid response body.\n'
|
426
|
+
+ ' Expected: ' + sys.inspect(res.body) + '\n'
|
427
|
+
+ ' Got: ' + sys.inspect(response.body)
|
428
|
+
);
|
429
|
+
}
|
430
|
+
|
431
|
+
// Assert response status
|
432
|
+
if (typeof status === 'number') {
|
433
|
+
assert.equal(
|
434
|
+
response.statusCode,
|
435
|
+
status,
|
436
|
+
msg + colorize('Invalid response status code.\n'
|
437
|
+
+ ' Expected: [green]{' + status + '}\n'
|
438
|
+
+ ' Got: [red]{' + response.statusCode + '}')
|
439
|
+
);
|
440
|
+
}
|
441
|
+
|
442
|
+
// Assert response headers
|
443
|
+
if (res.headers) {
|
444
|
+
var keys = Object.keys(res.headers);
|
445
|
+
for (var i = 0, len = keys.length; i < len; ++i) {
|
446
|
+
var name = keys[i],
|
447
|
+
actual = response.headers[name.toLowerCase()],
|
448
|
+
expected = res.headers[name],
|
449
|
+
eql = expected instanceof RegExp
|
450
|
+
? expected.test(actual)
|
451
|
+
: expected == actual;
|
452
|
+
assert.ok(
|
453
|
+
eql,
|
454
|
+
msg + colorize('Invalid response header [bold]{' + name + '}.\n'
|
455
|
+
+ ' Expected: [green]{' + expected + '}\n'
|
456
|
+
+ ' Got: [red]{' + actual + '}')
|
457
|
+
);
|
458
|
+
}
|
459
|
+
}
|
460
|
+
|
461
|
+
// Callback
|
462
|
+
callback(response);
|
463
|
+
});
|
464
|
+
});
|
465
|
+
request.end();
|
466
|
+
}
|
467
|
+
};
|
468
|
+
|
469
|
+
/**
|
470
|
+
* Pad the given string to the maximum width provided.
|
471
|
+
*
|
472
|
+
* @param {String} str
|
473
|
+
* @param {Number} width
|
474
|
+
* @return {String}
|
475
|
+
*/
|
476
|
+
|
477
|
+
function lpad(str, width) {
|
478
|
+
str = String(str);
|
479
|
+
var n = width - str.length;
|
480
|
+
if (n < 1) return str;
|
481
|
+
while (n--) str = ' ' + str;
|
482
|
+
return str;
|
483
|
+
}
|
484
|
+
|
485
|
+
/**
|
486
|
+
* Pad the given string to the maximum width provided.
|
487
|
+
*
|
488
|
+
* @param {String} str
|
489
|
+
* @param {Number} width
|
490
|
+
* @return {String}
|
491
|
+
*/
|
492
|
+
|
493
|
+
function rpad(str, width) {
|
494
|
+
str = String(str);
|
495
|
+
var n = width - str.length;
|
496
|
+
if (n < 1) return str;
|
497
|
+
while (n--) str = str + ' ';
|
498
|
+
return str;
|
499
|
+
}
|
500
|
+
|
501
|
+
/**
|
502
|
+
* Report test coverage.
|
503
|
+
*
|
504
|
+
* @param {Object} cov
|
505
|
+
*/
|
506
|
+
|
507
|
+
function reportCoverage(cov) {
|
508
|
+
// Stats
|
509
|
+
print('\n [bold]{Test Coverage}\n');
|
510
|
+
var sep = ' +------------------------------------------+----------+------+------+--------+',
|
511
|
+
lastSep = ' +----------+------+------+--------+';
|
512
|
+
sys.puts(sep);
|
513
|
+
sys.puts(' | filename | coverage | LOC | SLOC | missed |');
|
514
|
+
sys.puts(sep);
|
515
|
+
for (var name in cov) {
|
516
|
+
var file = cov[name];
|
517
|
+
if (Array.isArray(file)) {
|
518
|
+
sys.print(' | ' + rpad(name, 40));
|
519
|
+
sys.print(' | ' + lpad(file.coverage.toFixed(2), 8));
|
520
|
+
sys.print(' | ' + lpad(file.LOC, 4));
|
521
|
+
sys.print(' | ' + lpad(file.SLOC, 4));
|
522
|
+
sys.print(' | ' + lpad(file.totalMisses, 6));
|
523
|
+
sys.print(' |\n');
|
524
|
+
}
|
525
|
+
}
|
526
|
+
sys.puts(sep);
|
527
|
+
sys.print(' ' + rpad('', 40));
|
528
|
+
sys.print(' | ' + lpad(cov.coverage.toFixed(2), 8));
|
529
|
+
sys.print(' | ' + lpad(cov.LOC, 4));
|
530
|
+
sys.print(' | ' + lpad(cov.SLOC, 4));
|
531
|
+
sys.print(' | ' + lpad(cov.totalMisses, 6));
|
532
|
+
sys.print(' |\n');
|
533
|
+
sys.puts(lastSep);
|
534
|
+
// Source
|
535
|
+
for (var name in cov) {
|
536
|
+
if (name.match(/\.js$/)) {
|
537
|
+
var file = cov[name];
|
538
|
+
if ((file.coverage < 100) || !quiet) {
|
539
|
+
print('\n [bold]{' + name + '}:');
|
540
|
+
print(file.source);
|
541
|
+
sys.print('\n');
|
542
|
+
}
|
543
|
+
}
|
544
|
+
}
|
545
|
+
}
|
546
|
+
|
547
|
+
/**
|
548
|
+
* Populate code coverage data.
|
549
|
+
*
|
550
|
+
* @param {Object} cov
|
551
|
+
*/
|
552
|
+
|
553
|
+
function populateCoverage(cov) {
|
554
|
+
cov.LOC =
|
555
|
+
cov.SLOC =
|
556
|
+
cov.totalFiles =
|
557
|
+
cov.totalHits =
|
558
|
+
cov.totalMisses =
|
559
|
+
cov.coverage = 0;
|
560
|
+
for (var name in cov) {
|
561
|
+
var file = cov[name];
|
562
|
+
if (Array.isArray(file)) {
|
563
|
+
// Stats
|
564
|
+
++cov.totalFiles;
|
565
|
+
cov.totalHits += file.totalHits = coverage(file, true);
|
566
|
+
cov.totalMisses += file.totalMisses = coverage(file, false);
|
567
|
+
file.totalLines = file.totalHits + file.totalMisses;
|
568
|
+
cov.SLOC += file.SLOC = file.totalLines;
|
569
|
+
if (!file.source) file.source = [];
|
570
|
+
cov.LOC += file.LOC = file.source.length;
|
571
|
+
file.coverage = (file.totalHits / file.totalLines) * 100;
|
572
|
+
// Source
|
573
|
+
var width = file.source.length.toString().length;
|
574
|
+
file.source = file.source.map(function(line, i){
|
575
|
+
++i;
|
576
|
+
var hits = file[i] === 0 ? 0 : (file[i] || ' ');
|
577
|
+
if (!boring) {
|
578
|
+
if (hits === 0) {
|
579
|
+
hits = '\x1b[31m' + hits + '\x1b[0m';
|
580
|
+
line = '\x1b[41m' + line + '\x1b[0m';
|
581
|
+
} else {
|
582
|
+
hits = '\x1b[32m' + hits + '\x1b[0m';
|
583
|
+
}
|
584
|
+
}
|
585
|
+
return '\n ' + lpad(i, width) + ' | ' + hits + ' | ' + line;
|
586
|
+
}).join('');
|
587
|
+
}
|
588
|
+
}
|
589
|
+
cov.coverage = (cov.totalHits / cov.SLOC) * 100;
|
590
|
+
}
|
591
|
+
|
592
|
+
/**
|
593
|
+
* Total coverage for the given file data.
|
594
|
+
*
|
595
|
+
* @param {Array} data
|
596
|
+
* @return {Type}
|
597
|
+
*/
|
598
|
+
|
599
|
+
function coverage(data, val) {
|
600
|
+
var n = 0;
|
601
|
+
for (var i = 0, len = data.length; i < len; ++i) {
|
602
|
+
if (data[i] !== undefined && data[i] == val) ++n;
|
603
|
+
}
|
604
|
+
return n;
|
605
|
+
}
|
606
|
+
|
607
|
+
/**
|
608
|
+
* Test if all files have 100% coverage
|
609
|
+
*
|
610
|
+
* @param {Object} cov
|
611
|
+
* @return {Boolean}
|
612
|
+
*/
|
613
|
+
|
614
|
+
function hasFullCoverage(cov) {
|
615
|
+
for (var name in cov) {
|
616
|
+
var file = cov[name];
|
617
|
+
if (file instanceof Array) {
|
618
|
+
if (file.coverage !== 100) {
|
619
|
+
return false;
|
620
|
+
}
|
621
|
+
}
|
622
|
+
}
|
623
|
+
return true;
|
624
|
+
}
|
625
|
+
|
626
|
+
/**
|
627
|
+
* Run the given test `files`, or try _test/*_.
|
628
|
+
*
|
629
|
+
* @param {Array} files
|
630
|
+
*/
|
631
|
+
|
632
|
+
function run(files) {
|
633
|
+
cursor(false);
|
634
|
+
if (!files.length) {
|
635
|
+
try {
|
636
|
+
files = fs.readdirSync('test').map(function(file){
|
637
|
+
return 'test/' + file;
|
638
|
+
});
|
639
|
+
} catch (err) {
|
640
|
+
print('\n failed to load tests in [bold]{./test}\n');
|
641
|
+
++failures;
|
642
|
+
process.exit(1);
|
643
|
+
}
|
644
|
+
}
|
645
|
+
runFiles(files);
|
646
|
+
}
|
647
|
+
|
648
|
+
/**
|
649
|
+
* Show the cursor when `show` is true, otherwise hide it.
|
650
|
+
*
|
651
|
+
* @param {Boolean} show
|
652
|
+
*/
|
653
|
+
|
654
|
+
function cursor(show) {
|
655
|
+
if (show) {
|
656
|
+
sys.print('\x1b[?25h');
|
657
|
+
} else {
|
658
|
+
sys.print('\x1b[?25l');
|
659
|
+
}
|
660
|
+
}
|
661
|
+
|
662
|
+
/**
|
663
|
+
* Run the given test `files`.
|
664
|
+
*
|
665
|
+
* @param {Array} files
|
666
|
+
*/
|
667
|
+
|
668
|
+
function runFiles(files) {
|
669
|
+
if (serial) {
|
670
|
+
(function next(){
|
671
|
+
if (files.length) {
|
672
|
+
runFile(files.shift(), next);
|
673
|
+
}
|
674
|
+
})();
|
675
|
+
} else {
|
676
|
+
files.forEach(runFile);
|
677
|
+
}
|
678
|
+
}
|
679
|
+
|
680
|
+
/**
|
681
|
+
* Run tests for the given `file`, callback `fn()` when finished.
|
682
|
+
*
|
683
|
+
* @param {String} file
|
684
|
+
* @param {Function} fn
|
685
|
+
*/
|
686
|
+
|
687
|
+
function runFile(file, fn) {
|
688
|
+
if (file.match(/\.js$/)) {
|
689
|
+
var title = path.basename(file),
|
690
|
+
file = path.join(cwd, file),
|
691
|
+
mod = require(file.replace(/\.js$/, ''));
|
692
|
+
(function check(){
|
693
|
+
var len = Object.keys(mod).length;
|
694
|
+
if (len) {
|
695
|
+
runSuite(title, mod, fn);
|
696
|
+
} else {
|
697
|
+
setTimeout(check, 20);
|
698
|
+
}
|
699
|
+
})();
|
700
|
+
}
|
701
|
+
}
|
702
|
+
|
703
|
+
/**
|
704
|
+
* Report `err` for the given `test` and `suite`.
|
705
|
+
*
|
706
|
+
* @param {String} suite
|
707
|
+
* @param {String} test
|
708
|
+
* @param {Error} err
|
709
|
+
*/
|
710
|
+
|
711
|
+
function error(suite, test, err) {
|
712
|
+
++failures;
|
713
|
+
var name = err.name,
|
714
|
+
stack = err.stack ? err.stack.replace(err.name, '') : '',
|
715
|
+
label = test === 'uncaught'
|
716
|
+
? test
|
717
|
+
: suite + ' ' + test;
|
718
|
+
print('\n [bold]{' + label + '}: [red]{' + name + '}' + stack + '\n');
|
719
|
+
}
|
720
|
+
|
721
|
+
/**
|
722
|
+
* Run the given tests, callback `fn()` when finished.
|
723
|
+
*
|
724
|
+
* @param {String} title
|
725
|
+
* @param {Object} tests
|
726
|
+
* @param {Function} fn
|
727
|
+
*/
|
728
|
+
|
729
|
+
var dots = 0;
|
730
|
+
function runSuite(title, tests, fn) {
|
731
|
+
// Keys
|
732
|
+
var keys = only.length
|
733
|
+
? only.slice(0)
|
734
|
+
: Object.keys(tests);
|
735
|
+
|
736
|
+
// Setup
|
737
|
+
var setup = tests.setup || function(fn){ fn(); };
|
738
|
+
|
739
|
+
// Iterate tests
|
740
|
+
(function next(){
|
741
|
+
if (keys.length) {
|
742
|
+
var key,
|
743
|
+
test = tests[key = keys.shift()];
|
744
|
+
// Non-tests
|
745
|
+
if (key === 'setup') return next();
|
746
|
+
|
747
|
+
// Run test
|
748
|
+
if (test) {
|
749
|
+
try {
|
750
|
+
++testcount;
|
751
|
+
assert.testTitle = key;
|
752
|
+
if (serial) {
|
753
|
+
sys.print('.');
|
754
|
+
if (++dots % 25 === 0) sys.print('\n');
|
755
|
+
setup(function(){
|
756
|
+
if (test.length < 1) {
|
757
|
+
test();
|
758
|
+
next();
|
759
|
+
} else {
|
760
|
+
var id = setTimeout(function(){
|
761
|
+
throw new Error("'" + key + "' timed out");
|
762
|
+
}, timeout);
|
763
|
+
test(function(){
|
764
|
+
clearTimeout(id);
|
765
|
+
next();
|
766
|
+
});
|
767
|
+
}
|
768
|
+
});
|
769
|
+
} else {
|
770
|
+
test(function(fn){
|
771
|
+
process.on('beforeExit', function(){
|
772
|
+
try {
|
773
|
+
fn();
|
774
|
+
} catch (err) {
|
775
|
+
error(title, key, err);
|
776
|
+
}
|
777
|
+
});
|
778
|
+
});
|
779
|
+
}
|
780
|
+
} catch (err) {
|
781
|
+
error(title, key, err);
|
782
|
+
}
|
783
|
+
}
|
784
|
+
if (!serial) next();
|
785
|
+
} else if (serial) {
|
786
|
+
fn();
|
787
|
+
}
|
788
|
+
})();
|
789
|
+
}
|
790
|
+
|
791
|
+
/**
|
792
|
+
* Report exceptions.
|
793
|
+
*/
|
794
|
+
|
795
|
+
function report() {
|
796
|
+
cursor(true);
|
797
|
+
process.emit('beforeExit');
|
798
|
+
if (failures) {
|
799
|
+
print('\n [bold]{Failures}: [red]{' + failures + '}\n\n');
|
800
|
+
notify('Failures: ' + failures);
|
801
|
+
} else {
|
802
|
+
if (serial) print('');
|
803
|
+
print('\n [green]{100%} ' + testcount + ' tests\n');
|
804
|
+
notify('100% ok');
|
805
|
+
}
|
806
|
+
if (typeof _$jscoverage === 'object') {
|
807
|
+
populateCoverage(_$jscoverage);
|
808
|
+
if (!hasFullCoverage(_$jscoverage) || !quiet) {
|
809
|
+
reportCoverage(_$jscoverage);
|
810
|
+
}
|
811
|
+
}
|
812
|
+
}
|
813
|
+
|
814
|
+
/**
|
815
|
+
* Growl notify the given `msg`.
|
816
|
+
*
|
817
|
+
* @param {String} msg
|
818
|
+
*/
|
819
|
+
|
820
|
+
function notify(msg) {
|
821
|
+
if (growl) {
|
822
|
+
childProcess.exec('growlnotify -name Expresso -m "' + msg + '"');
|
823
|
+
}
|
824
|
+
}
|
825
|
+
|
826
|
+
// Report uncaught exceptions
|
827
|
+
|
828
|
+
process.on('uncaughtException', function(err){
|
829
|
+
error('uncaught', 'uncaught', err);
|
830
|
+
});
|
831
|
+
|
832
|
+
// Show cursor
|
833
|
+
|
834
|
+
['INT', 'TERM', 'QUIT'].forEach(function(sig){
|
835
|
+
process.on('SIG' + sig, function(){
|
836
|
+
cursor(true);
|
837
|
+
process.exit(1);
|
838
|
+
});
|
839
|
+
});
|
840
|
+
|
841
|
+
// Report test coverage when available
|
842
|
+
// and emit "beforeExit" event to perform
|
843
|
+
// final assertions
|
844
|
+
|
845
|
+
var orig = process.emit;
|
846
|
+
process.emit = function(event){
|
847
|
+
if (event === 'exit') {
|
848
|
+
report();
|
849
|
+
process.reallyExit(failures);
|
850
|
+
}
|
851
|
+
orig.apply(this, arguments);
|
852
|
+
};
|
853
|
+
|
854
|
+
// Run test files
|
855
|
+
|
856
|
+
if (!defer) run(files);
|