Skip to content

Commit

Permalink
Merge 65dda09 into a103f4b
Browse files Browse the repository at this point in the history
  • Loading branch information
keis committed Sep 9, 2014
2 parents a103f4b + 65dda09 commit 60a120f
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 8 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
language: node_js
node_js:
- "0.10"
script: make coverage/lcov.info
after_success:
cat coverage/lcov.info | node_modules/.bin/coveralls
19 changes: 18 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,29 @@
ISTANBUL=node_modules/.bin/istanbul
MOCHA=node_modules/.bin/_mocha
DOCCO=node_modules/.bin/docco

.PHONY: test coverage/coverage.json
SRC=$(shell find lib/ -type f)
TESTSRC=$(shell find test/ -type f)
DOCS=$(patsubst lib/%.js, docs/%.html, $(SRC))

all: test docs

.PHONY: test docs

test: coverage/coverage.json

docs: $(DOCS)

docs/%.html: lib/%.js
docco $^

coverage/coverage.json: $(SRC) $(TESTSRC)

coverage/coverage.json:
$(ISTANBUL) cover $(MOCHA) -- --require test/bootstrap.js --compilers coffee:coffee-script/register --recursive test/unit

coverage/lcov.info: coverage/coverage.json
$(ISTANBUL) report lcov

coverage/index.html: coverage/coverage.json
$(ISTANBUL) report html
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# rapidus
A logging package that does the essentials.


[![Build Status](https://travis-ci.org/keis/rapidus.svg?branch=master)](https://travis-ci.org/keis/rapidus)
[![Coverage Status](https://coveralls.io/repos/keis/rapidus/badge.png?branch=master)](https://coveralls.io/r/keis/rapidus?branch=master)

> Something changed that's not your face
> it's mine!
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@
"test": "mocha --require test/bootstrap.js --compilers coffee:coffee-script/register --recursive test/unit"
},
"devDependencies": {
"coffee-script": "~1.7.1",
"chai": "~1.9.1",
"mocha": "~1.19.0",
"sinon": "~1.10.0",
"istanbul": "~0.2.10",
"coffee-script": "~1.7.1",
"coveralls": "^2.11.1",
"grunt": "~0.4.5",
"grunt-contrib-watch": "~0.6.1",
"grunt-docco": "~0.3.3",
"grunt-contrib-watch": "~0.6.1"
"istanbul": "~0.2.10",
"mocha": "~1.19.0",
"sinon": "~1.10.0"
},
"dependencies": {
"dateformat": "^1.0.8-1.2.3"
Expand Down
4 changes: 2 additions & 2 deletions test/unit/test.record.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ describe 'Record', ->
assert.equal x, y

describe "getTime", ->
date = new Date 'Thu Aug 21 2014 10:38:27 GMT+0200 (CEST)'
date = new Date 'Thu Aug 21 2014 10:38:27'

it "returns a formatted time string", ->
record = new Record 'name', 10, date, "%s - %s", ['foo', 10]
time = record.getTime()
assert.equal time, '10:38:27.000'

describe "getDate", ->
date = new Date 'Thu Aug 21 2014 10:38:27 GMT+0200 (CEST)'
date = new Date 'Thu Aug 21 2014 10:38:27'

it "returns a formatted date string", ->
record = new Record 'name', 10, date, "%s - %s", ['foo', 10]
Expand Down

0 comments on commit 60a120f

Please sign in to comment.