-
-
Notifications
You must be signed in to change notification settings - Fork 290
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
83324b4
commit b695ee2
Showing
15 changed files
with
190 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
# Mac OS X | ||
.DS_Store | ||
build/ | ||
reports/ | ||
|
||
# Node.js | ||
node_modules/* | ||
node_modules/ | ||
npm-debug.log | ||
|
||
# Mac OS X | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"node": true, | ||
"bitwise": true, | ||
"camelcase": true, | ||
"curly": true, | ||
"forin": true, | ||
"immed": true, | ||
"latedef": true, | ||
"newcap": true, | ||
"noarg": true, | ||
"noempty": true, | ||
"nonew": true, | ||
"quotmark": "single", | ||
"undef": true, | ||
"unused": true, | ||
"trailing": true, | ||
"laxcomma": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,23 @@ | ||
README.md | ||
Makefile | ||
doc/ | ||
README.md | ||
build/ | ||
docs/ | ||
examples/ | ||
reports/ | ||
support/ | ||
test/ | ||
|
||
# Mac OS X | ||
.DS_Store | ||
|
||
# Node.js | ||
.npmignore | ||
node_modules/ | ||
npm-debug.log | ||
|
||
# Mac OS X | ||
.DS_Store | ||
|
||
# Git | ||
.git* | ||
|
||
# Utilities | ||
.jshintrc | ||
.travis.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,15 @@ | ||
language: "node_js" | ||
node_js: | ||
- 0.4 | ||
- 0.6 | ||
- 0.8 | ||
- "0.10" | ||
- "0.8" | ||
- "0.6" | ||
- "0.4" | ||
|
||
before_install: | ||
- "npm install istanbul -g" | ||
- "npm install coveralls -g" | ||
|
||
script: "make ci-travis" | ||
|
||
after_success: | ||
- "make submit-cov-to-coveralls" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,47 @@ | ||
SOURCES = lib/**/*.js | ||
SOURCES ?= lib/*.js | ||
TESTS ?= test/*.test.js | ||
|
||
test: test-mocha | ||
test-cov: test-istanbul-mocha | ||
view-cov: view-istanbul-report | ||
lint: lint-jshint | ||
lint-tests: lint-tests-jshint | ||
|
||
|
||
# ============================================================================== | ||
# Node Tests | ||
# Node.js | ||
# ============================================================================== | ||
include support/mk/node.mk | ||
include support/mk/mocha.mk | ||
include support/mk/istanbul.mk | ||
|
||
VOWS = ./node_modules/.bin/vows | ||
TESTS ?= test/*-test.js | ||
# ============================================================================== | ||
# Analysis | ||
# ============================================================================== | ||
include support/mk/notes.mk | ||
include support/mk/jshint.mk | ||
|
||
test: | ||
@NODE_ENV=test NODE_PATH=lib $(VOWS) $(TESTS) | ||
# ============================================================================== | ||
# Reports | ||
# ============================================================================== | ||
include support/mk/coveralls.mk | ||
|
||
# ============================================================================== | ||
# Static Analysis | ||
# Continuous Integration | ||
# ============================================================================== | ||
submit-cov-to-coveralls: submit-istanbul-lcov-to-coveralls | ||
|
||
# Travis CI | ||
ci-travis: test test-cov | ||
|
||
JSHINT = jshint | ||
# ============================================================================== | ||
# Clean | ||
# ============================================================================== | ||
clean: | ||
rm -rf build | ||
rm -rf reports | ||
|
||
hint: lint | ||
lint: | ||
$(JSHINT) $(SOURCES) | ||
clobber: clean clobber-node | ||
|
||
|
||
.PHONY: test hint lint | ||
.PHONY: test test-cov view-cov lint lint-tests submit-cov-to-coveralls ci-travis clean clobber |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
COVERALLS ?= coveralls | ||
|
||
submit-istanbul-lcov-to-coveralls: | ||
cat $(ISTANBUL_LCOV_INFO_PATH) | $(COVERALLS) | ||
|
||
|
||
.PHONY: submit-istanbul-lcov-to-coveralls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
ISTANBUL ?= istanbul | ||
ISTANBUL_OUT ?= ./reports/coverage | ||
ISTANBUL_REPORT ?= lcov | ||
ISTANBUL_LCOV_INFO_PATH ?= $(ISTANBUL_OUT)/lcov.info | ||
ISTANBUL_HTML_REPORT_PATH ?= $(ISTANBUL_OUT)/lcov-report/index.html | ||
|
||
|
||
test-istanbul-mocha: node_modules | ||
NODE_PATH=$(NODE_PATH_TEST) \ | ||
$(ISTANBUL) cover \ | ||
--dir $(ISTANBUL_OUT) --report $(ISTANBUL_REPORT) \ | ||
$(_MOCHA) -- \ | ||
--reporter $(MOCHA_REPORTER) \ | ||
--require $(MOCHA_REQUIRE) \ | ||
$(TESTS) | ||
|
||
view-istanbul-report: | ||
open $(ISTANBUL_HTML_REPORT_PATH) | ||
|
||
|
||
.PHONY: test-istanbul-mocha view-istanbul-report |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
JSHINT ?= jshint | ||
|
||
lint-jshint: | ||
$(JSHINT) $(SOURCES) | ||
|
||
lint-tests-jshint: | ||
$(JSHINT) $(TESTS) | ||
|
||
|
||
.PHONY: lint-jshint lint-tests-jshint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
MOCHA ?= ./node_modules/.bin/mocha | ||
_MOCHA ?= ./node_modules/.bin/_mocha | ||
MOCHA_REPORTER ?= spec | ||
MOCHA_REQUIRE ?= ./test/bootstrap/node | ||
|
||
test-mocha: node_modules | ||
NODE_PATH=$(NODE_PATH_TEST) \ | ||
$(MOCHA) \ | ||
--reporter $(MOCHA_REPORTER) \ | ||
--require $(MOCHA_REQUIRE) \ | ||
$(TESTS) | ||
|
||
|
||
.PHONY: test-mocha |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
node_modules: | ||
npm install | ||
|
||
clobber-node: | ||
rm -rf node_modules | ||
|
||
|
||
.PHONY: clobber-node |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
NOTES ?= 'TODO|FIXME' | ||
|
||
notes: | ||
grep -Ern $(NOTES) $(SOURCES) $(TESTS) | ||
|
||
|
||
.PHONY: notes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
var chai = require('chai'); | ||
|
||
global.expect = chai.expect; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* global describe, it, expect */ | ||
|
||
var pkg = require('..'); | ||
|
||
describe('passport-github', function() { | ||
|
||
it('should export object', function() { | ||
expect(pkg).to.be.an('object'); | ||
}); | ||
|
||
}); |