Permalink
Browse files

kill the /lib dir and move classes to the top level, simplifying

organization.
use istanbul instead of jscoverage
version bump 0.7 (these versions are not related to kafka versions)
  • Loading branch information...
1 parent 6560d36 commit 2c155bfd47e58246b854c8ba64a38b18bb2ac3be @cainus committed May 5, 2014
View
@@ -16,3 +16,4 @@ node_modules
npm-debug.log
.DS_Store
coverage.html
+coverage
File renamed without changes.
File renamed without changes.
@@ -7,7 +7,7 @@ var OffsetsResponse = require('./OffsetsResponse');
var FetchRequest = require('./FetchRequest');
var OffsetsRequest = require('./OffsetsRequest');
var FetchResponse = require('./FetchResponse');
-var Response = require('../lib/Response');
+var Response = require('./Response');
var Consumer = function(options){
this.MAX_MESSAGE_SIZE = 1024 * 1024; // 1 megabyte
File renamed without changes.
@@ -1,7 +1,7 @@
var binary = require('binary');
var BufferMaker = require('buffermaker');
-var Message = require('../lib/Message');
-var Response = require('../lib/Response');
+var Message = require('./Message');
+var Response = require('./Response');
var _ = require('underscore');
/* HEADER
View
@@ -1,21 +1,22 @@
-REPORTER = dot
-test: npm-install
- @NODE_ENV=test ./node_modules/.bin/mocha --reporter $(REPORTER)
+test:
+ @NODE_ENV=test ./node_modules/.bin/mocha --timeout 30000
-lib-cov:
- jscoverage lib lib-cov
-test-cov: lib-cov
- @PROZESS_COVERAGE=1 $(MAKE) test REPORTER=html-cov > coverage.html
- rm -rf lib-cov
+lint:
+ ./node_modules/.bin/jshint ./test ./index.js
-test-coveralls: lib-cov
- $(MAKE) test REPORTER=spec
+test-cov:
+ $(MAKE) lint
+ @NODE_ENV=test ./node_modules/.bin/istanbul cover \
+ ./node_modules/mocha/bin/_mocha -- -R spec
+
+test-coveralls:
echo TRAVIS_JOB_ID $(TRAVIS_JOB_ID)
- @PROZESS_COVERAGE=1 $(MAKE) test REPORTER=json-cov 2> /dev/null | ./node_modules/coveralls/bin/coveralls.js
- rm -rf lib-cov
+ $(MAKE) test
+ @NODE_ENV=test ./node_modules/.bin/istanbul cover \
+ ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && \
+ cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js || true
+
-npm-install:
- npm install
-.PHONY: test
+.PHONY: test
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,6 +1,6 @@
var BufferMaker = require('buffermaker');
-var Message = require('../lib/Message');
-var Request = require('../lib/Request');
+var Message = require('./Message');
+var Request = require('./Request');
var _ = require('underscore');
var binary = require('binary');
var assert = require('assert');
File renamed without changes.
File renamed without changes.
@@ -1,6 +1,6 @@
var binary = require('binary');
var BufferMaker = require('buffermaker');
-var Message = require('../lib/Message');
+var Message = require('./Message');
var _ = require('underscore');
var assert = require('assert');
View
@@ -1,4 +1,4 @@
-var Consumer = require('./lib/Consumer');
+var Consumer = require('./Consumer');
var options = {host : 'localhost', topic : 'social', partition : 0, offset : 0};
var consumer = new Consumer(options);
View
@@ -1,14 +1,10 @@
-var dir = './lib/';
-if (process.env.PROZESS_COVERAGE){
- var dir = './lib-cov/';
-}
-exports.Producer = require(dir + 'Producer');
-exports.Consumer = require(dir + 'Consumer');
-exports.Message = require(dir + 'Message');
-exports.FetchRequest = require(dir + 'FetchRequest');
-exports.ProduceRequest = require(dir + 'ProduceRequest');
-exports.Request = require(dir + 'Request');
-exports.Response = require(dir + 'Response');
-exports.FetchResponse = require(dir + 'FetchResponse');
-exports.OffsetsResponse = require(dir + 'OffsetsResponse');
-exports.OffsetsRequest = require(dir + 'OffsetsRequest');
+exports.Producer = require('./Producer');
+exports.Consumer = require('./Consumer');
+exports.Message = require('./Message');
+exports.FetchRequest = require('./FetchRequest');
+exports.ProduceRequest = require('./ProduceRequest');
+exports.Request = require('./Request');
+exports.Response = require('./Response');
+exports.FetchResponse = require('./FetchResponse');
+exports.OffsetsResponse = require('./OffsetsResponse');
+exports.OffsetsRequest = require('./OffsetsRequest');
View
@@ -6,7 +6,7 @@
"producer",
"consumer"
],
- "version": "0.6.4",
+ "version": "0.7.0",
"bugs": {
"url": "https://github.com/cainus/Prozess/issues"
},
@@ -30,7 +30,11 @@
"crc32": "0.2.2",
"buffer-crc32": "0.2.1",
"bignum": "0.6.2",
- "readable-stream": "1.0.26"
+ "readable-stream": "1.0.26",
+ "istanbul": "^0.2.8",
+ "mocha": "^1.18.2",
+ "jshint": "^2.5.0",
+ "coveralls": "^2.10.0"
},
"devDependencies": {
"jscoverage": "0.3.6",
@@ -52,6 +56,7 @@
"engines": {
"node": ">=0.8.0"
},
- "author": "",
- "license": "BSD"
+ "author": "Gregg Caines",
+ "license": "BSD",
+ "homepage": "https://github.com/cainus/Prozess"
}
View
@@ -1,7 +1,7 @@
-var Producer = require('./lib/Producer');
+var Producer = require('./Producer');
var producer = new Producer('social', {host : 'localhost'});
-producer.connect()
+producer.connect();
producer.on('error', function(err){
console.log("error: ", err);
});
View
@@ -8,7 +8,7 @@ var BufferMaker = require('buffermaker');
var binary = require('binary');
var net = require('net');
var EventEmitter = require('events').EventEmitter;
-var sinon = require('../lib/sinonPatch');
+var sinon = require('./lib/sinonPatch');
function closeServer(server, cb){
var called = false;
File renamed without changes.

0 comments on commit 2c155bf

Please sign in to comment.