From 0fe6bc961197f4a3a1e8febbb24f92fbdde64f9f Mon Sep 17 00:00:00 2001 From: Qiu Chaofan Date: Mon, 26 Dec 2022 18:07:23 +0800 Subject: [PATCH 01/24] Rename usage of Dir/File.exists to exist The singular methods were deprecated long ago and finally removed in Ruby 3.2.0. --- lib/foreman/export/base.rb | 8 ++++---- spec/foreman/export/daemon_spec.rb | 2 +- spec/foreman/export/upstart_spec.rb | 2 +- tasks/dist.rake | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/foreman/export/base.rb b/lib/foreman/export/base.rb index 094555a8..2608b546 100644 --- a/lib/foreman/export/base.rb +++ b/lib/foreman/export/base.rb @@ -83,7 +83,7 @@ def self.warn_deprecation! def chown user, dir FileUtils.chown user, nil, dir rescue - error("Could not chown #{dir} to #{user}") unless File.writable?(dir) || ! File.exists?(dir) + error("Could not chown #{dir} to #{user}") unless File.writable?(dir) || ! File.exist?(dir) end def error(message) @@ -95,13 +95,13 @@ def say(message) end def clean(filename) - return unless File.exists?(filename) + return unless File.exist?(filename) say "cleaning up: #{filename}" FileUtils.rm(filename) end def clean_dir(dirname) - return unless File.exists?(dirname) + return unless File.exist?(dirname) say "cleaning up directory: #{dirname}" FileUtils.rm_r(dirname) end @@ -130,7 +130,7 @@ def export_template(name, file=nil, template_root=nil) matchers << File.join(options[:template], name_without_first) if options[:template] matchers << File.expand_path("~/.foreman/templates/#{name}") matchers << File.expand_path("../../../../data/export/#{name}", __FILE__) - File.read(matchers.detect { |m| File.exists?(m) }) + File.read(matchers.detect { |m| File.exist?(m) }) end end diff --git a/spec/foreman/export/daemon_spec.rb b/spec/foreman/export/daemon_spec.rb index fe40dd28..112784a0 100644 --- a/spec/foreman/export/daemon_spec.rb +++ b/spec/foreman/export/daemon_spec.rb @@ -60,7 +60,7 @@ expect(File.read("/tmp/init/app-alpha.conf")).to eq(example_export_file("daemon/app-alpha.conf")) expect(File.read("/tmp/init/app-alpha-1.conf")).to eq(example_export_file("daemon/app-alpha-1.conf")) expect(File.read("/tmp/init/app-alpha-2.conf")).to eq(example_export_file("daemon/app-alpha-2.conf")) - expect(File.exists?("/tmp/init/app-bravo-1.conf")).to eq(false) + expect(File.exist?("/tmp/init/app-bravo-1.conf")).to eq(false) end end diff --git a/spec/foreman/export/upstart_spec.rb b/spec/foreman/export/upstart_spec.rb index 2151f74e..5c734978 100644 --- a/spec/foreman/export/upstart_spec.rb +++ b/spec/foreman/export/upstart_spec.rb @@ -81,7 +81,7 @@ expect(File.read("/tmp/init/app-alpha.conf")).to eq(example_export_file("upstart/app-alpha.conf")) expect(File.read("/tmp/init/app-alpha-1.conf")).to eq(example_export_file("upstart/app-alpha-1.conf")) expect(File.read("/tmp/init/app-alpha-2.conf")).to eq(example_export_file("upstart/app-alpha-2.conf")) - expect(File.exists?("/tmp/init/app-bravo-1.conf")).to eq(false) + expect(File.exist?("/tmp/init/app-bravo-1.conf")).to eq(false) end end diff --git a/tasks/dist.rake b/tasks/dist.rake index b4c381e3..84bfab8e 100644 --- a/tasks/dist.rake +++ b/tasks/dist.rake @@ -40,7 +40,7 @@ def beta? end def clean(file) - rm file if File.exists?(file) + rm file if File.exist?(file) end def distribution_files(type=nil) From 46938758f4477cfd54da2908b300a7deaaa5d6ab Mon Sep 17 00:00:00 2001 From: Ben Wilber Date: Sat, 22 Apr 2023 11:53:20 -0400 Subject: [PATCH 02/24] Fix misleading comment at the top of procfile.rb that indicates that hyphens "-" are not allowed in process names. Several of the ports listed in the README have incorrectly not allowed hyphens to be present in process names. I believe it's because they took inspiration from this misleading comment at the top of the procfile.rb file. [Haskell](https://github.com/fujimura/houseman/blob/f4a5da44a35a04c84694118c91894bda41efaaa0/src/Procfile/Parse.hs#L21) [Go](https://github.com/mattn/goreman/blob/ebb9736b7c7f7f3425280ab69e1f7989fb34eadc/main.go#L103) [Java](https://github.com/owenthereal/gaffer/blob/5704f4de1d438cc6527f7f4b5a439940607ccd54/src/main/java/gaffer/procfile/Procfile.java#L14) --- lib/foreman/procfile.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/foreman/procfile.rb b/lib/foreman/procfile.rb index b9bd191e..b896dab3 100644 --- a/lib/foreman/procfile.rb +++ b/lib/foreman/procfile.rb @@ -4,7 +4,7 @@ # # A valid Procfile entry is captured by this regex: # -# /^([A-Za-z0-9_]+):\s*(.+)$/ +# /^([A-Za-z0-9_-]+):\s*(.+)$/ # # All other lines are ignored. # From 0ebcb0826403eca0d28f5107c5ea461b70da0eff Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Thu, 25 Feb 2021 11:13:38 -0300 Subject: [PATCH 03/24] spec_helper: don't try to remove /tmp The FakeFS spec helper already cleans up the filesystem after each test. Also, that after helper is executed after FakeFS already deactivated itself, so in some systems, that can cause the real /tmp to be removed if the user running the tests has permissions to do so. --- spec/spec_helper.rb | 3 --- 1 file changed, 3 deletions(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 2934458a..87e68890 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -171,7 +171,4 @@ def capture_stdout config.before(:each) do FileUtils.mkdir_p('/tmp') end - config.after(:each) do - FileUtils.rm_rf('/tmp') - end end From 14aba8d9a5947fb6fd5b0a957019e18c23fce7e3 Mon Sep 17 00:00:00 2001 From: Nick LaMuro Date: Mon, 13 Jul 2020 18:55:19 -0500 Subject: [PATCH 04/24] [Foreman::Procfile#load] Fail when empty Includes logic to cause loading an empty Procfile to raise a Foreman::Procfile::EmptyFileError. Keeps existing logic/error message for `foreman check`, just rescues this new error when doing so. --- lib/foreman/cli.rb | 3 ++- lib/foreman/procfile.rb | 8 +++++++- spec/foreman/procfile_spec.rb | 8 ++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/lib/foreman/cli.rb b/lib/foreman/cli.rb index 67d697ab..9cd51786 100644 --- a/lib/foreman/cli.rb +++ b/lib/foreman/cli.rb @@ -69,8 +69,9 @@ def export(format, location=nil) def check check_procfile! engine.load_procfile(procfile) - error "no processes defined" unless engine.processes.length > 0 puts "valid procfile detected (#{engine.process_names.join(', ')})" + rescue Foreman::Procfile::EmptyFileError + error "no processes defined" end desc "run COMMAND [ARGS...]", "Run a command using your application's environment" diff --git a/lib/foreman/procfile.rb b/lib/foreman/procfile.rb index b896dab3..74887212 100644 --- a/lib/foreman/procfile.rb +++ b/lib/foreman/procfile.rb @@ -10,6 +10,8 @@ # class Foreman::Procfile + EmptyFileError = Class.new(StandardError) + # Initialize a Procfile # # @param [String] filename (nil) An optional filename to read from @@ -60,7 +62,11 @@ def delete(name) # @param [String] filename The filename of the +Procfile+ to load # def load(filename) - @entries.replace parse(filename) + parse_data = parse(filename) + + raise EmptyFileError if parse_data.empty? + + @entries.replace parse_data end # Save a Procfile to a file diff --git a/spec/foreman/procfile_spec.rb b/spec/foreman/procfile_spec.rb index 71c15ea9..ae604245 100644 --- a/spec/foreman/procfile_spec.rb +++ b/spec/foreman/procfile_spec.rb @@ -22,6 +22,14 @@ expect(procfile["foo_bar"]).to eq("./foo_bar") end + it "raises an error if Procfile is empty" do + write_file "Procfile" do |procfile| + procfile.puts + end + + expect { Foreman::Procfile.new("Procfile") }.to raise_error described_class::EmptyFileError + end + it 'only creates Procfile entries for lines matching regex' do write_procfile procfile = Foreman::Procfile.new("Procfile") From fb80608edadbfe04a469ed445b91210b2c3e380e Mon Sep 17 00:00:00 2001 From: Nick LaMuro Date: Mon, 13 Jul 2020 17:19:16 -0500 Subject: [PATCH 05/24] [engine/cli.rb] Handle nil name_padding When (mistakenly) starting foreman with a empty Procfile, it ends up not being possible to exit this process via a TERM signal due to the following error: $ foreman start ERROR: Procfile does not exist. $ touch Procfile $ bin/foreman start ^Ccomparison of NilClass with 6 failed ./lib/foreman/engine/cli.rb:80:in `name_padding' ./lib/foreman/engine/cli.rb:85:in `pad_process_name' ./lib/foreman/engine/cli.rb:61:in `block in output' ./lib/foreman/engine/cli.rb:57:in `each' ./lib/foreman/engine/cli.rb:57:in `output' ./lib/foreman/engine.rb:335:in `block in output_with_mutex' ./lib/foreman/engine.rb:334:in `synchronize' ./lib/foreman/engine.rb:334:in `output_with_mutex' ./lib/foreman/engine.rb:340:in `system' ./lib/foreman/engine.rb:124:in `handle_interrupt' ./lib/foreman/engine.rb:104:in `handle_signal' ./lib/foreman/engine.rb:389:in `handle_signals' ./lib/foreman/engine.rb:412:in `block (2 levels) in watch_for_output' ./lib/foreman/engine.rb:409:in `loop' ./lib/foreman/engine.rb:409:in `block in watch_for_output' ^C^C^C^C^C^X^Z [1]+ Stopped bin/foreman start $ kill %1 $ jobs [1]+ Running bin/foreman start & $ jobs [1]+ Running bin/foreman start & $ kill -9 %1 [1]+ Killed: 9 bin/foreman start $ jobs By adding a `.to_i`, this simply allows the `Engine::Cli#name_padding` method to default to 6, allowing the rest of the shutdown process to finish executing and exit the process gracefully. --- lib/foreman/engine/cli.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/foreman/engine/cli.rb b/lib/foreman/engine/cli.rb index 7ea71375..a6055332 100644 --- a/lib/foreman/engine/cli.rb +++ b/lib/foreman/engine/cli.rb @@ -77,7 +77,7 @@ def name_padding @name_padding ||= begin index_padding = @names.values.map { |n| formation[n] }.max.to_s.length + 1 name_padding = @names.values.map { |n| n.length + index_padding }.sort.last - [ 6, name_padding ].max + [ 6, name_padding.to_i ].max end end From df6258dabd4ec4c9ba3e48b46f9b504314ffc4fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Konarovsk=C3=BD?= Date: Mon, 13 Apr 2020 18:17:53 +0200 Subject: [PATCH 06/24] Update man page to reflect recent changes in systemd export Dash (-) vs dot (.) --- man/foreman.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/foreman.1 b/man/foreman.1 index 2ff95557..2396b6b9 100644 --- a/man/foreman.1 +++ b/man/foreman.1 @@ -153,7 +153,7 @@ Will create a series of systemd scripts in the location you specify\. Scripts wi \fBsystemctl stop appname\-processname\.target\fR . .P -\fBsystemctl restart appname\-processname\-3\.service\fR +\fBsystemctl restart appname\-processname\.3\.service\fR . .SH "UPSTART EXPORT" Will create a series of upstart scripts in the location you specify\. Scripts will be structured to make the following commands valid: From 1f4d44f76a8a5532799f7dc6cb61c90cfc55cd45 Mon Sep 17 00:00:00 2001 From: David Dollar Date: Fri, 12 Apr 2024 08:51:14 -0600 Subject: [PATCH 07/24] handle empty procfile exception in cli --- lib/foreman/cli.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/foreman/cli.rb b/lib/foreman/cli.rb index 9cd51786..f0affefb 100644 --- a/lib/foreman/cli.rb +++ b/lib/foreman/cli.rb @@ -40,6 +40,8 @@ def start(process=nil) engine.load_procfile(procfile) engine.options[:formation] = "#{process}=1" if process engine.start + rescue Foreman::Procfile::EmptyFileError + error "no processes defined" end desc "export FORMAT LOCATION", "Export the application to another process management format" @@ -60,7 +62,7 @@ def export(format, location=nil) engine.load_procfile(procfile) formatter = Foreman::Export.formatter(format) formatter.new(location, engine, options).export - rescue Foreman::Export::Exception => ex + rescue Foreman::Export::Exception, Foreman::Procfile::EmptyFileError => ex error ex.message end @@ -106,6 +108,8 @@ def run(*args) Process.wait(pid) exit $?.exitstatus || 0 rescue Interrupt + rescue Foreman::Procfile::EmptyFileError + error "no processes defined" end desc "version", "Display Foreman gem version" From 915e81f7c694cb901409dd91a71874095d26383d Mon Sep 17 00:00:00 2001 From: David Dollar Date: Fri, 12 Apr 2024 08:53:13 -0600 Subject: [PATCH 08/24] update for ci --- .github/workflows/ci.yml | 2 +- .gitignore | 1 - Gemfile | 2 +- Gemfile.lock | 79 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 81 insertions(+), 3 deletions(-) create mode 100644 Gemfile.lock diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cdbfa61d..0aad9ffc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: - "2.7" - "3.0" - "3.1" - - "head" + - "3.2" env: BUNDLE_WITHOUT: development steps: diff --git a/.gitignore b/.gitignore index 02160624..04969ed2 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,3 @@ /man/*.markdown /pkg/ /vendor -Gemfile.lock diff --git a/Gemfile b/Gemfile index 1316ac79..462036bc 100644 --- a/Gemfile +++ b/Gemfile @@ -14,7 +14,7 @@ end group :development do gem 'aws-s3' - gem 'ronn' + gem 'ronn-ng' gem 'yard', '~> 0.9.11' gem 'automatiek' end diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 00000000..7892f4dc --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,79 @@ +PATH + remote: . + specs: + foreman (0.87.2) + +GEM + remote: http://rubygems.org/ + specs: + automatiek (0.3.0) + aws-s3 (0.6.3) + builder + mime-types + xml-simple + builder (3.2.4) + diff-lcs (1.5.1) + docile (1.4.0) + fakefs (2.5.0) + kramdown (2.4.0) + rexml + kramdown-parser-gfm (1.1.0) + kramdown (~> 2.0) + mime-types (3.5.2) + mime-types-data (~> 3.2015) + mime-types-data (3.2024.0305) + mustache (1.1.1) + nokogiri (1.16.4-arm64-darwin) + racc (~> 1.4) + racc (1.7.3) + rake (13.2.1) + rexml (3.2.6) + ronn-ng (0.10.1) + kramdown (~> 2, >= 2.1) + kramdown-parser-gfm (~> 1, >= 1.0.1) + mustache (~> 1) + nokogiri (~> 1, >= 1.14.3) + rspec (3.13.0) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-core (3.13.0) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-support (3.13.1) + simplecov (0.22.0) + docile (~> 1.1) + simplecov-html (~> 0.11) + simplecov_json_formatter (~> 0.1) + simplecov-html (0.12.3) + simplecov_json_formatter (0.1.4) + thor (0.19.4) + timecop (0.9.8) + xml-simple (1.1.9) + rexml + yard (0.9.36) + +PLATFORMS + arm64-darwin-21 + arm64-darwin-23 + +DEPENDENCIES + automatiek + aws-s3 + fakefs + foreman! + rake + ronn-ng + rspec (~> 3.5) + simplecov + thor (= 0.19.4) + timecop + yard (~> 0.9.11) + +BUNDLED WITH + 2.4.19 From 91daffc4963b9a3c3cc0215c3050bff82829b786 Mon Sep 17 00:00:00 2001 From: David Dollar Date: Fri, 12 Apr 2024 08:55:14 -0600 Subject: [PATCH 09/24] remove Gemfile.lock from repo because it's too strict --- .gitignore | 1 + Gemfile.lock | 79 ---------------------------------------------------- 2 files changed, 1 insertion(+), 79 deletions(-) delete mode 100644 Gemfile.lock diff --git a/.gitignore b/.gitignore index 04969ed2..02160624 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /man/*.markdown /pkg/ /vendor +Gemfile.lock diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index 7892f4dc..00000000 --- a/Gemfile.lock +++ /dev/null @@ -1,79 +0,0 @@ -PATH - remote: . - specs: - foreman (0.87.2) - -GEM - remote: http://rubygems.org/ - specs: - automatiek (0.3.0) - aws-s3 (0.6.3) - builder - mime-types - xml-simple - builder (3.2.4) - diff-lcs (1.5.1) - docile (1.4.0) - fakefs (2.5.0) - kramdown (2.4.0) - rexml - kramdown-parser-gfm (1.1.0) - kramdown (~> 2.0) - mime-types (3.5.2) - mime-types-data (~> 3.2015) - mime-types-data (3.2024.0305) - mustache (1.1.1) - nokogiri (1.16.4-arm64-darwin) - racc (~> 1.4) - racc (1.7.3) - rake (13.2.1) - rexml (3.2.6) - ronn-ng (0.10.1) - kramdown (~> 2, >= 2.1) - kramdown-parser-gfm (~> 1, >= 1.0.1) - mustache (~> 1) - nokogiri (~> 1, >= 1.14.3) - rspec (3.13.0) - rspec-core (~> 3.13.0) - rspec-expectations (~> 3.13.0) - rspec-mocks (~> 3.13.0) - rspec-core (3.13.0) - rspec-support (~> 3.13.0) - rspec-expectations (3.13.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.13.0) - rspec-mocks (3.13.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.13.0) - rspec-support (3.13.1) - simplecov (0.22.0) - docile (~> 1.1) - simplecov-html (~> 0.11) - simplecov_json_formatter (~> 0.1) - simplecov-html (0.12.3) - simplecov_json_formatter (0.1.4) - thor (0.19.4) - timecop (0.9.8) - xml-simple (1.1.9) - rexml - yard (0.9.36) - -PLATFORMS - arm64-darwin-21 - arm64-darwin-23 - -DEPENDENCIES - automatiek - aws-s3 - fakefs - foreman! - rake - ronn-ng - rspec (~> 3.5) - simplecov - thor (= 0.19.4) - timecop - yard (~> 0.9.11) - -BUNDLED WITH - 2.4.19 From 266fd47d29269b03d313f8722debca2d6fe555c2 Mon Sep 17 00:00:00 2001 From: David Dollar Date: Fri, 12 Apr 2024 08:56:33 -0600 Subject: [PATCH 10/24] use actions/checkout@v4 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0aad9ffc..9a8a13d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: BUNDLE_WITHOUT: development steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: From d3a34edcda58cfe31736462fa78fe1757421fd5d Mon Sep 17 00:00:00 2001 From: David Dollar Date: Fri, 12 Apr 2024 08:57:31 -0600 Subject: [PATCH 11/24] 0.88.0 --- lib/foreman/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/foreman/version.rb b/lib/foreman/version.rb index b69da8c6..31069822 100644 --- a/lib/foreman/version.rb +++ b/lib/foreman/version.rb @@ -1,5 +1,5 @@ module Foreman - VERSION = "0.87.2" + VERSION = "0.88.0" end From d5fac29ad109d9a0a61e77cbb6203c1d745145a7 Mon Sep 17 00:00:00 2001 From: David Dollar Date: Fri, 12 Apr 2024 09:04:00 -0600 Subject: [PATCH 12/24] update master to main --- README.md | 32 +++++++++++++++++--------------- lib/foreman/engine/cli.rb | 2 +- lib/foreman/export/base.rb | 4 ++-- tasks/release.rake | 2 +- 4 files changed, 21 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 92fab56a..4b981135 100644 --- a/README.md +++ b/README.md @@ -8,11 +8,11 @@ Manage Procfile-based applications $ gem install foreman -Ruby users should take care *not* to install foreman in their project's `Gemfile`. See this [wiki article](https://github.com/ddollar/foreman/wiki/Don't-Bundle-Foreman) for more details. +Ruby users should take care _not_ to install foreman in their project's `Gemfile`. See this [wiki article](https://github.com/ddollar/foreman/wiki/Don't-Bundle-Foreman) for more details. ## Getting Started -* http://blog.daviddollar.org/2011/05/06/introducing-foreman.html +- http://blog.daviddollar.org/2011/05/06/introducing-foreman.html ## Supported Ruby versions @@ -20,29 +20,31 @@ See [ci.yml](.github/workflows/ci.yml) for a list of Ruby versions against which ## Documentation -* [man page](http://ddollar.github.io/foreman/) -* [wiki](https://github.com/ddollar/foreman/wiki) -* [changelog](https://github.com/ddollar/foreman/blob/master/Changelog.md) +- [man page](http://ddollar.github.io/foreman/) +- [wiki](https://github.com/ddollar/foreman/wiki) +- [changelog](https://github.com/ddollar/foreman/blob/main/Changelog.md) ## Ports -* [forego](https://github.com/ddollar/forego) - Go -* [node-foreman](https://github.com/strongloop/node-foreman) - Node.js -* [gaffer](https://github.com/jingweno/gaffer) - Java/JVM -* [goreman](https://github.com/mattn/goreman) - Go -* [honcho](https://github.com/nickstenning/honcho) - python -* [proclet](https://github.com/kazeburo/Proclet) - Perl -* [shoreman](https://github.com/chrismytton/shoreman) - shell -* [crank](https://github.com/arktisklada/crank) - Crystal -* [houseman](https://github.com/fujimura/houseman) - Haskell -* [spm](https://github.com/bytegust/spm) - Go +- [forego](https://github.com/ddollar/forego) - Go +- [node-foreman](https://github.com/strongloop/node-foreman) - Node.js +- [gaffer](https://github.com/jingweno/gaffer) - Java/JVM +- [goreman](https://github.com/mattn/goreman) - Go +- [honcho](https://github.com/nickstenning/honcho) - python +- [proclet](https://github.com/kazeburo/Proclet) - Perl +- [shoreman](https://github.com/chrismytton/shoreman) - shell +- [crank](https://github.com/arktisklada/crank) - Crystal +- [houseman](https://github.com/fujimura/houseman) - Haskell +- [spm](https://github.com/bytegust/spm) - Go ## Authors #### Created and maintained by + David Dollar #### Patches contributed by + [Contributor List](https://github.com/ddollar/foreman/contributors) ## License diff --git a/lib/foreman/engine/cli.rb b/lib/foreman/engine/cli.rb index a6055332..1cbc66f4 100644 --- a/lib/foreman/engine/cli.rb +++ b/lib/foreman/engine/cli.rb @@ -49,7 +49,7 @@ def color(name) def startup @colors = map_colors - proctitle "foreman: master" unless Foreman.windows? + proctitle "foreman: main" unless Foreman.windows? Color.enable($stdout, options[:color]) end diff --git a/lib/foreman/export/base.rb b/lib/foreman/export/base.rb index 2608b546..010529e6 100644 --- a/lib/foreman/export/base.rb +++ b/lib/foreman/export/base.rb @@ -74,8 +74,8 @@ def self.warn_deprecation! puts "WARNING: Using deprecated exporter interface. Please update your exporter" puts "the interface shown in the upstart exporter:" puts - puts "https://github.com/ddollar/foreman/blob/master/lib/foreman/export/upstart.rb" - puts "https://github.com/ddollar/foreman/blob/master/data/export/upstart/process.conf.erb" + puts "https://github.com/ddollar/foreman/blob/main/lib/foreman/export/upstart.rb" + puts "https://github.com/ddollar/foreman/blob/main/data/export/upstart/process.conf.erb" puts @@deprecation_warned = true end diff --git a/tasks/release.rake b/tasks/release.rake index bc02c8c1..eefc1917 100644 --- a/tasks/release.rake +++ b/tasks/release.rake @@ -24,7 +24,7 @@ task :pages => "man:commit" do git add -u index.html git commit -m "saving man page to github docs" git push origin -f gh-pages - git checkout master + git checkout main } end From e70bd9239a07231ca13b0624a3ff5d7923f2d359 Mon Sep 17 00:00:00 2001 From: David Dollar Date: Fri, 12 Apr 2024 09:04:18 -0600 Subject: [PATCH 13/24] 0.88.1 --- lib/foreman/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/foreman/version.rb b/lib/foreman/version.rb index 31069822..326c530b 100644 --- a/lib/foreman/version.rb +++ b/lib/foreman/version.rb @@ -1,5 +1,5 @@ module Foreman - VERSION = "0.88.0" + VERSION = "0.88.1" end From 0590629b84a2f2020d5b50942ce27a75b5e43ef2 Mon Sep 17 00:00:00 2001 From: David Dollar Date: Fri, 12 Apr 2024 09:04:39 -0600 Subject: [PATCH 14/24] update docs --- Changelog.md | 31 +++++++++++++ man/foreman.1 | 121 ++++---------------------------------------------- 2 files changed, 40 insertions(+), 112 deletions(-) diff --git a/Changelog.md b/Changelog.md index 728699fb..c1cf4048 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,34 @@ +## 0.88.1 (2024-04-12) + +* update master to main [David Dollar] + +## 0.88.0 (2024-04-12) + +* use actions/checkout@v4 [David Dollar] +* remove Gemfile.lock from repo because it's too strict [David Dollar] +* update for ci [David Dollar] +* handle empty procfile exception in cli [David Dollar] +* Update man page to reflect recent changes in systemd export [Lukáš Konarovský] +* [engine/cli.rb] Handle nil name_padding [Nick LaMuro] +* [Foreman::Procfile#load] Fail when empty [Nick LaMuro] +* spec_helper: don't try to remove /tmp [Antonio Terceiro] +* Fix misleading comment at the top of procfile.rb that indicates that hyphens "-" are not allowed in process names. [Ben Wilber] +* Rename usage of Dir/File.exists to exist [Qiu Chaofan] +* remove codeclimate [David Dollar] +* clean up and autoformat [David Dollar] +* Add GitHub token permissions for workflow [mishina] +* Migrate from Travis CI to GitHub Actions [mishina] +* Pass a block rather than an argument to `expect` [mishina] +* Replace `File.exists?` with `File.exist?` [mishina] +* Use the latest fakefs [mishina] +* Remove and ignore Gemfile.lock [mishina] +* Add GitHub Actions workflow [mishina] +* GitHub is HTTPS by default [Akira Matsuda] + +## 0.87.2 (2020-08-07) + +* update json for CVE-2020-10663 [David Dollar] + ## 0.87.1 (2020-04-02) * update rake for CVE-2020-8130 [David Dollar] diff --git a/man/foreman.1 b/man/foreman.1 index 2396b6b9..d3e19858 100644 --- a/man/foreman.1 +++ b/man/foreman.1 @@ -1,284 +1,181 @@ -.\" generated with Ronn/v0.7.3 -.\" http://github.com/rtomayko/ronn/tree/0.7.3 -. -.TH "FOREMAN" "1" "April 2020" "Foreman 0.87.2" "Foreman Manual" -. +.\" generated with Ronn-NG/v0.10.1 +.\" http://github.com/apjanke/ronn-ng/tree/0.10.1 +.TH "FOREMAN" "1" "April 2024" "Foreman 0.88.1" "Foreman Manual" .SH "NAME" \fBforeman\fR \- manage Procfile\-based applications -. .SH "SYNOPSIS" \fBforeman start [process]\fR -. .br \fBforeman run \fR -. .br \fBforeman export [location]\fR -. .SH "DESCRIPTION" Foreman is a manager for Procfile\-based applications\. Its aim is to abstract away the details of the Procfile format, and allow you to either run your application directly or export it to some other process management format\. -. .SH "RUNNING" \fBforeman start\fR is used to run your application directly from the command line\. -. .P If no additional parameters are passed, foreman will run one instance of each type of process defined in your Procfile\. -. .P If a parameter is passed, foreman will run one instance of the specified application type\. -. .P The following options control how the application is run: -. .TP \fB\-m\fR, \fB\-\-formation\fR Specify the number of each process type to run\. The value passed in should be in the format \fBprocess=num,process=num\fR -. .TP \fB\-e\fR, \fB\-\-env\fR Specify one or more \.env files to load -. .TP \fB\-f\fR, \fB\-\-procfile\fR Specify an alternate Procfile to load, implies \fB\-d\fR at the Procfile root\. -. .TP \fB\-p\fR, \fB\-\-port\fR Specify which port to use as the base for this application\. Should be a multiple of 1000\. -. .TP \fB\-t\fR, \fB\-\-timeout\fR Specify the amount of time (in seconds) processes have to shutdown gracefully before receiving a SIGKILL, defaults to 5\. -. .P \fBforeman run\fR is used to run one\-off commands using the same environment as your defined processes\. -. .SH "EXPORTING" \fBforeman export\fR is used to export your application to another process management format\. -. .P A location to export can be passed as an argument\. This argument may be either required or optional depending on the export format\. -. .P The following options control how the application is run: -. .TP \fB\-a\fR, \fB\-\-app\fR -Use this name rather than the application\'s root directory name as the name of the application when exporting\. -. +Use this name rather than the application's root directory name as the name of the application when exporting\. .TP \fB\-m\fR, \fB\-\-formation\fR Specify the number of each process type to run\. The value passed in should be in the format \fBprocess=num,process=num\fR -. .TP \fB\-l\fR, \fB\-\-log\fR Specify the directory to place process logs in\. -. .TP \fB\-p\fR, \fB\-\-port\fR Specify which port to use as the base for this application\. Should be a multiple of 1000\. -. .TP \fB\-t\fR, \fB\-\-template\fR Specify an alternate template to use for creating export files\. See \fIhttps://github\.com/ddollar/foreman/tree/master/data/export\fR for examples\. -. .TP \fB\-u\fR, \fB\-\-user\fR Specify the user the application should be run as\. Defaults to the app name -. .SH "GLOBAL OPTIONS" -These options control all modes of foreman\'s operation\. -. +These options control all modes of foreman's operation\. .TP \fB\-d\fR, \fB\-\-root\fR Specify an alternate application root\. This defaults to the directory containing the Procfile\. -. .TP \fB\-e\fR, \fB\-\-env\fR Specify an alternate environment file\. You can specify more than one file by using: \fB\-\-env file1,file2\fR\. -. .TP \fB\-f\fR, \fB\-\-procfile\fR -Specify an alternate location for the application\'s Procfile\. This file\'s containing directory will be assumed to be the root directory of the application\. -. +Specify an alternate location for the application's Procfile\. This file's containing directory will be assumed to be the root directory of the application\. .SH "EXPORT FORMATS" foreman currently supports the following output formats: -. .IP "\(bu" 4 bluepill -. .IP "\(bu" 4 inittab -. .IP "\(bu" 4 launchd -. .IP "\(bu" 4 runit -. .IP "\(bu" 4 supervisord -. .IP "\(bu" 4 systemd -. .IP "\(bu" 4 upstart -. .IP "" 0 -. .SH "INITTAB EXPORT" Will export a chunk of inittab\-compatible configuration: -. .IP "" 4 -. .nf - # \-\-\-\-\- foreman example processes \-\-\-\-\- -EX01:4:respawn:/bin/su \- example \-c \'PORT=5000 bundle exec thin start >> /var/log/web\-1\.log 2>&1\' -EX02:4:respawn:/bin/su \- example \-c \'PORT=5100 bundle exec rake jobs:work >> /var/log/job\-1\.log 2>&1\' +EX01:4:respawn:/bin/su \- example \-c 'PORT=5000 bundle exec thin start >> /var/log/web\-1\.log 2>&1' +EX02:4:respawn:/bin/su \- example \-c 'PORT=5100 bundle exec rake jobs:work >> /var/log/job\-1\.log 2>&1' # \-\-\-\-\- end foreman example processes \-\-\-\-\- -. .fi -. .IP "" 0 -. .SH "SYSTEMD EXPORT" Will create a series of systemd scripts in the location you specify\. Scripts will be structured to make the following commands valid: -. .P \fBsystemctl start appname\.target\fR -. .P \fBsystemctl stop appname\-processname\.target\fR -. .P -\fBsystemctl restart appname\-processname\.3\.service\fR -. +\fBsystemctl restart appname\-processname\-3\.service\fR .SH "UPSTART EXPORT" Will create a series of upstart scripts in the location you specify\. Scripts will be structured to make the following commands valid: -. .P \fBstart appname\fR -. .P \fBstop appname\-processname\fR -. .P \fBrestart appname\-processname\-3\fR -. .SH "PROCFILE" A Procfile should contain both a name for the process and the command used to run it\. -. .IP "" 4 -. .nf - web: bundle exec thin start job: bundle exec rake jobs:work -. .fi -. .IP "" 0 -. .P A process name may contain letters, numbers and the underscore character\. You can validate your Procfile format using the \fBcheck\fR command: -. .IP "" 4 -. .nf - $ foreman check -. .fi -. .IP "" 0 -. .P The special environment variables \fB$PORT\fR and \fB$PS\fR are available within the Procfile\. \fB$PORT\fR is the port selected for that process\. \fB$PS\fR is the name of the process for the line\. -. .P The \fB$PORT\fR value starts as the base port as specified by \fB\-p\fR, then increments by 100 for each new process line\. Multiple instances of the same process are assigned \fB$PORT\fR values that increment by 1\. -. .SH "ENVIRONMENT" If a \fB\.env\fR file exists in the current directory, the default environment will be read from it\. This file should contain key/value pairs, separated by \fB=\fR, with one key/value pair per line\. -. .IP "" 4 -. .nf - FOO=bar BAZ=qux -. .fi -. .IP "" 0 -. .SH "DEFAULT OPTIONS" If a \fB\.foreman\fR file exists in the current directory, default options will be read from it\. This file should be in YAML format with the long option name as keys\. Example: -. .IP "" 4 -. .nf - formation: alpha=0,bravo=1 port: 15000 -. .fi -. .IP "" 0 -. .SH "EXAMPLES" Start one instance of each process type, interleave the output on stdout: -. .IP "" 4 -. .nf - $ foreman start -. .fi -. .IP "" 0 -. .P Export the application in upstart format: -. .IP "" 4 -. .nf - $ foreman export upstart /etc/init -. .fi -. .IP "" 0 -. .P Run one process type from the application defined in a specific Procfile: -. .IP "" 4 -. .nf - $ foreman start alpha \-f ~/myapp/Procfile -. .fi -. .IP "" 0 -. .P Start all processes except the one named worker: -. .IP "" 4 -. .nf - $ foreman start \-m all=1,worker=0 -. .fi -. .IP "" 0 -. .SH "COPYRIGHT" Foreman is Copyright (C) 2010 David Dollar \fIhttp://daviddollar\.org\fR From 3a262714030a83a59388a48ffdb2e93cdac12388 Mon Sep 17 00:00:00 2001 From: David Dollar Date: Fri, 12 Apr 2024 11:00:02 -0600 Subject: [PATCH 15/24] dont fail tests when Procfile is present in foreman dir (closes #771) --- spec/foreman/cli_spec.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/foreman/cli_spec.rb b/spec/foreman/cli_spec.rb index b8c3cfee..4995a481 100644 --- a/spec/foreman/cli_spec.rb +++ b/spec/foreman/cli_spec.rb @@ -77,15 +77,15 @@ describe "run" do it "can run a command" do - expect(forked_foreman("run echo 1")).to eq("1\n") + expect(forked_foreman("run -f #{resource_path("Procfile")} echo 1")).to eq("1\n") end it "doesn't parse options for the command" do - expect(forked_foreman("run grep -e FOO #{resource_path(".env")}")).to eq("FOO=bar\n") + expect(forked_foreman("run -f #{resource_path("Procfile")} grep -e FOO #{resource_path(".env")}")).to eq("FOO=bar\n") end it "includes the environment" do - expect(forked_foreman("run -e #{resource_path(".env")} #{resource_path("bin/env FOO")}")).to eq("bar\n") + expect(forked_foreman("run -f #{resource_path("Procfile")} -e #{resource_path(".env")} #{resource_path("bin/env FOO")}")).to eq("bar\n") end it "can run a command from the Procfile" do @@ -93,8 +93,8 @@ end it "exits with the same exit code as the command" do - expect(fork_and_get_exitstatus("run echo 1")).to eq(0) - expect(fork_and_get_exitstatus("run date 'invalid_date'")).to eq(1) + expect(fork_and_get_exitstatus("run -f #{resource_path("Procfile")} echo 1")).to eq(0) + expect(fork_and_get_exitstatus("run -f #{resource_path("Procfile")} date 'invalid_date'")).to eq(1) end end From 8940a0e661c14144267f405793e3b955fc31f673 Mon Sep 17 00:00:00 2001 From: Patrik Ragnarsson Date: Fri, 28 Oct 2022 14:27:09 +0200 Subject: [PATCH 16/24] Run processes in new pgroup (#1) Some processes are getting orphaned when running Foreman with JRuby. Creating a new pgroup allows them all to be killed together. I believe the issue is related to how JRuby handles `Dir.chdir` by creating a shell process: `sh -c 'cd /chdir/target; ${command}'`. That causes a second process to be created that won't get cleaned up by killing the parent. Co-authored-by: David Harsha --- lib/foreman/engine.rb | 4 ++-- lib/foreman/process.rb | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/foreman/engine.rb b/lib/foreman/engine.rb index a1316593..3b2c32b7 100644 --- a/lib/foreman/engine.rb +++ b/lib/foreman/engine.rb @@ -191,14 +191,14 @@ def kill_children(signal="SIGTERM") @running.each do |pid, (process, index)| system "sending #{signal} to #{name_for(pid)} at pid #{pid}" begin - Process.kill(signal, pid) + Process.kill("-#{signal}", pid) rescue Errno::ESRCH, Errno::EPERM end end else begin pids = @running.keys.compact - Process.kill signal, *pids unless pids.empty? + Process.kill("-#{signal}", *pids) unless pids.empty? rescue Errno::ESRCH, Errno::EPERM end end diff --git a/lib/foreman/process.rb b/lib/foreman/process.rb index ee3de948..2a681d5e 100644 --- a/lib/foreman/process.rb +++ b/lib/foreman/process.rb @@ -49,9 +49,10 @@ def run(options={}) env = @options[:env].merge(options[:env] || {}) output = options[:output] || $stdout runner = "#{Foreman.runner}".shellescape - + pgroup = Foreman.windows? ? :new_pgroup : :pgroup + Dir.chdir(cwd) do - Process.spawn env, expanded_command(env), :out => output, :err => output + Process.spawn env, expanded_command(env), :out => output, :err => output, pgroup => true end end From f1a808db2abd324dda61ced5becd6dad71239b82 Mon Sep 17 00:00:00 2001 From: Patrik Ragnarsson Date: Fri, 28 Oct 2022 14:31:56 +0200 Subject: [PATCH 17/24] Be able to run CI from GitHub Actions UI --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9a8a13d5..9969d831 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,6 +2,7 @@ name: ci on: - push - pull_request + - workflow_dispatch permissions: contents: read jobs: From 41aa0a69e17e2674e736e1427e378049dd0da3cf Mon Sep 17 00:00:00 2001 From: Patrik Ragnarsson Date: Fri, 28 Oct 2022 14:44:53 +0200 Subject: [PATCH 18/24] Allow ruby-head to fail in CI --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9969d831..cbba56f5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,6 +20,8 @@ jobs: - "3.0" - "3.1" - "3.2" + include: + - { ruby: "head", allow-failure: true } env: BUNDLE_WITHOUT: development steps: @@ -32,4 +34,8 @@ jobs: bundler-cache: true # runs 'bundle install' and caches installed gems automatically rubygems: latest # runs 'gem update --system' - name: Run test + continue-on-error: ${{ matrix.allow-failure || false }} + id: tests run: bundle exec rake spec + - name: "Test outcome: ${{ steps.tests.outcome }}" + run: "" From 5a059eeb0ef10ebffe78e6f354fe1232cd5e4e4f Mon Sep 17 00:00:00 2001 From: Patrik Ragnarsson Date: Fri, 28 Oct 2022 14:47:52 +0200 Subject: [PATCH 19/24] `foreman` -> `overman` where it makes sense --- .gitignore | 1 + README.md | 6 +++--- bin/{foreman => overman} | 0 man/{foreman.1 => overman.1} | 0 man/{foreman.1.ronn => overman.ronn} | 0 foreman.gemspec => overman.gemspec | 11 ++++++----- 6 files changed, 10 insertions(+), 8 deletions(-) rename bin/{foreman => overman} (100%) rename man/{foreman.1 => overman.1} (100%) rename man/{foreman.1.ronn => overman.ronn} (100%) rename foreman.gemspec => overman.gemspec (67%) diff --git a/.gitignore b/.gitignore index 02160624..4134644e 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /pkg/ /vendor Gemfile.lock +/*.gem diff --git a/README.md b/README.md index 4b981135..9f757f38 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ -# Foreman +# Overman (`ddollar/foreman` fork) -[![CI](https://github.com/ddollar/foreman/actions/workflows/ci.yml/badge.svg)](https://github.com/ddollar/foreman/actions/workflows/ci.yml) +[![CI](https://github.com/spinels/foreman/actions/workflows/ci.yml/badge.svg)](https://github.com/spinels/foreman/actions/workflows/ci.yml) Manage Procfile-based applications ## Installation - $ gem install foreman + $ gem install overman Ruby users should take care _not_ to install foreman in their project's `Gemfile`. See this [wiki article](https://github.com/ddollar/foreman/wiki/Don't-Bundle-Foreman) for more details. diff --git a/bin/foreman b/bin/overman similarity index 100% rename from bin/foreman rename to bin/overman diff --git a/man/foreman.1 b/man/overman.1 similarity index 100% rename from man/foreman.1 rename to man/overman.1 diff --git a/man/foreman.1.ronn b/man/overman.ronn similarity index 100% rename from man/foreman.1.ronn rename to man/overman.ronn diff --git a/foreman.gemspec b/overman.gemspec similarity index 67% rename from foreman.gemspec rename to overman.gemspec index 708bd112..e42ab470 100644 --- a/foreman.gemspec +++ b/overman.gemspec @@ -2,18 +2,19 @@ $:.unshift File.expand_path("../lib", __FILE__) require "foreman/version" Gem::Specification.new do |gem| - gem.name = "foreman" + gem.name = "overman" gem.license = "MIT" gem.version = Foreman::VERSION gem.author = "David Dollar" gem.email = "ddollar@gmail.com" - gem.homepage = "https://github.com/ddollar/foreman" - gem.summary = "Process manager for applications with multiple components" + gem.homepage = "https://github.com/spinels/foreman" + gem.summary = "Process manager for applications with multiple components, " \ + "fork of ddollar/foreman" gem.description = gem.summary - gem.executables = "foreman" + gem.executables = "overman" gem.files = Dir["**/*"].select { |d| d =~ %r{^(README|bin/|data/|ext/|lib/|spec/|test/)} } - gem.files << "man/foreman.1" + gem.files << "man/overman.1" end From 89d32011ce855f28665ea87a45dc889efe4fc9de Mon Sep 17 00:00:00 2001 From: Patrik Ragnarsson Date: Fri, 28 Oct 2022 14:50:48 +0200 Subject: [PATCH 20/24] Some more `foreman` -> `overman` --- README.md | 2 +- spec/spec_helper.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9f757f38..77df1fcf 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Overman (`ddollar/foreman` fork) -[![CI](https://github.com/spinels/foreman/actions/workflows/ci.yml/badge.svg)](https://github.com/spinels/foreman/actions/workflows/ci.yml) +[![CI](https://github.com/spinels/overman/actions/workflows/ci.yml/badge.svg)](https://github.com/spinels/overman/actions/workflows/ci.yml) Manage Procfile-based applications diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 87e68890..bad817e6 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -37,7 +37,7 @@ def foreman(args) def forked_foreman(args) rd, wr = make_pipe - Process.spawn("bundle exec bin/foreman #{args}", :out => wr, :err => wr) + Process.spawn("bundle exec bin/overman #{args}", :out => wr, :err => wr) wr.close rd.read end @@ -62,7 +62,7 @@ def fork_and_capture(&blk) end def fork_and_get_exitstatus(args) - pid = Process.spawn("bundle exec bin/foreman #{args}", :out => "/dev/null", :err => "/dev/null") + pid = Process.spawn("bundle exec bin/overman #{args}", :out => "/dev/null", :err => "/dev/null") Process.wait(pid) $?.exitstatus end From 3577d707f6e407eab75642944e4585fa7c6c2086 Mon Sep 17 00:00:00 2001 From: Patrik Ragnarsson Date: Sun, 25 Dec 2022 23:31:14 +0100 Subject: [PATCH 21/24] Fix homepage URL in gemspec --- overman.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/overman.gemspec b/overman.gemspec index e42ab470..a81f8454 100644 --- a/overman.gemspec +++ b/overman.gemspec @@ -8,7 +8,7 @@ Gem::Specification.new do |gem| gem.author = "David Dollar" gem.email = "ddollar@gmail.com" - gem.homepage = "https://github.com/spinels/foreman" + gem.homepage = "https://github.com/spinels/overman" gem.summary = "Process manager for applications with multiple components, " \ "fork of ddollar/foreman" From de2e9f151774e844b3016a8a52c6a0fa9482cf21 Mon Sep 17 00:00:00 2001 From: Patrik Ragnarsson Date: Sun, 25 Dec 2022 23:36:47 +0100 Subject: [PATCH 22/24] Test with Ruby 3.2 Do not try to install latest RubyGems due to https://github.com/ruby/setup-ruby/issues/422 --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cbba56f5..e8fffa8f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,6 @@ jobs: with: ruby-version: ${{ matrix.ruby }} bundler-cache: true # runs 'bundle install' and caches installed gems automatically - rubygems: latest # runs 'gem update --system' - name: Run test continue-on-error: ${{ matrix.allow-failure || false }} id: tests From 741c556953048ecbf9c04105c47db6faac74ab4c Mon Sep 17 00:00:00 2001 From: Patrik Ragnarsson Date: Sun, 25 Dec 2022 23:48:08 +0100 Subject: [PATCH 23/24] Suppress `required_ruby_version` warning from bundler Apparently the tests are sensitive to the output, like what happened in https://github.com/ruby/setup-ruby/issues/420 Saw this option in https://github.com/rubygems/rubygems/pull/6187 --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e8fffa8f..9aa84c7a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,6 +24,7 @@ jobs: - { ruby: "head", allow-failure: true } env: BUNDLE_WITHOUT: development + BUNDLER_NO_OLD_RUBYGEMS_WARNING: true steps: - name: Checkout code uses: actions/checkout@v4 From cca56b9faef2447557c6a5029e69687eb7e4c10f Mon Sep 17 00:00:00 2001 From: Patrik Ragnarsson Date: Fri, 7 Feb 2025 14:31:08 +0100 Subject: [PATCH 24/24] CI: Test with Ruby 3.3, 3.4 --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9aa84c7a..b164777b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,6 +20,8 @@ jobs: - "3.0" - "3.1" - "3.2" + - "3.3" + - "3.4" include: - { ruby: "head", allow-failure: true } env: