From dc19a8988f48a75221109fb35ed5b870f7c7b021 Mon Sep 17 00:00:00 2001 From: Jonathan Samines Date: Wed, 5 Apr 2017 21:03:29 -0600 Subject: [PATCH 1/3] Update documentation references to shortstop-handlers usage --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index c89562d..434ad8e 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,16 @@ confit ====== -Lead Maintainer: [Shaun Warman](https://github.com/shaunwarman) +Lead Maintainer: [Shaun Warman](https://github.com/shaunwarman) -[![Build Status](https://travis-ci.org/krakenjs/confit.svg?branch=2.x)](https://travis-ci.org/krakenjs/confit) +[![Build Status](https://travis-ci.org/krakenjs/confit.svg?branch=2.x)](https://travis-ci.org/krakenjs/confit) Simple, environment-based configuration. `confit` loads a default JSON configuration file, additionally loading environment-specific files, if applicable. It will also process the loaded files using any configured [shortstop](https://github.com/paypal/shortstop) protocol handlers—see **Options** below. -`confit` adds support for adding JavaScript-style comments in your json files as each file is processed by [shush](https://github.com/totherik/shush) before being merged into your config. +`confit` adds support for adding JavaScript-style comments in your json files as each file is processed by [shush](https://github.com/krakenjs/shush) before being merged into your config. ## Usage @@ -20,8 +20,8 @@ var confit = require('confit'); ### confit([options]) * `options` (*String* | *Object*) - the base directory in which config files live or a configuration object. If no -arguments is provided, defaults to the directory of the calling file. Signature `function (err, config) {}` -* returns - config factory. +arguments is provided, defaults to the directory of the calling file. +* returns - [config factory](#config-factory). ```javascript 'use strict'; @@ -65,7 +65,7 @@ confit(options) ## Options * `basedir` (*String*) - the base directory in which config files can be found. * `protocols` (*Object*) - An object containing a mapping of -[shortstop](https://github.com/paypal/shortstop) protocols to either handler implementations or an array or handler implementations. +[shortstop](https://github.com/krakenjs/shortstop) protocols to either handler implementations or an array or handler implementations. These protocols will be used to process the config data prior to registration. If using an array of handler implementations, each handler is run in series (see [`Multiple handlers` in the shortstop README](https://github.com/krakenjs/shortstop#multiple-handlers)). * `defaults` (*String*) - the name of the file containing all default values. @@ -83,8 +83,8 @@ var handlers = require('shortstop-handlers'); var options = { basedir: path.join(__dirname, 'config'), protocols: { - file: handlers.file, - glob: handlers.glob + file: handlers.file(__dirname), + glob: handlers.glob(__dirname) } }; From 6742edfd5eb176201fc124d02502c76c1488a45a Mon Sep 17 00:00:00 2001 From: Jonathan Samines Date: Wed, 5 Apr 2017 21:08:21 -0600 Subject: [PATCH 2/3] Remove unnecessary istanbul dep --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index c4e6b47..49da1c1 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,6 @@ "devDependencies": { "babel": "4.7.3", "glob": "^4.3.5", - "istanbul": "^0.3.5", "jshint": "^2.6.0", "nyc": "^3.0.1", "tap": "^1.3.1" From afaca345d6f12c3961a7fb36f686b74d4b6f3b1e Mon Sep 17 00:00:00 2001 From: Jonathan Samines Date: Wed, 5 Apr 2017 21:22:42 -0600 Subject: [PATCH 3/3] Fix tap test errors --- test/confit-test.js | 1 + test/provider-test.js | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/test/confit-test.js b/test/confit-test.js index 24daea6..3806c4c 100644 --- a/test/confit-test.js +++ b/test/confit-test.js @@ -557,4 +557,5 @@ test('confit', function (t) { }); }); + t.end(); }); diff --git a/test/provider-test.js b/test/provider-test.js index 5cc412b..df53ddc 100644 --- a/test/provider-test.js +++ b/test/provider-test.js @@ -11,7 +11,7 @@ test('env', function (t) { process.env = env; }); - t.test('env variables', function () { + t.test('env variables', function (t) { var val; process.env = { @@ -25,6 +25,8 @@ test('env', function (t) { t.equal(val.env, undefined); t.end(); }); + + t.end(); });