Permalink
Browse files

Fixed test cases and request.js

  • Loading branch information...
2 parents 852de62 + cb1b824 commit fded58a15d049571fa95eba81f14edb6e18e873c wen committed Mar 14, 2013
Showing with 73 additions and 5 deletions.
  1. +5 −1 .gitignore
  2. +5 −1 .npmignore
  3. +5 −0 .travis.yml
  4. +30 −1 README.md
  5. +13 −1 lib/method.js
  6. +9 −1 lib/request.js
  7. +6 −0 package.json
View
@@ -1,3 +1,7 @@
node_modules
**.txt
-npm_debug.log
+<<<<<<< HEAD
+npm_debug.log
+=======
+npm_debug.log
+>>>>>>> cb1b824aa9bb6a71e5bf597704395773669e108c
View
@@ -1,3 +1,7 @@
node_modules
**.txt
-npm_debug.log
+<<<<<<< HEAD
+npm_debug.log
+=======
+npm_debug.log
+>>>>>>> cb1b824aa9bb6a71e5bf597704395773669e108c
View
@@ -0,0 +1,5 @@
+language: node_js
+node_js:
+ - 0.6
+ - 0.8
+ - 0.10
View
@@ -1,6 +1,10 @@
# webjs: Simple HTTP / TCP development framework.
+<<<<<<< HEAD
For detailed information about this, please visit the [webjs homepage](http://web.c61.me). 如果想获得详细的关于Web.js的信息,请浏览[官方网站](http://web.c61.me)。
+=======
+For detailed information about this, please visit the [webjs homepage](http://webjs.im1996.com). 如果想获得详细的关于Web.js的信息,请浏览[官方网站](http://webjs.im1996.com)。
+>>>>>>> cb1b824aa9bb6a71e5bf597704395773669e108c
# Install
$ npm install webjs
@@ -249,6 +253,7 @@ You can use it to modular your app functions.
# License
+<<<<<<< HEAD
(The MIT License)
Copyright (c) 2010-2012 Will Wen Gunn (甘超阳) &lt;willwengunn@gmail.com&gt;
@@ -270,4 +275,28 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+=======
+ (The MIT License)
+
+ Copyright (c) 2010-2013 Will Wen Gunn (甘超阳) <willwengunn@gmail.com>
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ 'Software'), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+>>>>>>> cb1b824aa9bb6a71e5bf597704395773669e108c
View
@@ -666,7 +666,11 @@ function method (web) {
var ext = self.set('view engine') || 'jade';
var engine = require(ext);
var root = self.set('views');
+<<<<<<< HEAD
var render = EventProxy.create();
+=======
+ var render = new EventProxy();
+>>>>>>> cb1b824aa9bb6a71e5bf597704395773669e108c
if (!/\/$/i.test(root)) root += '/';
render.all('layout', 'body', function (layout, body) {
layout_view.body = body;
@@ -677,7 +681,11 @@ function method (web) {
});
if (opt.layout !== false) {
if (opt.layout === undefined || opt.layout === true) {
+<<<<<<< HEAD
fs.readFile(root + 'layout.' + ext, 'utf-8', function (err, layout) {
+=======
+ fs.readFile(root + 'layout.' + ext, function (err, layout) {
+>>>>>>> cb1b824aa9bb6a71e5bf597704395773669e108c
if (err) return render.trigger('layout', '#{body}');
render.trigger('layout', layout.toString());
});
@@ -714,4 +722,8 @@ function method (web) {
web[middlewares[i]] = connect[middlewares[i]];
}
}
-module.exports.ext = method;
+<<<<<<< HEAD
+module.exports.ext = method;
+=======
+module.exports.ext = method;
+>>>>>>> cb1b824aa9bb6a71e5bf597704395773669e108c
View
@@ -1,4 +1,8 @@
+<<<<<<< HEAD
var mimes = require('./mimes').mimes;
+=======
+var mimes = require('mime').mimes;
+>>>>>>> cb1b824aa9bb6a71e5bf597704395773669e108c
var url = require('url');
var http = require('http');
var util = require('util');
@@ -73,4 +77,8 @@ Request.prototype.__defineGetter__('reqPath', function () {
}
});
-var navites = ["socket","connection","httpVersion","complete","headers","trailers","readable","_paused","_pendings","_endEmitted","url","method","statusCode","httpVersionMajor","httpVersionMinor","upgrade","originalUrl","_parsedUrl","fn","destroy","setEncoding","pause","resume","_emitPending","_emitData","_emitEnd","_addHeaderLine","pipe","setMaxListeners","emit","addListener","on","once","removeListener","removeAllListeners","listeners"];
+<<<<<<< HEAD
+var navites = ["socket","connection","httpVersion","complete","headers","trailers","readable","_paused","_pendings","_endEmitted","url","method","statusCode","httpVersionMajor","httpVersionMinor","upgrade","originalUrl","_parsedUrl","fn","destroy","setEncoding","pause","resume","_emitPending","_emitData","_emitEnd","_addHeaderLine","pipe","setMaxListeners","emit","addListener","on","once","removeListener","removeAllListeners","listeners"];
+=======
+var navites = ["socket","connection","httpVersion","complete","headers","trailers","readable","_paused","_pendings","_endEmitted","url","method","statusCode","httpVersionMajor","httpVersionMinor","upgrade","originalUrl","_parsedUrl","fn","destroy","setEncoding","pause","resume","_emitPending","_emitData","_emitEnd","_addHeaderLine","pipe","setMaxListeners","emit","addListener","on","once","removeListener","removeAllListeners","listeners"];
+>>>>>>> cb1b824aa9bb6a71e5bf597704395773669e108c
View
@@ -34,6 +34,12 @@
"mime": "latest",
"crc": "latest"
},
+<<<<<<< HEAD
+=======
+ "scripts": {
+ "test": "mocha -R spec"
+ },
+>>>>>>> cb1b824aa9bb6a71e5bf597704395773669e108c
"bin": {
"webjs": "./bin/webjs"
},

0 comments on commit fded58a

Please sign in to comment.