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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 07592e3ada2314429eef1c9e1c0ba6bece95ab7e
4
- data.tar.gz: 445fb48e93a2447988598b2db0f60a78c1991b14
2
+ SHA256:
3
+ metadata.gz: 0e43a0881882bfbd5a312184407cf297c245774fd31dd194bc7921f88de02187
4
+ data.tar.gz: e836814f151cd348c8744a158c2c5e0aaa35edc567d5482fef75b0b7943c8063
5
5
  SHA512:
6
- metadata.gz: 546d1fb8701f569b96ba69885e6d390385abe15a309ffbe5a03a68a4cd074a878a0ba06d7dbe7f15bf0399e72c6c72097c8bfa10f94a8552b875787a9e88f1dd
7
- data.tar.gz: d3a0b59f02ef1203f8cb4e8b354a789182cb7eaa9afd053a17bba0450f9f34ff03b287b410be514f8a759d9a7295ee080e14d75f073be65abc8281f5cd90c1f6
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.upcase %>=<%= env %><% end %>
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
@@ -7,7 +7,7 @@
7
7
  <key>EnvironmentVariables</key>
8
8
  <dict>
9
9
  <%- engine.env.merge("PORT" => port).each_pair do |var,env| -%>
10
- <key><%= var.upcase %></key>
10
+ <key><%= var %></key>
11
11
  <string><%= env %></string>
12
12
  <%- end -%>
13
13
  </dict>
@@ -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.upcase %>=<%= env %>"
9
+ Environment="<%= var %>=<%= env %>"
10
10
  <% end -%>
11
11
  ExecStart=/bin/bash -lc 'exec <%= process.command %>'
12
12
  Restart=always
@@ -5,7 +5,7 @@ respawn
5
5
  env PORT=<%= port %>
6
6
  <% engine.env.each do |name,value| -%>
7
7
  <% next if name.upcase == "PORT" -%>
8
- env <%= name.upcase %>='<%= value.gsub(/'/, "'\"'\"'") %>'
8
+ env <%= name %>='<%= value.gsub(/'/, "'\"'\"'") %>'
9
9
  <% end -%>
10
10
 
11
11
  setuid <%= user %>
@@ -197,7 +197,8 @@ class Foreman::Engine
197
197
  end
198
198
  else
199
199
  begin
200
- Process.kill signal, *@running.keys unless @running.empty?
200
+ pids = @running.keys.compact
201
+ Process.kill signal, *pids unless pids.empty?
201
202
  rescue Errno::ESRCH, Errno::EPERM
202
203
  end
203
204
  end
@@ -135,7 +135,11 @@ private ######################################################################
135
135
  end
136
136
 
137
137
  def write_template(name, target, binding)
138
- compiled = ERB.new(export_template(name), nil, '-').result(binding)
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
 
@@ -21,7 +21,7 @@ class Foreman::Procfile
21
21
 
22
22
  # Yield each +Procfile+ entry in order
23
23
  #
24
- def entries(&blk)
24
+ def entries
25
25
  @entries.each do |(name, command)|
26
26
  yield name, command
27
27
  end
@@ -1,5 +1,5 @@
1
1
  module Foreman
2
2
 
3
- VERSION = "0.84.0"
3
+ VERSION = "0.85.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" "January 2017" "Foreman 0.84.0" "Foreman Manual"
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")
@@ -1,5 +1,12 @@
1
- require "codeclimate-test-reporter"
2
- CodeClimate::TestReporter.start
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.84.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: 2017-03-28 00:00:00.000000000 Z
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.5.1
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: