Skip to content
This repository was archived by the owner on Dec 20, 2023. It is now read-only.

Commit 99ef243

Browse files
Merge pull request #14 from C2FO/etcd-version
updating the etcd version
2 parents af46c1a + d9de58d commit 99ef243

File tree

5 files changed

+36
-26
lines changed

5 files changed

+36
-26
lines changed

.travis.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
language: node_js
22
node_js:
3-
- "iojs"
3+
- "stable"
4+
- "5"
5+
- "4"
46
- "0.12"
57
- "0.11"
68
- "0.10"
79

810
before_script:
9-
- npm install -g grunt-cli
11+
- npm install -g grunt-cli

HISTORY.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
# v0.2.1
2+
3+
* Changing the etcd package dependency version.
4+
15
# v0.2.0
26

37
* Added etcd support [#12](https://github.com/C2FO/gofigure/pull/12) - [@brockwood](https://github.com/brockwood)
48

59
# v0.0.1
610

7-
* Initial release
11+
* Initial release

docs/History.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,15 @@
176176

177177

178178

179-
<h1>v0.2.0</h1>
179+
<h1 id="v0-2-1">v0.2.1</h1>
180+
<ul>
181+
<li>Changing the etcd package dependency version.</li>
182+
</ul>
183+
<h1 id="v0-2-0">v0.2.0</h1>
180184
<ul>
181185
<li>Added etcd support <a href="https://github.com/C2FO/gofigure/pull/12">#12</a> - <a href="https://github.com/brockwood">@brockwood</a></li>
182186
</ul>
183-
<h1>v0.0.1</h1>
187+
<h1 id="v0-0-1">v0.0.1</h1>
184188
<ul>
185189
<li>Initial release</li>
186190
</ul>

docs/index.html

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -178,14 +178,14 @@
178178

179179

180180
<p><a href="https://travis-ci.org/C2FO/gofigure"><img src="https://travis-ci.org/C2FO/gofigure.png" alt="Build Status"></a></p>
181-
<h1>gofigure</h1>
181+
<h1 id="gofigure">gofigure</h1>
182182
<p>Gofigure is a configuration tool for node to help in the gathering and monitoring of configuration files in node.</p>
183-
<h1>Installation</h1>
183+
<h1 id="installation">Installation</h1>
184184
<p>For nodejs &gt;= 0.10 and iojs:</p>
185185
<pre class='prettyprint linenums lang-js'><code>$ npm install gofigure</code></pre>
186186
<p>For nodejs &lt; 0.10:</p>
187187
<pre class='prettyprint linenums lang-js'><code>$ npm install gofigure@0.1.2</code></pre>
188-
<h1>Usage</h1>
188+
<h1 id="usage">Usage</h1>
189189
<ul>
190190
<li><a href="#load">Loading A Configuration</a><ul>
191191
<li><a href="#loadDir">Directories</a></li>
@@ -204,7 +204,7 @@ <h1>Usage</h1>
204204
<li><a href="#type">Node Type</a></li>
205205
</ul>
206206
<p><a name="load"></a></p>
207-
<h2>Loading configurations</h2>
207+
<h2 id="loading-configurations">Loading configurations</h2>
208208
<p>Gofigure currently handles the loading of JSON files for configurations.</p>
209209
<p>To Get an instance of a configuration object use the <code>gofigure</code> method. The <code>gofigure</code> method takes an object that accepts the following options</p>
210210
<ul>
@@ -238,7 +238,7 @@ <h2>Loading configurations</h2>
238238
var loader = gofigure({locations : [__dirname + &quot;/configs&quot;]});
239239
var config = loader.loadSync();</code></pre>
240240
<p><a name="loadDir"></a></p>
241-
<h3>Directories of configurations</h3>
241+
<h3 id="directories-of-configurations">Directories of configurations</h3>
242242
<p>To load directories that contain configuration files in the options object provide locations property that is an array of directories than contain your configurations.</p>
243243
<pre class='prettyprint linenums lang-js'><code class="lang-javascript">
244244
var gofigure = require(&quot;gofigure&quot;);
@@ -264,7 +264,7 @@ <h3>Directories of configurations</h3>
264264
var PORT = config.port, HOST = config.host;
265265
});</code></pre>
266266
<p><a name="loadFiles"></a></p>
267-
<h3>Files</h3>
267+
<h3 id="files">Files</h3>
268268
<p>You may also load specific files rather than entire directories.</p>
269269
<pre class='prettyprint linenums lang-js'><code class="lang-javascript">var gofigure = require(&quot;gofigure&quot;);
270270

@@ -274,7 +274,7 @@ <h3>Files</h3>
274274
});</code></pre>
275275
<p>Again order matters <code>/prod/configs/config1.json</code> will override <code>__dirname + &quot;/config.json&quot;</code></p>
276276
<p><a name="loadEtcd"></a></p>
277-
<h3>Etcd</h3>
277+
<h3 id="etcd">Etcd</h3>
278278
<p>You may also load from a centralized Etcd server.</p>
279279
<pre class='prettyprint linenums lang-js'><code class="lang-javascript">var gofigure = require(&quot;gofigure&quot;);
280280

@@ -308,10 +308,10 @@ <h3>Etcd</h3>
308308
var PORT = config.port, HOST = config.host;
309309
});</code></pre>
310310
<p><a name="monitoring"></a></p>
311-
<h2>Monitoring</h2>
311+
<h2 id="monitoring">Monitoring</h2>
312312
<p>Gofigure supports the monitoring of changes to configuration files.</p>
313313
<p><a name="monitoringAll"></a></p>
314-
<h3>All files or Etcd server</h3>
314+
<h3 id="all-files-or-etcd-server">All files or Etcd server</h3>
315315
<p>To enable monitoring you can specify monitor to true in the options.</p>
316316
<pre class='prettyprint linenums lang-js'><code class="lang-javascript">var gofigure = require(&quot;gofigure&quot;);
317317

@@ -322,7 +322,7 @@ <h3>All files or Etcd server</h3>
322322
//...do something
323323
});</code></pre>
324324
<p><a name="monitoringSome"></a></p>
325-
<h3>Individual Files</h3>
325+
<h3 id="individual-files">Individual Files</h3>
326326
<p>To monitor certain files you can use the files property and with object that have a <code>monitor : true</code> KV pair.</p>
327327
<pre class='prettyprint linenums lang-js'><code class="lang-javascript">var gofigure = require(&quot;gofigure&quot;);
328328

@@ -341,7 +341,7 @@ <h3>Individual Files</h3>
341341
});</code></pre>
342342
<p>Just <code>config1.json</code> will be monitored for changes.</p>
343343
<p><a name="monitoringSyntax"></a></p>
344-
<h3>Property topic syntax</h3>
344+
<h3 id="property-topic-syntax">Property topic syntax</h3>
345345
<p>To listen to all properties</p>
346346
<pre class='prettyprint linenums lang-js'><code class="lang-javascript">loading.on(function(config){
347347
//...do something
@@ -397,7 +397,7 @@ <h3>Property topic syntax</h3>
397397
//...do something
398398
});</code></pre>
399399
<p><a name="monitoringCB"></a></p>
400-
<h3>Callback Arguments</h3>
400+
<h3 id="callback-arguments">Callback Arguments</h3>
401401
<p>The property change callback will pass in the following values depending on the arity of the callback.</p>
402402
<p>If 1 argument is expected then just the callback invoked with the new value is a.</p>
403403
<pre class='prettyprint linenums lang-js'><code class="lang-javascript">
@@ -415,14 +415,14 @@ <h3>Callback Arguments</h3>
415415
//...do something
416416
});</code></pre>
417417
<p><a name="environments"></a></p>
418-
<h2>Environments</h2>
418+
<h2 id="environments">Environments</h2>
419419
<p><strong>Reserved Property Names</strong></p>
420420
<p>The following environment names are reserved and not be used when process.env.NODE_ENV or <code>environment</code> is set.</p>
421421
<ul>
422422
<li><code>*</code></li>
423423
<li><code>type</code></li>
424424
</ul>
425-
<h3>NODE_ENV</h3>
425+
<h3 id="node_env">NODE_ENV</h3>
426426
<p><code>gofigure</code> also supports environments, by default it will look for <code>NODE_ENV</code> and if it is set then it will use it.</p>
427427
<p>The following is an example configuration file</p>
428428
<pre class='prettyprint linenums lang-js'><code class="lang-javascript">
@@ -573,7 +573,7 @@ <h3>NODE_ENV</h3>
573573
}
574574
}</code></pre>
575575
<p>Now each environment only has to override properties specific to that env.</p>
576-
<h3>Using NODE_ENV with Etcd</h3>
576+
<h3 id="using-node_env-with-etcd">Using NODE_ENV with Etcd</h3>
577577
<p>The expected layout within Etcd is the following:</p>
578578
<p><code>127.0.0.1:4001/v2/keys/&lt;root&gt;/&lt;NODE_ENV&gt;</code></p>
579579
<p>So, in the example above, <code>gofigure</code> will look for the following:</p>
@@ -585,7 +585,7 @@ <h3>Using NODE_ENV with Etcd</h3>
585585
<p>at this location within Etcd for keys:</p>
586586
<p>127.0.0.1:4001/v2/keys/appname/production</p>
587587
<p><a name="type"></a></p>
588-
<h2>NODE_TYPE</h2>
588+
<h2 id="node_type">NODE_TYPE</h2>
589589
<p><strong>NOTE</strong> This is to used with <a href="#environments"><code>NODE_ENV</code></a>.</p>
590590
<p>Since Etcd is a centralized configuration store, the concept of a node type needs to be introduced. By default <code>gofigure</code> will look for <code>NODE_TYPE</code> and, if it is set, then it will use it. To programmatically load just the production webapp properties set, the <code>environment</code> to production and <code>nodetype</code> to webapp.</p>
591591
<pre class='prettyprint linenums lang-js'><code class="lang-javascript">var gofigure = require(&quot;gofigure&quot;);
@@ -652,7 +652,7 @@ <h2>NODE_TYPE</h2>
652652
&quot;host&quot; : &quot;dev.mydomain.com&quot;,
653653
&quot;port&quot; : &quot;6060&quot;
654654
}</code></pre>
655-
<h3>Using NODE_TYPE with Etcd</h3>
655+
<h3 id="using-node_type-with-etcd">Using NODE_TYPE with Etcd</h3>
656656
<p>When using <code>NODE_TYPE</code> with Etcd your URI would look like the following</p>
657657
<pre class='prettyprint linenums lang-js'><code>127.0.0.1:4001/v2/keys/&lt;root&gt;/type/&lt;NODE_ENV&gt;/&lt;NODE_TYPE&gt;</code></pre>
658658
<p>To load Etcd with a <code>NODE_TYPE</code> your code could look like the following.</p>
@@ -663,9 +663,9 @@ <h3>Using NODE_TYPE with Etcd</h3>
663663
<p><code>gofigure</code> would generate the following URI to retrieve the type config from Etcd.</p>
664664
<p><strong>NOTE</strong> gofigure would also load the <code>NODE_ENV</code> uri discussed above.</p>
665665
<pre class='prettyprint linenums lang-js'><code>127.0.0.1:4001/v2/keys/appname/type/production/webapp</code></pre>
666-
<h2>License</h2>
666+
<h2 id="license">License</h2>
667667
<p>MIT <a href="https://github.com/C2FO/gofigure/raw/master/LICENSE">https://github.com/C2FO/gofigure/raw/master/LICENSE</a></p>
668-
<h2>Meta</h2>
668+
<h2 id="meta">Meta</h2>
669669
<ul>
670670
<li>Code: <code>git clone git://github.com/c2fo/gofigure.git</code></li>
671671
<li>Website: <a href="http://c2fo.com">http://c2fo.com</a> - Twitter: <a href="http://twitter.com/c2fo">http://twitter.com/c2fo</a> - 877.465.4045</li>

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "gofigure",
33
"description": "Configuration helper for node",
4-
"version": "0.2.0",
4+
"version": "0.2.1",
55
"scripts": {
66
"test": "grunt jshint it"
77
},
@@ -29,7 +29,7 @@
2929
"object-extended": "0.0.7",
3030
"declare.js": "0.0.8",
3131
"glob": "~3.1.21",
32-
"node-etcd": "4.0.x"
32+
"node-etcd": "~4.2.1"
3333
},
3434
"devDependencies": {
3535
"it": "~0.2.6",

0 commit comments

Comments
 (0)