Permalink
Browse files

organize dir

  • Loading branch information...
1 parent a85efa5 commit 3e8a59cfa628c89d62bf9a60c357137cd476efe7 @hueniverse committed Feb 10, 2013
Showing 1,186 changed files with 148,901 additions and 58 deletions.
View
@@ -0,0 +1,5 @@
+language: node_js
+
+node_js:
+ - 0.8
+
View
@@ -1,4 +1,4 @@
-Copyright (c) 2011, Eran Hammer-Lahav
+Copyright (c) 2011-2013, Eran Hammer
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -8,14 +8,14 @@ modification, are permitted provided that the following conditions are met:
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- * Neither the name of Eran Hammer-Lahav nor the
+ * Neither the name of Eran Hammer nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL ERAN HAMMER-LAHAV BE LIABLE FOR ANY
+DISCLAIMED. IN NO EVENT SHALL ERAN HAMMER BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
View
@@ -0,0 +1,33 @@
+REPORTER = dot
+
+test:
+ @#lib-cov
+ @NODE_ENV=test ./node_modules/.bin/mocha --recursive --reporter $(REPORTER) --ignore-leaks --timeout 3000
+ @#$(MAKE) rm-lib-cov
+
+tests: test
+
+lib-cov: rm-lib-cov
+ @jscoverage lib lib-cov
+
+rm-lib-cov:
+ @rm -rf ./lib-cov/
+
+test-cov: lib-cov
+ @$(MAKE) test TEST_COV=1 REPORTER=json-cov > coverage.json
+ @$(MAKE) rm-lib-cov
+
+test-cov-html: lib-cov
+ @$(MAKE) test TEST_COV=1 REPORTER=html-cov > coverage.html
+ @$(MAKE) rm-lib-cov
+
+tap: lib-cov
+ @NODE_ENV=test ./node_modules/.bin/mocha -R tap > results.tap
+ @$(MAKE) rm-lib-cov
+
+unit:
+ @#lib-cov
+ @NODE_ENV=test ./node_modules/.bin/mocha --recursive -R xunit --ignore-leaks > results.xml --timeout 3000
+ @#$(MAKE) rm-lib-cov
+
+.PHONY: test tap test-cov test-cov-html unit lib-cov rm-lib-cov
View
@@ -1,18 +0,0 @@
-{
- "name": "postmile.api",
- "description": "Postmile API Server",
- "version": "0.0.4",
- "author": "Eran Hammer <eran@hueniverse.com>",
- "private": true,
- "dependencies": {
- "hapi": "0.14.x",
- "mongodb": "0.9.x",
- "oauth": "0.9.x",
- "oz": "0.0.x",
- "socket.io": "0.8.x",
- "opts": "1.x.x",
- "validator": "0.x.x",
- "emailjs": "0.x.x"
- },
- "engines": { "node": "0.8.x" }
-}
View
View
@@ -0,0 +1 @@
+module.exports = require('./lib');
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -28,7 +28,8 @@ process.on('uncaughtException', function (err) {
internals.onPostHandler = function (request, next) {
- if (!request.response.varieties.obj ||
+ if (request.response instanceof Hapi.Boom ||
+ !request.response.varieties.obj ||
request.response.raw instanceof Array) {
return next();
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -81,16 +81,19 @@ exports.create = function () {
// Load paths
server.route(Routes.endpoints);
- server.route({ method: 'GET', path: '/{path*}', handler: { directory: { path: './static' } } });
+ server.route({ method: 'GET', path: '/{path*}', config: { handler: { directory: { path: './static' } } }, auth: { mode: 'none' } });
// Plugins
- server.plugin().require('./node_modules/hapi-jar', { permissions: { ext: true }, plugin: { options: { password: Vault.jar.password }, isSingleUse: true } }, function (err) {
+ server.plugin().require('../../node_modules/hapi-jar', { permissions: { ext: true }, plugin: { options: { password: Vault.jar.password }, isSingleUse: true } }, function (err) {
- server.plugin().require('./node_modules/crumb', { permissions: { ext: true } }, function (err) {
+ Hapi.utils.assert(!err, 'Failed loading jar plugin');
+ server.plugin().require('../../node_modules/crumb', { permissions: { ext: true } }, function (err) {
- server.plugin().require('./node_modules/scooter', { permissions: { ext: true } }, function (err) {
+ Hapi.utils.assert(!err, 'Failed loading crumb plugin');
+ server.plugin().require('../../node_modules/scooter', { permissions: { ext: true } }, function (err) {
+ Hapi.utils.assert(!err, 'Failed loading scooter plugin');
server.ext('onPostHandler', internals.onPostHandler);
// Start Server
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Diff not rendered.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Diff not rendered.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Diff not rendered.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 3e8a59c

Please sign in to comment.