Comparing version 0.2.1 to 0.3.0
@@ -0,1 +1,20 @@ | ||
2014-04-10, Version v0.3.0 | ||
========================== | ||
* Handle env values with = in them (Ryan Graham) | ||
* Add new FOREMAN_WORKER_NAME automatic variable (Ryan Graham) | ||
* export: Improve comments in Upstart-single jobs (Ryan Graham) | ||
* export: Don't export PATH env var to subjobs (Ryan Graham) | ||
* env: Don't override PATH if set in .env (Ryan Graham) | ||
* export: Quote env var values in Upstart jobs (Ryan Graham) | ||
* upstart-single: Add coredump limits (Ryan Graham) | ||
* Fixed typo (Brian Gonzalez) | ||
2014-03-28, Version v0.2.1 | ||
@@ -2,0 +21,0 @@ ========================== |
@@ -27,5 +27,6 @@ var fs = require('fs') | ||
function capturePair(line) { | ||
var pair = line.split('=',2) | ||
.map(method('trim')) | ||
env[pair[0]] = parseValue(pair[1]) | ||
var pair = line.split('='); | ||
var key = pair[0].trim(); | ||
var rawVal = pair.slice(1).join('=').trim(); | ||
env[key] = parseValue(rawVal); | ||
} | ||
@@ -122,3 +123,3 @@ | ||
cons.Warn("No ENV file found") | ||
env = { PATH: process.env.PATH } | ||
env = {} | ||
} else { | ||
@@ -134,4 +135,4 @@ data = fs.readFileSync(path); | ||
} | ||
env.PATH = process.env.PATH | ||
} | ||
env.PATH = env.PATH || process.env.PATH; | ||
return env; | ||
@@ -138,0 +139,0 @@ } |
@@ -52,2 +52,5 @@ var ppath = require('path') | ||
render('upstart-single/foreman.conf', conf, writeout(path) ) | ||
display.Warn('upstart-single jobs attempt to raise limits and will fail ' + | ||
'to start if the limits cannot be raised to the desired ' + | ||
'levels. Some manual editing may be required.') | ||
} | ||
@@ -54,0 +57,0 @@ |
@@ -79,2 +79,3 @@ var prog = require('child_process') | ||
p.env.PORT = port + j + k*100; | ||
p.env.FOREMAN_WORKER_NAME = p.env.FOREMAN_WORKER_NAME || key+"."+(i+1) | ||
@@ -81,0 +82,0 @@ run(key+"."+(i+1),p,emitter); |
@@ -217,3 +217,4 @@ #!/usr/bin/env node | ||
} | ||
envl.push({ key: 'PORT', value: conf.port }) | ||
envl.push({ key: 'PORT', value: conf.port }); | ||
envl.push({ key: 'FOREMAN_WORKER_NAME', value: conf.process+'.'+conf.number }); | ||
@@ -220,0 +221,0 @@ conf.envs = envl; |
{ | ||
"name": "foreman", | ||
"version": "0.2.1", | ||
"version": "0.3.0", | ||
"homepage": "http://strongloop.github.io/node-foreman/", | ||
@@ -5,0 +5,0 @@ "description": "Node Implementation of Foreman", |
@@ -18,2 +18,8 @@ # Node Foreman [![Build Status](https://travis-ci.org/strongloop/node-foreman.svg)](https://travis-ci.org/strongloop/node-foreman) | ||
## Deviations from the original Foreman | ||
* Each worker has an additional automatic environment variable, | ||
`FOREMAN_WORKER_NAME`, that contains the the process name and worker number. | ||
* example: `web.1`, `worker.1` | ||
### How to Contribute | ||
@@ -116,3 +122,3 @@ | ||
For example, good candiates for the `.env` file are MySQL connection information, | ||
For example, good candidates for the `.env` file are MySQL connection information, | ||
port bindings, and other passwords. | ||
@@ -119,0 +125,0 @@ |
@@ -22,10 +22,1 @@ var assert = require('assert') | ||
assert.equal(dumpedFlat, expected) | ||
var parsedHash = envs.KeyValue( | ||
'#commented heading. \n' + | ||
'key = "quoted#hash" \n' + | ||
'key2 = stripped#comment \n' | ||
) | ||
assert.equal(parsedHash['key'], 'quoted#hash') | ||
assert.equal(parsedHash['key2'], 'stripped') |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
324533
72
962
266
20