foreman 0.76.0 → 0.77.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/data/export/supervisord/app.conf.erb +5 -4
- data/lib/foreman/export/upstart.rb +10 -6
- data/lib/foreman/version.rb +1 -1
- data/man/foreman.1 +1 -1
- data/spec/foreman/export/upstart_spec.rb +14 -0
- data/spec/resources/export/supervisord/app-alpha-1.conf +3 -1
- data/spec/resources/export/supervisord/app-alpha-2.conf +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ace00c61e2302bb26cb004552b600bf0c791f3b
|
4
|
+
data.tar.gz: d9d96a049154dcac4402f72a4251bcd5ac21daf5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d6f953545ff47dc24a7dd19739fd4cf5b5a898830180bed8f953b9d5fa2e953339163a86040ce1a7589b9dd9b66f5e065bfbc6a2555462fccca6645073d59a2
|
7
|
+
data.tar.gz: 2ffde5cf550f9ae2f2c14e7b6f5ed06bdccbbad46b65b8bb7d6d37e41c7328e193391a0df5156fcb6575164ad708ffeec87cba89684a1c60951925f6e8adddce
|
@@ -8,7 +8,7 @@ engine.each_process do |name, process|
|
|
8
8
|
"#{key}=\"#{shell_quote(value)}\""
|
9
9
|
end
|
10
10
|
app_names << full_name
|
11
|
-
|
11
|
+
-%>
|
12
12
|
[program:<%= full_name %>]
|
13
13
|
command=<%= process.command %>
|
14
14
|
autostart=true
|
@@ -18,10 +18,11 @@ stdout_logfile=<%= log %>/<%= name %>-<%= num %>.log
|
|
18
18
|
stderr_logfile=<%= log %>/<%= name %>-<%= num %>.error.log
|
19
19
|
user=<%= user %>
|
20
20
|
directory=<%= engine.root %>
|
21
|
-
environment=<%= environment.join(',')
|
21
|
+
environment=<%= environment.join(',') %>
|
22
|
+
|
23
|
+
<%
|
22
24
|
end
|
23
25
|
end
|
24
|
-
|
25
|
-
|
26
|
+
-%>
|
26
27
|
[group:<%= app %>]
|
27
28
|
programs=<%= app_names.join(',') %>
|
@@ -6,19 +6,23 @@ class Foreman::Export::Upstart < Foreman::Export::Base
|
|
6
6
|
def export
|
7
7
|
super
|
8
8
|
|
9
|
-
|
10
|
-
clean file
|
11
|
-
end
|
9
|
+
master_file = "#{app}.conf"
|
12
10
|
|
13
|
-
|
11
|
+
clean File.join(location, master_file)
|
12
|
+
write_template master_template, master_file, binding
|
14
13
|
|
15
14
|
engine.each_process do |name, process|
|
15
|
+
process_master_file = "#{app}-#{name}.conf"
|
16
|
+
clean File.join(location, process_master_file)
|
17
|
+
|
16
18
|
next if engine.formation[name] < 1
|
17
|
-
write_template process_master_template,
|
19
|
+
write_template process_master_template, process_master_file, binding
|
18
20
|
|
19
21
|
1.upto(engine.formation[name]) do |num|
|
20
22
|
port = engine.port_for(process, num)
|
21
|
-
|
23
|
+
process_file = "#{app}-#{name}-#{num}.conf"
|
24
|
+
clean File.join(location, process_file)
|
25
|
+
write_template process_template, process_file, binding
|
22
26
|
end
|
23
27
|
end
|
24
28
|
end
|
data/lib/foreman/version.rb
CHANGED
data/man/foreman.1
CHANGED
@@ -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" "
|
4
|
+
.TH "FOREMAN" "1" "January 2015" "Foreman 0.77.0" "Foreman Manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBforeman\fR \- manage Procfile\-based applications
|
@@ -50,6 +50,20 @@ describe Foreman::Export::Upstart, :fakefs do
|
|
50
50
|
upstart.export
|
51
51
|
end
|
52
52
|
|
53
|
+
it 'does not delete exported files for app which share name prefix' do
|
54
|
+
FileUtils.mkdir_p "/tmp/init"
|
55
|
+
|
56
|
+
["app-worker", "app-worker-worker", "app-worker-worker-1"].each do |name|
|
57
|
+
path = "/tmp/init/#{name}.conf"
|
58
|
+
FileUtils.touch(path)
|
59
|
+
dont_allow(FileUtils).rm(path)
|
60
|
+
end
|
61
|
+
|
62
|
+
upstart.export
|
63
|
+
expect(File.exist?('/tmp/init/app.conf')).to be true
|
64
|
+
expect(File.exist?('/tmp/init/app-worker.conf')).to be true
|
65
|
+
end
|
66
|
+
|
53
67
|
it "quotes and escapes environment variables" do
|
54
68
|
engine.env['KEY'] = 'd"\|d'
|
55
69
|
upstart.export
|
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
1
|
[program:app-alpha-1]
|
3
2
|
command=./alpha
|
4
3
|
autostart=true
|
@@ -9,6 +8,7 @@ stderr_logfile=/var/log/app/alpha-1.error.log
|
|
9
8
|
user=app
|
10
9
|
directory=/tmp/app
|
11
10
|
environment=PORT="5000"
|
11
|
+
|
12
12
|
[program:app-bravo-1]
|
13
13
|
command=./bravo
|
14
14
|
autostart=true
|
@@ -19,6 +19,7 @@ stderr_logfile=/var/log/app/bravo-1.error.log
|
|
19
19
|
user=app
|
20
20
|
directory=/tmp/app
|
21
21
|
environment=PORT="5100"
|
22
|
+
|
22
23
|
[program:app-foo_bar-1]
|
23
24
|
command=./foo_bar
|
24
25
|
autostart=true
|
@@ -29,6 +30,7 @@ stderr_logfile=/var/log/app/foo_bar-1.error.log
|
|
29
30
|
user=app
|
30
31
|
directory=/tmp/app
|
31
32
|
environment=PORT="5200"
|
33
|
+
|
32
34
|
[program:app-foo-bar-1]
|
33
35
|
command=./foo-bar
|
34
36
|
autostart=true
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.77.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Dollar
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|