foreman 0.42.0 → 0.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,7 +5,7 @@ engine.procfile.entries.each do |process|
5
5
  1.upto(self.concurrency[process.name]) do |num|
6
6
  port = engine.port_for(process, num, self.port)
7
7
  name = if (conc > 1); "#{process.name}-#{num}" else process.name; end
8
- environment = (engine.environment.map{ |var,env| "#{var.upcase}=#{env}" } + ["PORT=#{port}"])
8
+ environment = (engine.environment.map{ |var,env| %{#{var.upcase}="#{env}"} } + [%{PORT="#{port}"}])
9
9
  app_name = "#{app}-#{name}"
10
10
  app_names << app_name
11
11
  %>
@@ -24,4 +24,4 @@ end
24
24
  %>
25
25
 
26
26
  [group:<%= app %>]
27
- programs=<%= app_names.join(',') %>
27
+ programs=<%= app_names.join(',') %>
@@ -1,5 +1,5 @@
1
1
  module Foreman
2
2
 
3
- VERSION = "0.42.0"
3
+ VERSION = "0.43.0"
4
4
 
5
5
  end
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "FOREMAN" "1" "February 2012" "Foreman 0.39.0" "Foreman Manual"
4
+ .TH "FOREMAN" "1" "February 2012" "Foreman 0.42.0" "Foreman Manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBforeman\fR \- manage Procfile\-based applications
@@ -15,12 +15,11 @@ describe Foreman::Export::Supervisord, :fakefs do
15
15
  it "exports to the filesystem" do
16
16
  supervisord.export
17
17
 
18
- File.read("/tmp/init/app.conf").should == example_export_file("supervisord/app.conf")
18
+ File.read("/tmp/init/app.conf").should == example_export_file("supervisord/app.conf")
19
19
  end
20
20
 
21
21
  it "cleans up if exporting into an existing dir" do
22
22
  mock(FileUtils).rm("/tmp/init/app.conf")
23
-
24
23
  supervisord.export
25
24
  supervisord.export
26
25
  end
@@ -30,8 +29,7 @@ describe Foreman::Export::Supervisord, :fakefs do
30
29
 
31
30
  it "exports to the filesystem with concurrency" do
32
31
  supervisord.export
33
-
34
- File.read("/tmp/init/app.conf").should == example_export_file("supervisord/app-alpha-2.conf")
32
+ File.read("/tmp/init/app.conf").should == example_export_file("supervisord/app-alpha-2.conf")
35
33
  end
36
34
  end
37
35
 
@@ -46,7 +44,6 @@ describe Foreman::Export::Supervisord, :fakefs do
46
44
 
47
45
  it "can export with alternate template files" do
48
46
  supervisord.export
49
-
50
47
  File.read("/tmp/init/app.conf").should == "alternate_template\n"
51
48
  end
52
49
  end
@@ -67,9 +64,22 @@ describe Foreman::Export::Supervisord, :fakefs do
67
64
 
68
65
  it "can export with alternate template files" do
69
66
  supervisord.export
70
-
71
67
  File.read("/tmp/init/app.conf").should == "default_alternate_template\n"
72
68
  end
73
69
  end
74
70
 
71
+ context "environment export" do
72
+ it "correctly translates environment when exporting" do
73
+ File.open("/tmp/supervisord_env", "w") { |f| f.puts("QUEUE=fastqueue,slowqueue\nVERBOSE=1") }
74
+
75
+ engine = Foreman::Engine.new(procfile,:env => "/tmp/supervisord_env")
76
+ supervisor = Foreman::Export::Supervisord.new("/tmp/init", engine, options)
77
+ stub(supervisor).say
78
+
79
+ supervisor.export
80
+
81
+ File.read("/tmp/init/app.conf").should == example_export_file("supervisord/app-env-with-comma.conf")
82
+ end
83
+ end
84
+
75
85
  end
@@ -8,7 +8,7 @@ stdout_logfile=/var/log/app/alpha-1-out.log
8
8
  stderr_logfile=/var/log/app/alpha-1-err.log
9
9
  user=app
10
10
  directory=/tmp/app
11
- environment=PORT=5000
11
+ environment=PORT="5000"
12
12
  [program:app-alpha-2]
13
13
  command=./alpha
14
14
  autostart=true
@@ -18,7 +18,7 @@ stdout_logfile=/var/log/app/alpha-2-out.log
18
18
  stderr_logfile=/var/log/app/alpha-2-err.log
19
19
  user=app
20
20
  directory=/tmp/app
21
- environment=PORT=5001
21
+ environment=PORT="5001"
22
22
 
23
23
  [group:app]
24
24
  programs=app-alpha-1,app-alpha-2
@@ -0,0 +1,24 @@
1
+
2
+ [program:app-alpha]
3
+ command=./alpha
4
+ autostart=true
5
+ autorestart=true
6
+ stopsignal=QUIT
7
+ stdout_logfile=/var/log/app/alpha-1-out.log
8
+ stderr_logfile=/var/log/app/alpha-1-err.log
9
+ user=app
10
+ directory=/tmp/app
11
+ environment=QUEUE="fastqueue,slowqueue",VERBOSE="1",PORT="5000"
12
+ [program:app-bravo]
13
+ command=./bravo
14
+ autostart=true
15
+ autorestart=true
16
+ stopsignal=QUIT
17
+ stdout_logfile=/var/log/app/bravo-1-out.log
18
+ stderr_logfile=/var/log/app/bravo-1-err.log
19
+ user=app
20
+ directory=/tmp/app
21
+ environment=QUEUE="fastqueue,slowqueue",VERBOSE="1",PORT="5100"
22
+
23
+ [group:app]
24
+ programs=app-alpha,app-bravo
@@ -0,0 +1,21 @@
1
+
2
+ [program:app-alpha]
3
+ command=./alpha
4
+ autostart=true
5
+ autorestart=true
6
+ stopsignal=QUIT
7
+ stdout_logfile=/var/log/app/alpha-1-out.log
8
+ stderr_logfile=/var/log/app/alpha-1-err.log
9
+ user=app
10
+ directory=/tmp/app
11
+ environment=FOO="bar",PORT="5000"
12
+ [program:app-bravo]
13
+ command=./bravo
14
+ autostart=true
15
+ autorestart=true
16
+ stopsignal=QUIT
17
+ stdout_logfile=/var/log/app/bravo-1-out.log
18
+ stderr_logfile=/var/log/app/bravo-1-err.log
19
+ user=app
20
+ directory=/tmp/app
21
+ environment=FOO="bar",PORT="5100"
@@ -8,7 +8,7 @@ stdout_logfile=/var/log/app/alpha-1-out.log
8
8
  stderr_logfile=/var/log/app/alpha-1-err.log
9
9
  user=app
10
10
  directory=/tmp/app
11
- environment=PORT=5000
11
+ environment=PORT="5000"
12
12
  [program:app-bravo]
13
13
  command=./bravo
14
14
  autostart=true
@@ -18,7 +18,7 @@ stdout_logfile=/var/log/app/bravo-1-out.log
18
18
  stderr_logfile=/var/log/app/bravo-1-err.log
19
19
  user=app
20
20
  directory=/tmp/app
21
- environment=PORT=5100
21
+ environment=PORT="5100"
22
22
 
23
23
  [group:app]
24
24
  programs=app-alpha,app-bravo
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.42.0
4
+ version: 0.43.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-18 00:00:00.000000000 Z
12
+ date: 2012-04-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
16
- requirement: &70264218748020 !ruby/object:Gem::Requirement
16
+ requirement: &70234170306080 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: 0.13.6
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70264218748020
24
+ version_requirements: *70234170306080
25
25
  description: Process manager for applications with multiple components
26
26
  email: ddollar@gmail.com
27
27
  executables:
@@ -89,6 +89,8 @@ files:
89
89
  - spec/resources/export/runit/app-bravo-1-log-run
90
90
  - spec/resources/export/runit/app-bravo-1-run
91
91
  - spec/resources/export/supervisord/app-alpha-2.conf
92
+ - spec/resources/export/supervisord/app-env-with-comma.conf
93
+ - spec/resources/export/supervisord/app-env.conf
92
94
  - spec/resources/export/supervisord/app.conf
93
95
  - spec/resources/export/upstart/app-alpha-1.conf
94
96
  - spec/resources/export/upstart/app-alpha-2.conf