From f9c83aa4f5cdf517cfff51c9628f372c27632f80 Mon Sep 17 00:00:00 2001 From: Supernomad Date: Wed, 17 Jun 2015 20:11:56 -0400 Subject: [PATCH 1/7] Added explanation to the gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 0b44c4f..acb284a 100644 --- a/.gitignore +++ b/.gitignore @@ -25,4 +25,6 @@ build/Release # Dependency directory # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git node_modules + +# Temp directory for unit-tests tmp \ No newline at end of file From d91be3198fb3001a9520f6ba46fdf04cc3750c17 Mon Sep 17 00:00:00 2001 From: Supernomad Date: Wed, 17 Jun 2015 22:20:14 -0400 Subject: [PATCH 2/7] Added chunked download route skeleton --- routes/chunked-download-routes.js | 39 +++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 routes/chunked-download-routes.js diff --git a/routes/chunked-download-routes.js b/routes/chunked-download-routes.js new file mode 100644 index 0000000..d7402fa --- /dev/null +++ b/routes/chunked-download-routes.js @@ -0,0 +1,39 @@ +var apiModels = require('./../libs/models/apiModels'), + typeHelper = require('./../libs/helpers/typeHelper'), + stringHelper = require('./../libs/helpers/stringHelper'); + +var debug = false, + routePrefix = "/chunked/download", + io = null, + dataCache = null; + +var routes = { + "get": new apiModels.RouteHandler(routePrefix + "/:downloadId/:index", function (req, res) { + + }), + "post": new apiModels.RouteHandler(routePrefix, function (req, res) { + + }), + "delete": new apiModels.RouteHandler(routePrefix + "/:downloadId", function (req, res) { + + }), + "error": new apiModels.ErrorHandler(function (error, req, res, next) { + + }) +}; + +function configure(cache, storage, options) { + if(typeHelper.isObject(options)) { + if(options.hasOwnProperty('debug') && typeHelper.isBoolean(options.debug)){ + debug = options.debug; + } + if(options.hasOwnProperty('routePrefix') && typeHelper.isString(options.routePrefix)){ + routePrefix = stringHelper.stripTrailingSlashes(options.routePrefix); + } + } + + io = storage; + dataCache = cache; + return routes; +}; +module.exports = configure; \ No newline at end of file From 62d5d88df51640bd45ae59e10d45eef7fde9ff0d Mon Sep 17 00:00:00 2001 From: Supernomad Date: Fri, 19 Jun 2015 13:18:17 -0400 Subject: [PATCH 3/7] Added license badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 058e6ee..c124fa2 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ [![Coverage Status](https://coveralls.io/repos/Supernomad/chunky/badge.svg?branch=master)](https://coveralls.io/r/Supernomad/chunky?branch=master) [![Build Status](https://travis-ci.org/Supernomad/chunky.svg?branch=master)](https://travis-ci.org/Supernomad/chunky) [![Built with Grunt](https://cdn.gruntjs.com/builtwith.png)](http://gruntjs.com/) +[![npm](https://img.shields.io/npm/l/express.svg)]() # chunky An async upload/download node library leveraging express.js and socket.io. Provides standard, chunked, and udp style transfers. From bbaad38f7c7da89b44e565701037536684b9b4d5 Mon Sep 17 00:00:00 2001 From: Supernomad Date: Fri, 19 Jun 2015 13:21:08 -0400 Subject: [PATCH 4/7] Fixed license badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c124fa2..f40aef0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Coverage Status](https://coveralls.io/repos/Supernomad/chunky/badge.svg?branch=master)](https://coveralls.io/r/Supernomad/chunky?branch=master) [![Build Status](https://travis-ci.org/Supernomad/chunky.svg?branch=master)](https://travis-ci.org/Supernomad/chunky) [![Built with Grunt](https://cdn.gruntjs.com/builtwith.png)](http://gruntjs.com/) -[![npm](https://img.shields.io/npm/l/express.svg)]() +[![GitHub license](https://img.shields.io/badge/license-GPL--3.0-green.svg)]() # chunky An async upload/download node library leveraging express.js and socket.io. Provides standard, chunked, and udp style transfers. From 1ff89bb0cd481a0487c233a3306d4bcf01fde939 Mon Sep 17 00:00:00 2001 From: Supernomad Date: Fri, 19 Jun 2015 13:30:00 -0400 Subject: [PATCH 5/7] Moved license badge and added version badge --- README.md | 3 ++- libs/caching/localCache.js | 0 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 libs/caching/localCache.js diff --git a/README.md b/README.md index f40aef0..6050b09 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ +[![GitHub license](https://img.shields.io/badge/license-GPL--3.0-green.svg)]() +[![GitHub version](https://badge.fury.io/gh/supernomad%2Fchunky.svg)](http://badge.fury.io/gh/supernomad%2Fchunky) [![Coverage Status](https://coveralls.io/repos/Supernomad/chunky/badge.svg?branch=master)](https://coveralls.io/r/Supernomad/chunky?branch=master) [![Build Status](https://travis-ci.org/Supernomad/chunky.svg?branch=master)](https://travis-ci.org/Supernomad/chunky) [![Built with Grunt](https://cdn.gruntjs.com/builtwith.png)](http://gruntjs.com/) -[![GitHub license](https://img.shields.io/badge/license-GPL--3.0-green.svg)]() # chunky An async upload/download node library leveraging express.js and socket.io. Provides standard, chunked, and udp style transfers. diff --git a/libs/caching/localCache.js b/libs/caching/localCache.js new file mode 100644 index 0000000..e69de29 From 8cfde39c5a0624d68fa92574211703aea5a072c7 Mon Sep 17 00:00:00 2001 From: Supernomad Date: Fri, 19 Jun 2015 13:31:43 -0400 Subject: [PATCH 6/7] Removed built with grunt badge as its just not needed --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 6050b09..dc0bb5b 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,5 @@ [![GitHub version](https://badge.fury.io/gh/supernomad%2Fchunky.svg)](http://badge.fury.io/gh/supernomad%2Fchunky) [![Coverage Status](https://coveralls.io/repos/Supernomad/chunky/badge.svg?branch=master)](https://coveralls.io/r/Supernomad/chunky?branch=master) [![Build Status](https://travis-ci.org/Supernomad/chunky.svg?branch=master)](https://travis-ci.org/Supernomad/chunky) -[![Built with Grunt](https://cdn.gruntjs.com/builtwith.png)](http://gruntjs.com/) # chunky An async upload/download node library leveraging express.js and socket.io. Provides standard, chunked, and udp style transfers. From 3d7636384a55e6980e2a67e6895c56f671ae977f Mon Sep 17 00:00:00 2001 From: Supernomad Date: Fri, 19 Jun 2015 13:39:02 -0400 Subject: [PATCH 7/7] Updated version to 0.1.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e428815..a9c22cc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "chunky", - "version": "0.0.1", + "version": "0.1.0", "description": "An async upload/download nodejs library leveraging express.js and socket.io. Provides standard, chunked, and udp style transfers.", "main": "chunky.js", "scripts": {