foreman 0.84.0 → 0.85.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/data/export/daemon/process.conf.erb +1 -1
- data/data/export/launchd/launchd.plist.erb +1 -1
- data/data/export/systemd/process.service.erb +1 -1
- data/data/export/upstart/process.conf.erb +1 -1
- data/lib/foreman/engine.rb +2 -1
- data/lib/foreman/export/base.rb +5 -1
- data/lib/foreman/procfile.rb +1 -1
- data/lib/foreman/version.rb +1 -1
- data/man/foreman.1 +1 -1
- data/spec/foreman/procfile_spec.rb +7 -0
- data/spec/spec_helper.rb +10 -2
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 0e43a0881882bfbd5a312184407cf297c245774fd31dd194bc7921f88de02187
|
4
|
+
data.tar.gz: e836814f151cd348c8744a158c2c5e0aaa35edc567d5482fef75b0b7943c8063
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ddc414ab8833e61463cc686cbffe9cb0cb3f6c745963854d57a048f044308d84f6a026378f1b1c90ae1e78a3988f327b86187ffd3871065582bef1623e0c6d6
|
7
|
+
data.tar.gz: 25ea476d1f02817f63040855c45c07f9e2e05753c18b190a715be3f0ff0f61b7dcca82ef2c8a3dc05522a7089a89c8e614e923b2019d0c891104bbab61318b3c
|
@@ -3,6 +3,6 @@ stop on stopping <%= app %>-<%= name.gsub('_', '-') %>
|
|
3
3
|
respawn
|
4
4
|
|
5
5
|
env PORT=<%= port %><% engine.env.each_pair do |var, env| %>
|
6
|
-
env <%= var
|
6
|
+
env <%= var %>=<%= env %><% end %>
|
7
7
|
|
8
8
|
exec start-stop-daemon --start --chuid <%= user %> --chdir <%= engine.root %> --make-pidfile --pidfile <%= run %>/<%= app %>-<%= name %>-<%= num %>.pid --exec <%= executable %><%= arguments %> >> <%= log %>/<%= app %>-<%= name %>-<%= num %>.log 2>&1
|
@@ -6,7 +6,7 @@ User=<%= user %>
|
|
6
6
|
WorkingDirectory=<%= engine.root %>
|
7
7
|
Environment=PORT=%i
|
8
8
|
<% engine.env.each_pair do |var,env| -%>
|
9
|
-
Environment="<%= var
|
9
|
+
Environment="<%= var %>=<%= env %>"
|
10
10
|
<% end -%>
|
11
11
|
ExecStart=/bin/bash -lc 'exec <%= process.command %>'
|
12
12
|
Restart=always
|
data/lib/foreman/engine.rb
CHANGED
data/lib/foreman/export/base.rb
CHANGED
@@ -135,7 +135,11 @@ private ######################################################################
|
|
135
135
|
end
|
136
136
|
|
137
137
|
def write_template(name, target, binding)
|
138
|
-
compiled = ERB.
|
138
|
+
compiled = if ERB.instance_method(:initialize).parameters.assoc(:key) # Ruby 2.6+
|
139
|
+
ERB.new(export_template(name), trim_mode: '-').result(binding)
|
140
|
+
else
|
141
|
+
ERB.new(export_template(name), nil, '-').result(binding)
|
142
|
+
end
|
139
143
|
write_file target, compiled
|
140
144
|
end
|
141
145
|
|
data/lib/foreman/procfile.rb
CHANGED
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" "March 2017" "Foreman 0.85.0" "Foreman Manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBforeman\fR \- manage Procfile\-based applications
|
@@ -22,6 +22,13 @@ describe Foreman::Procfile, :fakefs do
|
|
22
22
|
expect(procfile["foo_bar"]).to eq("./foo_bar")
|
23
23
|
end
|
24
24
|
|
25
|
+
it 'only creates Procfile entries for lines matching regex' do
|
26
|
+
write_procfile
|
27
|
+
procfile = Foreman::Procfile.new("Procfile")
|
28
|
+
keys = procfile.instance_variable_get(:@entries).map(&:first)
|
29
|
+
expect(keys).to match_array(%w[alpha bravo foo-bar foo_bar])
|
30
|
+
end
|
31
|
+
|
25
32
|
it "returns nil when attempting to retrieve an non-existing entry" do
|
26
33
|
write_procfile
|
27
34
|
procfile = Foreman::Procfile.new("Procfile")
|
data/spec/spec_helper.rb
CHANGED
@@ -1,5 +1,12 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
# it throws following message:
|
2
|
+
# W, [2018-02-06T18:16:06.360071 #72025] WARN -- : This usage of the Code Climate Test Reporter is now deprecated. Since version
|
3
|
+
# 1.0, we now require you to run `SimpleCov` in your test/spec helper, and then
|
4
|
+
# run the provided `codeclimate-test-reporter` binary separately to report your
|
5
|
+
# results to Code Climate.
|
6
|
+
#
|
7
|
+
# More information here: https://github.com/codeclimate/ruby-test-reporter/blob/master/README.md
|
8
|
+
# require "codeclimate-test-reporter"
|
9
|
+
# CodeClimate::TestReporter.start
|
3
10
|
|
4
11
|
require "simplecov"
|
5
12
|
SimpleCov.start do
|
@@ -90,6 +97,7 @@ def write_procfile(procfile="Procfile", alpha_env="")
|
|
90
97
|
file.puts "bravo:\t./bravo"
|
91
98
|
file.puts "foo_bar:\t./foo_bar"
|
92
99
|
file.puts "foo-bar:\t./foo-bar"
|
100
|
+
file.puts "# baz:\t./baz"
|
93
101
|
end
|
94
102
|
File.expand_path(procfile)
|
95
103
|
end
|
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.85.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: 2018-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -153,9 +153,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
153
153
|
version: '0'
|
154
154
|
requirements: []
|
155
155
|
rubyforge_project:
|
156
|
-
rubygems_version: 2.
|
156
|
+
rubygems_version: 2.7.3
|
157
157
|
signing_key:
|
158
158
|
specification_version: 4
|
159
159
|
summary: Process manager for applications with multiple components
|
160
160
|
test_files: []
|
161
|
-
has_rdoc:
|