foreman 0.76.0 → 0.77.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a46526a39ab41e0411a81f1f09fd8f8a567490b0
4
- data.tar.gz: 210e82d37b359fb128588a374815d7dcfac22140
3
+ metadata.gz: 8ace00c61e2302bb26cb004552b600bf0c791f3b
4
+ data.tar.gz: d9d96a049154dcac4402f72a4251bcd5ac21daf5
5
5
  SHA512:
6
- metadata.gz: 9bfb35d1a2f01365708c4bc9dc8be5f7959bb42863e376206808651e20ed33d201d4dc3f96bff98c0face9db589b05a21d7ce49310b8b218db614efe98d978eb
7
- data.tar.gz: 7f2d6cca39949dae2ef8d8b58fb4ae20a2b4e81d695cf7cf980e459ae1404cb56707532a6fc0fb98f61c5cd68d93934b592c2ca3d70aafd5b41a644926458a00
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
- (Dir["#{location}/#{app}-*.conf"] << "#{location}/#{app}.conf").each do |file|
10
- clean file
11
- end
9
+ master_file = "#{app}.conf"
12
10
 
13
- write_template master_template, "#{app}.conf", binding
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, "#{app}-#{name}.conf", binding
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
- write_template process_template, "#{app}-#{name}-#{num}.conf", binding
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
@@ -1,5 +1,5 @@
1
1
  module Foreman
2
2
 
3
- VERSION = "0.76.0"
3
+ VERSION = "0.77.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" "August 2014" "Foreman 0.76.0" "Foreman Manual"
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
@@ -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-alpha-2]
13
13
  command=./alpha
14
14
  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.76.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: 2014-11-26 00:00:00.000000000 Z
11
+ date: 2015-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor