Commit Graph

116 Commits (master)

Author SHA1 Message Date
Michael Schoonmaker 5d2ebfbe9f Added test to confirm merging an Object and null behaves as expected. 2012-12-20 19:02:36 -08:00
Michael Hart bb57c497d3 Prefer this fix for #65 to 6045618 2012-12-20 18:12:42 -05:00
indexzero 0d795ecf81 [test] Better tests to show #65 2012-12-20 14:08:36 -05:00
indexzero f19f0b6c39 [test] Added failing test to illustrate #65 2012-12-20 14:01:04 -05:00
Bradley Meck da39d3cac3 [fix] null values should merge properly instead of throwing errors 2012-09-08 20:10:58 -05:00
Bradley Meck 7421836387 [fix] heirarchy fixture file path wrong in tests 2012-09-07 09:40:15 -05:00
Bradley Meck 683f78918c [fix] #59 root get/set should work via null/undefined as key 2012-09-07 09:29:30 -05:00
indexzero d96d2544bc [fix] Fix regression introduced by 36e061c4bd 2012-07-10 03:16:54 -04:00
indexzero 7e8d9d6bce [test] Added failing test for `.save()` regression introduced by @russfrank in 36e061c4bd 2012-07-10 03:16:04 -04:00
indexzero 04e22303bd [minor doc] Update file header in test/provider-test.js 2012-07-10 03:14:00 -04:00
indexzero 30734301e7 [api test doc] Make options to `Provider.prototype.file` take more flexible options 2012-07-10 01:50:18 -04:00
indexzero 8b53c12729 [minor] Use locally scoped `path` variable 2012-07-10 01:47:28 -04:00
indexzero 7515f66572 [fix] Ensure that all options are passed to `Provider.prototype.add` in `Provider.prototype.file`. Fixes #51
[doc] Update README.md and method documentation
[dist] Remove vim comments
2012-07-10 01:27:28 -04:00
Michael Hart 3c08fad1c9 Changed to as it's more accurate 2012-06-21 18:04:37 +10:00
Michael Hart e15f787940 Updated README and allowed a simpley syntax 2012-06-21 17:18:22 +10:00
Michael Hart 92d4e9ea14 Added test and updated docs 2012-06-21 17:04:06 +10:00
Michael Hart 8921d0502e Added support for nested configs via env 2012-06-21 16:46:10 +10:00
Michael Hart 26d81e8dca Merge objects if necessary when traversing stores on get() 2012-06-13 18:28:54 +05:30
Jonathan Stewmon 6353d028f7 api and doc change for flatiron/nconf#28 (`.file` may now take a string instead of an object)
Conflicts:

	lib/nconf/provider.js
2012-05-03 17:10:19 -07:00
Russell Frank d3e68976c8 Proper teardowns in `complete-test.js` 2012-05-03 00:16:13 -04:00
Russell Frank 94bdb7dbd8 Added `complete-test.js` & fixture.
`complete-test.js` correctly tests the modified `save()` method.  It is
an attempt at a more complete functional test of nconf.
2012-05-01 23:27:00 -04:00
Russell Frank 36e061c4bd Fixes to `Provider.save()` and tests.
Fixed `Provider.save()` to properly ignore stores which do not provide
a saveSync method.  Also, fixed `save()` to properly save asynchronously
when an async `save()` method on a store is provided.

Removed the tests from `nconf-test.js` which expected `save()` to throw
or return an error when a store without `save()` methods was
encountered. Also removed a `console.log` from `provider-test.js`.
2012-05-01 22:44:15 -04:00
indexzero 464af417fe [fix test] Fix bad test assertion 2012-01-02 17:27:09 -05:00
indexzero 6242caafda [api minor] Add `.loadSync()` to Memory store. Fixes #24 2012-01-02 17:20:06 -05:00
indexzero d0a91219ec [test dist] Remove unused `eyes` dependency 2012-01-02 17:14:17 -05:00
Jonathan Stewmon fdb73f007b updated tests to verify that Provider.load respects hierarchy 2012-01-02 17:12:08 -05: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 90b029782e [test] Update tests to use optional options API 2011-11-24 00:30:31 -05:00
indexzero b658f68a89 [test] Add additional test coverage for hierarchical configuration 2011-11-24 00:30:24 -05:00
indexzero a9c354032b [fix test] Fix overwritten tests in file-store-test.js 2011-11-24 00:30:19 -05:00
indexzero f4f1fdf464 [fix test] Update to respected `.sources` option correctly 2011-11-24 00:30:14 -05:00
indexzero 021850a14d [test] Move around test .json files 2011-11-24 00:29:51 -05:00
indexzero 0fbc9a2722 [test] Added tests (which are now passing) for #15 2011-11-24 00:29:47 -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 c3cebe7cb4 [refactor] Rename `.sources` to `._stores` and bring back `._sources` 2011-11-24 00:29:39 -05:00
Sander Tolsma 47a56ccb5a [test] Test for hierarchical argv options get() 2011-11-24 00:29:27 -05:00
indexzero c3c315d648 [refactor] Refactor to make using nconf more fluent. 2011-11-24 00:29:15 -05:00
Maciej Małecki 2475d06cb2 [test] Test command line arguments reparsing 2011-11-19 02:02:22 +01:00
Maciej Małecki 51700cae88 [test minor] Use `process.argv[0]` when spawning processes
Previous implementation used `node`.
2011-11-19 01:29:01 +01:00
indexzero d0aee0d451 [api test] Added `.sources` option for `nconf.Provider` for readonly configuration data 2011-09-25 00:01:44 -04:00
indexzero f867e749b9 [dist] Remove unused test fixtures 2011-09-18 21:38:44 -04: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
indexzero da2da7aea8 [api test breaking refactor] Significant refactor to how nconf works. Now a fully hierarchical configuration storage mechanism capable of multiple levels of stores of the same type. 2011-09-16 06:49:47 -04:00
indexzero fb392ddc51 [api test] Updated test/provider-test.js and associated merge implementation 2011-08-28 08:50:26 -04:00
indexzero a6533aa7bf [dist api test] Finished integrating features from reconf and updating associated tests 2011-08-23 06:38:51 -04:00
indexzero 8620e6ba91 [api test] Remove Redis store in preparation for nconf-redis 2011-07-08 15:33:33 -04:00
indexzero 7e4623ec46 [api test] Update `nconf.Provider` to create a new instance of the store if the options are different 2011-06-25 00:34:07 -04:00
indexzero 76db254740 [fix test] Update nconf.stores.File to respond with an error when loading malformed JSON async 2011-06-08 00:06:58 -04:00
indexzero 13f5753405 [minor] Update `nconf.version` to use pkginfo 2011-06-05 01:39:39 -04:00
indexzero 4459ba54a1 [api] Added `.merge()` to stores.Memory and stores.Redis 2011-06-05 01:29:14 -04:00
Sami Samhuri 8a79ef04fd test retrieving non-existent keys and drilling into non-objects 2011-05-22 13:01:49 -07:00
Sami Samhuri 6acc1fc533 allow storing null in redis 2011-05-22 12:40:57 -07:00
Sami Samhuri faa8ab9486 correctly retrieve falsy values from memory (hence file) 2011-05-22 12:40:57 -07:00
indexzero 9da37dff2a [dist api test] Refactor pluggable nconf-level logic into nconf.Provider. Update .gitignore for npm 1.0. Update pathing in source and tests to be more `require.paths` future-proof 2011-05-14 01:47:26 -04:00
indexzero d65922dc7a [api] Add `.saveSync()` and `.loadSync()` methods to File store 2011-04-20 01:57:56 -04:00
indexzero 067d58a99d [minor test] Add tests for File store `save()`. Improve default file format to pretty print the JSON output 2011-04-19 17:32:13 -04:00
indexzero 0fd847cc33 [doc] Updates to README.md 2011-04-02 04:59:18 -04:00
indexzero 79717ac3b1 [test] More tests for nconf 2011-04-02 04:41:50 -04:00
indexzero 09b8c75383 [api test doc] Internal fixes from testing. More tests and docs 2011-04-02 04:31:20 -04:00
indexzero 73bf78339f [api doc test] Finalize API. Add more test coverage 2011-04-02 03:03:16 -04:00
indexzero 772de110bb [test] More tests for nested object literals 2011-03-31 04:12:43 -04:00
indexzero 4c8e7a5b7f [api] More work on Redis store 2011-03-31 04:11:11 -04:00
indexzero 67b5c8ab2a [api test] First pass at implementation 2011-03-31 02:32:47 -04:00