Update support files.

This commit is contained in:
Jared Hanson
2014-03-09 09:54:34 -07:00
parent 83324b4c00
commit b695ee2e2a
15 changed files with 192 additions and 39 deletions
+6 -3
View File
@@ -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
+18
View File
@@ -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
}
+12 -5
View File
@@ -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
+13 -3
View File
@@ -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"
+2 -2
View File
@@ -1,6 +1,6 @@
(The MIT License)
The MIT License (MIT)
Copyright (c) 2011-2013 Jared Hanson
Copyright (c) 2011-2014 Jared Hanson
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
+37 -14
View File
@@ -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
# ==============================================================================
VOWS = ./node_modules/.bin/vows
TESTS ?= test/*-test.js
test:
@NODE_ENV=test NODE_PATH=lib $(VOWS) $(TESTS)
include support/mk/node.mk
include support/mk/mocha.mk
include support/mk/istanbul.mk
# ==============================================================================
# Static Analysis
# Analysis
# ==============================================================================
include support/mk/notes.mk
include support/mk/jshint.mk
JSHINT = jshint
# ==============================================================================
# Reports
# ==============================================================================
include support/mk/coveralls.mk
hint: lint
lint:
$(JSHINT) $(SOURCES)
# ==============================================================================
# Continuous Integration
# ==============================================================================
submit-cov-to-coveralls: submit-istanbul-lcov-to-coveralls
# Travis CI
ci-travis: test test-cov
# ==============================================================================
# Clean
# ==============================================================================
clean:
rm -rf build
rm -rf reports
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
+23 -12
View File
@@ -2,7 +2,19 @@
"name": "passport-github",
"version": "0.1.7",
"description": "GitHub authentication strategy for Passport.",
"keywords": ["passport", "github", "auth", "authn", "authentication", "identity"],
"keywords": [
"passport",
"github",
"auth",
"authn",
"authentication",
"identity"
],
"author": {
"name": "Jared Hanson",
"email": "[email protected]",
"url": "http://www.jaredhanson.net/"
},
"repository": {
"type": "git",
"url": "http://github.com/jaredhanson/passport-github.git"
@@ -10,15 +22,12 @@
"bugs": {
"url": "http://github.com/jaredhanson/passport-github/issues"
},
"author": {
"name": "Jared Hanson",
"email": "[email protected]",
"url": "http://www.jaredhanson.net/"
},
"licenses": [ {
"type": "MIT",
"url": "http://www.opensource.org/licenses/MIT"
} ],
"licenses": [
{
"type": "MIT",
"url": "http://www.opensource.org/licenses/MIT"
}
],
"main": "./lib/passport-github",
"dependencies": {
"pkginfo": "0.2.x",
@@ -27,8 +36,10 @@
"devDependencies": {
"vows": "~0.7.x"
},
"engines": {
"node": ">= 0.4.0"
},
"scripts": {
"test": "NODE_PATH=lib node_modules/.bin/vows test/*-test.js"
},
"engines": { "node": ">= 0.4.0" }
}
}
+7
View File
@@ -0,0 +1,7 @@
COVERALLS ?= coveralls
submit-istanbul-lcov-to-coveralls:
cat $(ISTANBUL_LCOV_INFO_PATH) | $(COVERALLS)
.PHONY: submit-istanbul-lcov-to-coveralls
+21
View File
@@ -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
+10
View File
@@ -0,0 +1,10 @@
JSHINT ?= jshint
lint-jshint:
$(JSHINT) $(SOURCES)
lint-tests-jshint:
$(JSHINT) $(TESTS)
.PHONY: lint-jshint lint-tests-jshint
+14
View File
@@ -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
+8
View File
@@ -0,0 +1,8 @@
node_modules:
npm install
clobber-node:
rm -rf node_modules
.PHONY: clobber-node
+7
View File
@@ -0,0 +1,7 @@
NOTES ?= 'TODO|FIXME'
notes:
grep -Ern $(NOTES) $(SOURCES) $(TESTS)
.PHONY: notes
+3
View File
@@ -0,0 +1,3 @@
var chai = require('chai');
global.expect = chai.expect;
+11
View File
@@ -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');
});
});