Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
383c1f87af | ||
|
|
ce3003b026 | ||
|
|
e06f4b2f9e | ||
|
|
b721fd894e | ||
|
|
b8ea6fd4b3 | ||
|
|
dbda63263b | ||
|
|
93cdc31be0 | ||
|
|
4dfbe46690 |
@@ -1,3 +1,10 @@
|
||||
## 0.42.0 (2012-04-18)
|
||||
|
||||
* Move read_environment to a public class method. [Phil Hagelberg]
|
||||
* Drop parka dependency [Phil Hagelberg]
|
||||
* add group support for supervisord [Raphael Randschau]
|
||||
* fix enviroment export [Raphael Randschau]
|
||||
|
||||
## 0.41.0 (2012-03-16)
|
||||
|
||||
* replace term-ansicolor with built-in colorization [David Dollar]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
foreman (0.42.0)
|
||||
foreman (0.43.0)
|
||||
thor (>= 0.13.6)
|
||||
|
||||
GEM
|
||||
|
||||
@@ -5,7 +5,7 @@ engine.procfile.entries.each do |process|
|
||||
1.upto(self.concurrency[process.name]) do |num|
|
||||
port = engine.port_for(process, num, self.port)
|
||||
name = if (conc > 1); "#{process.name}-#{num}" else process.name; end
|
||||
environment = (engine.environment.map{ |var,env| "#{var.upcase}=#{env}" } + ["PORT=#{port}"])
|
||||
environment = (engine.environment.map{ |var,env| %{#{var.upcase}="#{env}"} } + [%{PORT="#{port}"}])
|
||||
app_name = "#{app}-#{name}"
|
||||
app_names << app_name
|
||||
%>
|
||||
@@ -24,4 +24,4 @@ end
|
||||
%>
|
||||
|
||||
[group:<%= app %>]
|
||||
programs=<%= app_names.join(',') %>
|
||||
programs=<%= app_names.join(',') %>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
module Foreman
|
||||
|
||||
VERSION = "0.42.0"
|
||||
VERSION = "0.43.0"
|
||||
|
||||
end
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "FOREMAN" "1" "February 2012" "Foreman 0.39.0" "Foreman Manual"
|
||||
.TH "FOREMAN" "1" "February 2012" "Foreman 0.42.0" "Foreman Manual"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBforeman\fR \- manage Procfile\-based applications
|
||||
|
||||
@@ -15,12 +15,11 @@ describe Foreman::Export::Supervisord, :fakefs do
|
||||
it "exports to the filesystem" do
|
||||
supervisord.export
|
||||
|
||||
File.read("/tmp/init/app.conf").should == example_export_file("supervisord/app.conf")
|
||||
File.read("/tmp/init/app.conf").should == example_export_file("supervisord/app.conf")
|
||||
end
|
||||
|
||||
it "cleans up if exporting into an existing dir" do
|
||||
mock(FileUtils).rm("/tmp/init/app.conf")
|
||||
|
||||
supervisord.export
|
||||
supervisord.export
|
||||
end
|
||||
@@ -30,8 +29,7 @@ describe Foreman::Export::Supervisord, :fakefs do
|
||||
|
||||
it "exports to the filesystem with concurrency" do
|
||||
supervisord.export
|
||||
|
||||
File.read("/tmp/init/app.conf").should == example_export_file("supervisord/app-alpha-2.conf")
|
||||
File.read("/tmp/init/app.conf").should == example_export_file("supervisord/app-alpha-2.conf")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -46,7 +44,6 @@ describe Foreman::Export::Supervisord, :fakefs do
|
||||
|
||||
it "can export with alternate template files" do
|
||||
supervisord.export
|
||||
|
||||
File.read("/tmp/init/app.conf").should == "alternate_template\n"
|
||||
end
|
||||
end
|
||||
@@ -67,9 +64,22 @@ describe Foreman::Export::Supervisord, :fakefs do
|
||||
|
||||
it "can export with alternate template files" do
|
||||
supervisord.export
|
||||
|
||||
File.read("/tmp/init/app.conf").should == "default_alternate_template\n"
|
||||
end
|
||||
end
|
||||
|
||||
context "environment export" do
|
||||
it "correctly translates environment when exporting" do
|
||||
File.open("/tmp/supervisord_env", "w") { |f| f.puts("QUEUE=fastqueue,slowqueue\nVERBOSE=1") }
|
||||
|
||||
engine = Foreman::Engine.new(procfile,:env => "/tmp/supervisord_env")
|
||||
supervisor = Foreman::Export::Supervisord.new("/tmp/init", engine, options)
|
||||
stub(supervisor).say
|
||||
|
||||
supervisor.export
|
||||
|
||||
File.read("/tmp/init/app.conf").should == example_export_file("supervisord/app-env-with-comma.conf")
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -8,7 +8,7 @@ stdout_logfile=/var/log/app/alpha-1-out.log
|
||||
stderr_logfile=/var/log/app/alpha-1-err.log
|
||||
user=app
|
||||
directory=/tmp/app
|
||||
environment=PORT=5000
|
||||
environment=PORT="5000"
|
||||
[program:app-alpha-2]
|
||||
command=./alpha
|
||||
autostart=true
|
||||
@@ -18,7 +18,7 @@ stdout_logfile=/var/log/app/alpha-2-out.log
|
||||
stderr_logfile=/var/log/app/alpha-2-err.log
|
||||
user=app
|
||||
directory=/tmp/app
|
||||
environment=PORT=5001
|
||||
environment=PORT="5001"
|
||||
|
||||
[group:app]
|
||||
programs=app-alpha-1,app-alpha-2
|
||||
|
||||
24
spec/resources/export/supervisord/app-env-with-comma.conf
Normal file
24
spec/resources/export/supervisord/app-env-with-comma.conf
Normal file
@@ -0,0 +1,24 @@
|
||||
|
||||
[program:app-alpha]
|
||||
command=./alpha
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stopsignal=QUIT
|
||||
stdout_logfile=/var/log/app/alpha-1-out.log
|
||||
stderr_logfile=/var/log/app/alpha-1-err.log
|
||||
user=app
|
||||
directory=/tmp/app
|
||||
environment=QUEUE="fastqueue,slowqueue",VERBOSE="1",PORT="5000"
|
||||
[program:app-bravo]
|
||||
command=./bravo
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stopsignal=QUIT
|
||||
stdout_logfile=/var/log/app/bravo-1-out.log
|
||||
stderr_logfile=/var/log/app/bravo-1-err.log
|
||||
user=app
|
||||
directory=/tmp/app
|
||||
environment=QUEUE="fastqueue,slowqueue",VERBOSE="1",PORT="5100"
|
||||
|
||||
[group:app]
|
||||
programs=app-alpha,app-bravo
|
||||
21
spec/resources/export/supervisord/app-env.conf
Normal file
21
spec/resources/export/supervisord/app-env.conf
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
[program:app-alpha]
|
||||
command=./alpha
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stopsignal=QUIT
|
||||
stdout_logfile=/var/log/app/alpha-1-out.log
|
||||
stderr_logfile=/var/log/app/alpha-1-err.log
|
||||
user=app
|
||||
directory=/tmp/app
|
||||
environment=FOO="bar",PORT="5000"
|
||||
[program:app-bravo]
|
||||
command=./bravo
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stopsignal=QUIT
|
||||
stdout_logfile=/var/log/app/bravo-1-out.log
|
||||
stderr_logfile=/var/log/app/bravo-1-err.log
|
||||
user=app
|
||||
directory=/tmp/app
|
||||
environment=FOO="bar",PORT="5100"
|
||||
@@ -8,7 +8,7 @@ stdout_logfile=/var/log/app/alpha-1-out.log
|
||||
stderr_logfile=/var/log/app/alpha-1-err.log
|
||||
user=app
|
||||
directory=/tmp/app
|
||||
environment=PORT=5000
|
||||
environment=PORT="5000"
|
||||
[program:app-bravo]
|
||||
command=./bravo
|
||||
autostart=true
|
||||
@@ -18,7 +18,7 @@ stdout_logfile=/var/log/app/bravo-1-out.log
|
||||
stderr_logfile=/var/log/app/bravo-1-err.log
|
||||
user=app
|
||||
directory=/tmp/app
|
||||
environment=PORT=5100
|
||||
environment=PORT="5100"
|
||||
|
||||
[group:app]
|
||||
programs=app-alpha,app-bravo
|
||||
|
||||
Reference in New Issue
Block a user