Permalink
Browse files

Add timelion.private.json which is merged with timelion.json if avail…

…able
  • Loading branch information...
1 parent c0ebb45 commit 2c49525b4e67b48b1df069cf1524812c9d042174 @rashidkpc rashidkpc committed Feb 21, 2016
Showing with 10 additions and 5 deletions.
  1. +1 −0 .gitignore
  2. +1 −1 FUNCTIONS.md
  3. +3 −1 gulpfile.js
  4. +4 −2 handlers/lib/tl_config.js
  5. +1 −1 package.json
View
@@ -1,3 +1,4 @@
build/
node_modules/
target/
+timelion.private.json
View
@@ -19,7 +19,7 @@ offset | *string* | Offset the series retrieval by a date expression. Eg -1M to
fit | *string* | Algorithm to use for fitting series to the target time span and interval. Available: average, nearest, none, scale
#### .graphite()
-Pull data from grahite. Configure your graphite server in timelion.json
+Pull data from graphite. Configure your graphite server in timelion.json
Argument | Accepts | Description
--- | --- | ---
View
@@ -34,7 +34,8 @@ var include = [
'lib',
'routes',
'series_functions',
- 'timelion.json'
+ 'timelion.json',
+ 'timelion.private.json'
];
var exclude = Object.keys(pkg.devDependencies).map(function (name) {
return path.join('node_modules', name);
@@ -59,6 +60,7 @@ function syncPluginTo(dest, done) {
if (err) return done(err);
Promise.all(include.map(function (name) {
var source = path.resolve(__dirname, name);
+ try {fs.accessSync(source);} catch (e) {return;};
return new Promise(function (resolve, reject) {
var rsync = new Rsync();
rsync
@@ -1,5 +1,7 @@
var _ = require('lodash');
var config = require('../../timelion.json');
+try {config = _.merge(config, require('../../timelion.private.json'));} catch (e) {}; //eslint-disable-line no-empty
+
var buildTarget = require('../../lib/build_target.js');
var targetSeries;
@@ -20,10 +22,10 @@ module.exports = function (setup) {
targetSeries = buildTarget(this);
},
writeTargetSeries: function (series) {
- targetSeries = _.map(series, function (p) {return p[0]});
+ targetSeries = _.map(series, function (p) {return p[0];});
}
};
tlConfig = _.extend(tlConfig, setup);
return tlConfig;
-};
+};
View
@@ -1,6 +1,6 @@
{
"name": "timelion",
- "version": "0.1.231",
+ "version": "0.1.235",
"dependencies": {
"body-parser": "^1.12.0",
"boom": "^2.8.0",

0 comments on commit 2c49525

Please sign in to comment.