Commit Graph

17 Commits (17376d4d17f301eb322e001574957e3e9afe050e)

Author SHA1 Message Date
Adrien Becchis b41c505c6e Save conf to dedicated file (#283)
* Added support for saving configuration to a specific file

Added support for saving configuration to a specific file

* add test to cover the save to file feature

* add posibility to specify a format to save to file

* add a test with nconf-yaml to ensure specifying a format works
2017-10-30 10:01:55 -04:00
Matt Hamann 35088a3313 Added nconf.any method (#278)
* Added nconf.any method

Fixes #126
Implemented on the Provider class
Takes an array of keys, or a variable argument list
Supports both callback and non-callback invocations

* Use an explicit search base in file store test

Fixes #224
Test file was created under process.env.HOME, but test was searching in
the current working directory. If the cwd was not on the same drive as
the home directory, the test would fail.

* Added some API documentation to README for 'any'

* Tweak `.any` documentation
2017-10-21 16:42:24 -04:00
indexzero 0358545ae5 [test api] Make the format capable of sub-objects. 2015-09-20 00:26:34 -07:00
indexzero 04c0f3a001 [api test] Encrypt individual keys instead of entire stringified contents. Added basic unit tests. 2015-09-19 00:12:50 -07:00
indexzero af0e9fb7e7 [dist fix] Cleanup some whitespace. 2014-11-26 01:31:48 -05:00
midknight41 6c1eb5e917 fixed white spacing and added (embarrassing absent) variable declarations 2013-10-26 20:40:12 +01:00
midknight41 6641ed234a made bom tests more meaningful 2013-10-03 15:58:13 +01:00
midknight41 2ce8aea8fc made bom tests more meaningful 2013-10-03 15:53:02 +01:00
midknight41 29f1ca281b added support for BOM in load() and loadSync() 2013-10-03 09:17:36 +01:00
Marcin Floryan ada15db9e3 Test that invalid file name is indicated 2013-04-29 21:36:26 +01:00
Maciej Małecki e0e070ab28 [test] Test if `File.saveSync()` returns store content
Tests #27.
2011-12-25 15:38:39 +01:00
Maciej Małecki d5ce1ed68f [test] Test `saveSync()` method of file store 2011-12-25 15:26:04 +01:00
indexzero 6c720ee109 [dist] Update Copyright and Author to Nodejitsu Inc. 2011-11-24 00:33:08 -05:00
indexzero a9c354032b [fix test] Fix overwritten tests in file-store-test.js 2011-11-24 00:30:19 -05:00
indexzero 16a18bffe6 [refactor] Expose all store prototypes on `nconf.*`. Expose store instances on Provider.stores and Provider.sources 2011-11-24 00:29:43 -05:00
indexzero 1ef5797e83 [api test] Finished API and tests for hierarchical configuration storage. 2011-09-18 21:37:01 -04:00
indexzero a0638805ce [doc] Updated usage.js and README.md for the next hierarchical syntax. 2011-09-18 21:34:45 -04:00