Permalink
Browse files

fixed lint issues, added license file and copyright stamps to files

  • Loading branch information...
1 parent 4220acf commit 2e925cb0a62e649245335c0888f33a8f558f144a @davglass committed Oct 11, 2012
Showing with 41 additions and 7 deletions.
  1. +25 −0 LICENSE
  2. +5 −0 lib/echo.js
  3. +7 −4 lib/scheme.js
  4. +4 −3 package.json
View
25 LICENSE
@@ -0,0 +1,25 @@
+Copyright 2012 Yahoo! Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * 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 the Yahoo! Inc. 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 YAHOO! INC. 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
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
View
@@ -1,3 +1,8 @@
+/*
+Copyright (c) 2012, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://yuilibrary.com/license/
+*/
"use strict";
var scheme = require('./scheme');
View
@@ -1,6 +1,10 @@
+/*
+Copyright (c) 2012, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://yuilibrary.com/license/
+*/
"use strict";
-var path = require('path');
var parse = require('url').parse;
var qs = require('querystring');
var http = require('http');
@@ -25,7 +29,7 @@ exports.get = function (req, res) {
res.end(p.query || '');
};
-exports.delete = function (req, res) {
+exports['delete'] = function (req, res) {
var p = parse(req.url),
code = ((req.method === 'DELETE') ? 200 : 403);
@@ -34,8 +38,7 @@ exports.delete = function (req, res) {
};
var post = function (method, req, res) {
- var p = parse(req.url),
- code = ((req.method === method) ? 200 : 403),
+ var code = ((req.method === method) ? 200 : 403),
data = '',
gotData = false,
sent = false,
View
@@ -6,11 +6,12 @@
"dependencies": {
},
"devDependencies": {
- "jslint": "*",
- "vows": "*"
+ "vows": "*",
+ "yui-lint": "~0.1.1",
+ "jshint": "~0.9.0"
},
"scripts": {
- "pretest": "jslint --node ./lib/*.js",
+ "pretest": "jshint --config ./node_modules/yui-lint/jshint.json ./lib/*.js",
"test": "vows --spec ./tests/*.js"
},
"main": "./lib/echo.js",

0 comments on commit 2e925cb

Please sign in to comment.