diff --git a/.gitignore b/.gitignore index 25fbf5a..6e7d189 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules/ coverage/ +.env \ No newline at end of file diff --git a/Makefile b/Makefile index d099b26..59786e3 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -test: node_modules +test: node_modules .env npm test coverage: coverage/lcov.info @@ -10,7 +10,25 @@ coveralls: coverage/lcov.info .PHONY: test coverage coveralls -coverage/lcov.info: node_modules package.json oauth-1.0a.js test/*.js test/**/*.js test/mocha.opts +.env: + @echo "BITBUCKET_CONSUMER_PUBLIC=" > $@ + @echo "BITBUCKET_CONSUMER_SECRET=" >> $@ + @echo "" >> $@ + @echo "FLICKR_CONSUMER_key=" >> $@ + @echo "FLICKR_CONSUMER_SECRET=" >> $@ + @echo "" >> $@ + @echo "LINKEDIN_CONSUMER_PUBLIC=" >> $@ + @echo "LINKEDIN_CONSUMER_SECRET=" >> $@ + @echo "" >> $@ + @echo "OPENBANK_CONSUMER_PUBLIC=" >> $@ + @echo "OPENBANK_CONSUMER_SECRET=" >> $@ + @echo "" >> $@ + @echo "TWITTER_CONSUMER_PUBLIC=" >> $@ + @echo "TWITTER_CONSUMER_SECRET=" >> $@ + @echo "TWITTER_TOKEN_PUBLIC=" >> $@ + @echo "TWITTER_TOKEN_SECRET=" >> $@ + +coverage/lcov.info: node_modules package.json oauth-1.0a.js .env test/*.js test/**/*.js test/mocha.opts node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly node_modules: package.json diff --git a/package.json b/package.json index 5d5fa68..3e405f1 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "devDependencies": { "chai": "^4.1.2", "coveralls": "^3.0.0", + "dotenv": "^4.0.0", "istanbul": "^0.4.5", "mocha": "^4.0.1", "request": "~2.33.0" diff --git a/test/mocha.opts b/test/mocha.opts index a0ebf8b..db58060 100644 --- a/test/mocha.opts +++ b/test/mocha.opts @@ -1,3 +1,4 @@ --recursive --reporter spec +--require dotenv/config --slow 1