puma-daemon 0.1.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/main.yml +22 -8
- data/.gitignore +2 -0
- data/CHANGELOG.md +36 -0
- data/Dockerfile.download +1 -1
- data/{Gemfile → Gemfile.puma-v5} +2 -0
- data/Gemfile.puma-v6 +15 -0
- data/Makefile +23 -0
- data/README.adoc +144 -65
- data/README.pdf +9557 -1
- data/Rakefile +1 -1
- data/bin/console +1 -1
- data/codecov.yml +4 -0
- data/example/cluster.sh +61 -0
- data/example/config.ru +5 -0
- data/example/puma.rb +78 -0
- data/example/single.sh +64 -0
- data/exe/pumad +5 -0
- data/lib/puma/daemon/cli.rb +4 -2
- data/lib/puma/daemon/configuration.rb +4 -0
- data/lib/puma/daemon/runner_adapter.rb +49 -0
- data/lib/puma/daemon/version.rb +1 -1
- data/lib/puma/daemon.rb +4 -3
- data/puma-daemon.gemspec +5 -3
- metadata +30 -9
- data/lib/puma/daemon/runner.rb +0 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7b8150de79698d1088f01144bb81576619499a8fe9aef1100ff1af34ba494e6
|
4
|
+
data.tar.gz: d5d18c2979ed94fffb92a54dcd84c4376bd4fb38496fb0355a4777f7735fc820
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4795d230cc70bfe87b7477f0fbbf07e323daf828d0e592bfe7c39f163920102e9fd058e9033aef7861d04b756541816b632f467dcff52e68c847e639f4e2f52
|
7
|
+
data.tar.gz: 60ff6ab16ece8f09c415e5be2a967df283159d6415d36ab5047c537b23f402fd3c55066e12c488e1f5f812c92dc478f15a305f8081ceb815e655113bfd84242f
|
data/.github/workflows/main.yml
CHANGED
@@ -7,20 +7,34 @@ jobs:
|
|
7
7
|
runs-on: ubuntu-latest
|
8
8
|
strategy:
|
9
9
|
matrix:
|
10
|
-
ruby-version: [3.0.0, 2.7.2, 2.6.6, 2.5.7]
|
10
|
+
ruby-version: [3.2.0, 3.1.3, 3.0.5, 2.7.2, 2.6.6, 2.5.7]
|
11
|
+
|
12
|
+
env:
|
13
|
+
RUBY_VERSION: ${{ matrix.ruby-version }}
|
14
|
+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
11
15
|
|
12
16
|
steps:
|
13
17
|
- uses: actions/checkout@v2
|
18
|
+
|
14
19
|
- name: Set up Ruby ${{ matrix.ruby-version }}
|
15
20
|
uses: ruby/setup-ruby@v1
|
16
21
|
with:
|
17
22
|
ruby-version: ${{ matrix.ruby-version }}
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
- name:
|
23
|
+
|
24
|
+
- name: Run Specs
|
25
|
+
run: make test-all
|
26
|
+
|
27
|
+
- name: Rubocop
|
23
28
|
run: bundle exec rubocop
|
24
|
-
|
25
|
-
|
29
|
+
|
30
|
+
- uses: codecov/codecov-action@v3
|
31
|
+
with:
|
32
|
+
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
|
33
|
+
directory: coverage
|
34
|
+
env_vars: RUBY_VERSION
|
35
|
+
files: codecov-result.json
|
36
|
+
flags: unittests # optional
|
37
|
+
name: codecov-umbrella # optional
|
38
|
+
fail_ci_if_error: true # optional (default = false)
|
39
|
+
verbose: true # optional (default = false)
|
26
40
|
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,41 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [v0.2.1](https://github.com/kigster/puma-daemon/tree/v0.2.1) (2023-03-07)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/kigster/puma-daemon/compare/v0.2.0...v0.2.1)
|
6
|
+
|
7
|
+
**Fixed bugs:**
|
8
|
+
|
9
|
+
- pumad doesn't work with puma v6 [\#10](https://github.com/kigster/puma-daemon/issues/10)
|
10
|
+
- doesn't daemonize [\#9](https://github.com/kigster/puma-daemon/issues/9)
|
11
|
+
- Log is not working [\#8](https://github.com/kigster/puma-daemon/issues/8)
|
12
|
+
- Currently breaks in a single \(non-cluster\) mode [\#1](https://github.com/kigster/puma-daemon/issues/1)
|
13
|
+
|
14
|
+
**Merged pull requests:**
|
15
|
+
|
16
|
+
- Hopefully fixing demonization for Puma v5 and v6 [\#11](https://github.com/kigster/puma-daemon/pull/11) ([kigster](https://github.com/kigster))
|
17
|
+
|
18
|
+
## [v0.2.0](https://github.com/kigster/puma-daemon/tree/v0.2.0) (2023-03-07)
|
19
|
+
|
20
|
+
[Full Changelog](https://github.com/kigster/puma-daemon/compare/v0.1.2...v0.2.0)
|
21
|
+
|
22
|
+
**Merged pull requests:**
|
23
|
+
|
24
|
+
- Fix README spelling [\#7](https://github.com/kigster/puma-daemon/pull/7) ([lulalala](https://github.com/lulalala))
|
25
|
+
|
26
|
+
## [v0.1.2](https://github.com/kigster/puma-daemon/tree/v0.1.2) (2021-03-05)
|
27
|
+
|
28
|
+
[Full Changelog](https://github.com/kigster/puma-daemon/compare/v0.1.1...v0.1.2)
|
29
|
+
|
30
|
+
**Fixed bugs:**
|
31
|
+
|
32
|
+
- uninitialized constant Puma::HAS\_SSL \(NameError\) [\#3](https://github.com/kigster/puma-daemon/issues/3)
|
33
|
+
|
34
|
+
**Merged pull requests:**
|
35
|
+
|
36
|
+
- Hoping to fix HAS\_SSL error [\#5](https://github.com/kigster/puma-daemon/pull/5) ([kigster](https://github.com/kigster))
|
37
|
+
- Adding dockerfiles for testing Puma on Linux [\#2](https://github.com/kigster/puma-daemon/pull/2) ([kigster](https://github.com/kigster))
|
38
|
+
|
3
39
|
## [v0.1.1](https://github.com/kigster/puma-daemon/tree/v0.1.1) (2021-01-24)
|
4
40
|
|
5
41
|
[Full Changelog](https://github.com/kigster/puma-daemon/compare/v0.1.0...v0.1.1)
|
data/Dockerfile.download
CHANGED
data/{Gemfile → Gemfile.puma-v5}
RENAMED
data/Gemfile.puma-v6
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source 'https://rubygems.org'
|
4
|
+
|
5
|
+
# Specify your gem's dependencies in puma-daemon.gemspec
|
6
|
+
gemspec
|
7
|
+
|
8
|
+
gem 'puma', '~> 6.0'
|
9
|
+
gem 'rake', '~> 13.0'
|
10
|
+
|
11
|
+
group :test do
|
12
|
+
gem 'codecov', require: false
|
13
|
+
gem 'rspec', '~> 3.0'
|
14
|
+
gem 'rubocop', '~> 0.80'
|
15
|
+
end
|
data/Makefile
CHANGED
@@ -16,6 +16,23 @@ PUMAD_HOME := $(shell dirname $(MAKEFILE_PATH))
|
|
16
16
|
help: ## Prints help message auto-generated from the comments.
|
17
17
|
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
18
18
|
|
19
|
+
puma-v5: ## Installs puma 5.0.0
|
20
|
+
@ln -nfs Gemfile.puma-v5 Gemfile
|
21
|
+
@bundle install
|
22
|
+
|
23
|
+
puma-v6: ## Installs puma 5.0.0
|
24
|
+
@ln -nfs Gemfile.puma-v6 Gemfile
|
25
|
+
@bundle install
|
26
|
+
|
27
|
+
test: ## Runs the test suite
|
28
|
+
@bundle exec rspec
|
29
|
+
|
30
|
+
test-all: ## Test all supported Puma Versions
|
31
|
+
make puma-v5
|
32
|
+
make test
|
33
|
+
make puma-v6
|
34
|
+
make test
|
35
|
+
|
19
36
|
docker-build-ruby: ## Builds the Docker image by compiling ruby 3.0.0
|
20
37
|
@docker build -f Dockerfile.build -t puma-daemon:latest .
|
21
38
|
|
@@ -28,4 +45,10 @@ docker-build-run: docker-build-ruby ## Drops you into a BASH session on ubuntu
|
|
28
45
|
docker-download-run: docker-download-ruby ## Drops you into a BASH session on ubuntu with ruby 3.0.0
|
29
46
|
@docker run -it puma-daemon:latest
|
30
47
|
|
48
|
+
generate-pdf: ## Regenerates README,pdf from README.adoc
|
49
|
+
@bash -c "[[ -d ~/.bashmatic ]] || git clone https://github.com/kigster/bashmatic ~/.bashmatic"
|
50
|
+
@bash -c "source ~/.bashmatic/init.sh && ~/.bashmatic/bin/adoc2pdf README.adoc"
|
51
|
+
|
52
|
+
clean: ## Clean-up
|
53
|
+
@rm -rf Gemfile Gemfile.lock coverage
|
31
54
|
|
data/README.adoc
CHANGED
@@ -4,64 +4,132 @@
|
|
4
4
|
:sectnums:
|
5
5
|
:icons: font
|
6
6
|
|
7
|
-
|
7
|
+
[cols="2,7",width="100%",align="center",options="header"]
|
8
|
+
|===
|
8
9
|
|
9
|
-
|
10
|
+
|Badge
|
11
|
+
|Type
|
10
12
|
|
11
|
-
|
13
|
+
|Test Suite
|
14
|
+
|image:https://github.com/kigster/puma-daemon/workflows/Ruby/badge.svg[link=https://github.com/kigster/puma-daemon/actions?query=workflow%3ARuby,width="150"]
|
12
15
|
|
13
|
-
NOTE: Add this gem to your dependencies, and make a one line change either in your `config/puma.rb` file, or use `pumad` binary to start Puma as per usual, and you can even leave `-d` flags there (they are ignored when started via `pumad`, and Puma always goes to the background when started that way).
|
14
16
|
|
15
|
-
|
17
|
+
|Licensing
|
18
|
+
|image:https://app.fossa.com/api/projects/git%2Bgithub.com%2Fkigster%2Fpuma-daemon.svg?type=shield[link=https://app.fossa.com/projects/git%2Bgithub.com%2Fkigster%2Fpuma-daemon?ref=badge_shield,width="190"]
|
16
19
|
|
17
|
-
|
20
|
+
|Gem Version
|
21
|
+
|image:https://badge.fury.io/rb/puma-daemon.svg["Gem Version",link="https://badge.fury.io/rb/puma-daemon",width="220s"]
|
18
22
|
|
19
|
-
|
23
|
+
|Test Coverage
|
24
|
+
|image:https://codecov.io/gh/kigster/puma-daemon/branch/master/graph/badge.svg?token=asxarMSGbz[link=https://codecov.io/gh/kigster/puma-daemon,width="220"]
|
20
25
|
|
21
|
-
|
26
|
+
|Coverage Areas
|
27
|
+
|image:https://codecov.io/gh/kigster/puma-daemon/branch/master/graphs/sunburst.svg?token=asxarMSGbz[sunbirst,width="30%",link=https://codecov.io/gh/kigster/puma-daemon,float=left] image:https://codecov.io/gh/kigster/puma-daemon/branch/master/graphs/icicle.svg?token=asxarMSGbz[coverage-graph,width="60%",link=https://codecov.io/gh/kigster/puma-daemon,float=right]
|
22
28
|
|
23
|
-
|
29
|
+
|===
|
24
30
|
|
25
|
-
|
26
|
-
* MRI Ruby 2.7.2
|
27
|
-
* MRI Ruby 2.6.6
|
28
|
-
* MRI Ruby 2.5.7
|
31
|
+
NOTE: You can read this in a nicely formatted https://github.com/kigster/puma-daemon/blob/master/README.pdf[README.pdf] document.
|
29
32
|
|
33
|
+
== Usage for the Impatient
|
30
34
|
|
31
|
-
|
35
|
+
1. Add `gem 'puma-daemon'` to your Gemfile. If you prefer, you can add `require: false` (your Rails instances such as Sidekiq will have no use for this gem).
|
32
36
|
|
33
|
-
|
37
|
+
2. You have two options to daemonize Puma using this gem:
|
34
38
|
|
35
|
-
|
39
|
+
a. In your `config/puma.rb` file, add the following line: `require 'puma/daemon'` at the top, and at the bottom call `daemonize`.
|
40
|
+
b. Wherever you use `puma` to start it (except using puma-ctl) replace `puma` with `pumad` and daemonization will be enabled automatically.
|
36
41
|
|
37
|
-
It is why instead, we took an approach that requires you — the user — to make a couple of small changes in your Puma configuration to bring daemonization back, or in your scripts, change `puma` to `pumad`, and everything should work. If you run into problems, please https://github.com/kigster/puma-daemon/issues/new[submit an issue].
|
38
42
|
|
39
|
-
==
|
43
|
+
== Introduction
|
44
|
+
|
45
|
+
Let's start with the facts: https://github.com/puma/puma[Puma] is the most popular server to run Ruby and Rails applications. It's both multi-threaded and multi-process, making it one of the only servers that can truly saturate your web hardware. While 100% saturation is probably not what you want, the alternative is paying a fortune for under-utilized hardware. A good rule of thumb is to keep your web servers busy around 70-80% most of the time. Puma let's you do that by configuring the number of workers and threads within each worker.
|
46
|
+
|
47
|
+
=== What is Daemonization?
|
48
|
+
|
49
|
+
Unix processes have the ability to daemonize and go into the background.
|
50
|
+
|
51
|
+
This is not a trivial task: to properly daemonize a process must detach the from controlling terminal and run in the background as a system daemon.
|
52
|
+
|
53
|
+
In Ruby this is accomplished with the https://ruby-doc.org/core-3.0.1/Process.html#method-c-daemon[Process.daemon] method, which receives two boolean arguments:
|
54
|
+
|
55
|
+
* Unless the first argument `nochdir` is `true`, it will change the current working directory to the root (“/”).
|
56
|
+
* Unless the second argument `noclose` is true, `daemon()` will also redirect standard input, standard output and standard error to `/dev/null`.
|
57
|
+
* Finally, it will return zero on success, or raise one of ` Errno::*` and pass the control to the subsequent Ruby code, which will now continue executing within a daemon.
|
58
|
+
|
59
|
+
=== Why was it removed from Puma v5?
|
60
|
+
|
61
|
+
For production deployments, tools like `systemd` offer much better alternative, including ability to cap overall memory and CPU consumed by the Puma and all of its workers using Linux cgroups.
|
62
|
+
|
63
|
+
The proliferation of Docker deployments meant that Puma is run on the foreground within a Docker container.
|
64
|
+
|
65
|
+
Finally, the code which previously daemonized Puma in version 4 was not really maintained, and for this reason was removed from Puma version 5.
|
66
|
+
|
67
|
+
=== What does `puma-daemon` do?
|
68
|
+
|
69
|
+
We thought that while the core Puma removing daemonization was the right move, it felt useful in some occastions and so we created this gem to restore the daemonization functionality to Puma v5+.
|
70
|
+
|
71
|
+
== Compatibility
|
72
|
+
|
73
|
+
=== Ruby Versions
|
74
|
+
|
75
|
+
We did not restore the daemon functionality for JRuby; so at the moment this will work with the MRI distribution, and possibly others that support https://ruby-doc.org/core-2.6.1/Process.html#method-c-daemon[`Process.daemon(true, true)`].
|
76
|
+
|
77
|
+
For supported MRI Ruby Versions see the https://github.com/kigster/puma-daemon/blob/master/.github/workflows/main.yml#L10[Github Workflow] file.
|
78
|
+
|
79
|
+
=== Puma Versions
|
80
|
+
|
81
|
+
Currently Puma versions 5 and 6 are supported.
|
82
|
+
|
83
|
+
=== Known Issues
|
84
|
+
|
85
|
+
Please see the list of open issues on the https://github.com/kigster/puma-daemon/issues[Issues Page].
|
86
|
+
Any help is always welcomed.
|
87
|
+
|
88
|
+
=== How it works?
|
89
|
+
|
90
|
+
This gem's goal was to surgically augment Puma's source code to restore daemonization by merely requiring `puma/daemon`.
|
91
|
+
|
92
|
+
We accomplished this goal by adding the daemonization call to the routine `output_header()` which is invoked by both `Puma::Single` runner and the `Puma::Cluster` runner at the very beginning of the launch process.
|
93
|
+
While relatively brittle, particularly if the future versions of Puma change this, this approach seems to work with the currently released version of Puma (5 and 6).
|
94
|
+
|
95
|
+
If you run into problems, please https://github.com/kigster/puma-daemon/issues/new[submit an issue].
|
96
|
+
|
97
|
+
== Examples
|
40
98
|
|
41
99
|
Add this line to your application's Gemfile:
|
42
100
|
|
43
101
|
[source,ruby]
|
44
102
|
----
|
45
103
|
gem 'puma-daemon', require: false
|
46
|
-
gem 'puma', '~> 5'
|
104
|
+
gem 'puma', '~> 5' # or 6
|
47
105
|
----
|
48
106
|
|
49
|
-
|
107
|
+
In your `config/puma.rb`, eg.
|
50
108
|
|
51
|
-
|
109
|
+
[source,ruby]
|
110
|
+
----
|
111
|
+
require 'puma/daemon'
|
112
|
+
bind 'tcp://0.0.0.0:3000'
|
113
|
+
workers 2
|
114
|
+
threads 4
|
115
|
+
daemonize
|
116
|
+
----
|
52
117
|
|
53
|
-
|
118
|
+
And then execute:
|
54
119
|
|
55
|
-
|
120
|
+
[source,bash]
|
121
|
+
----
|
122
|
+
bundle install -j 12
|
123
|
+
bundle exec puma -C config/puma.rb [rackup.ru]
|
124
|
+
----
|
56
125
|
|
57
|
-
|
58
|
-
|
126
|
+
Make sure you have `config.ru` Rackup file in the current folder.
|
127
|
+
Checkout the shell script inside the `example` folder for more info.
|
59
128
|
|
60
|
-
This gem allows you to daemonize using both ways, but with a small caveat in each case.
|
61
129
|
|
62
|
-
Please
|
130
|
+
NOTE: Please see the https://github.com/kigster/puma-daemon/tree/master/example[`example`] directory in the source of the gem. It contains `single.sh` and `cluster.sh` scripts that boot Puma via `pumad` binary.
|
63
131
|
|
64
|
-
===
|
132
|
+
=== Using Config File
|
65
133
|
|
66
134
|
If you want to specify `daemonize` in your config file, simply include `require 'puma/daemon'` at the top of your config file:
|
67
135
|
|
@@ -74,7 +142,7 @@ port 3001
|
|
74
142
|
workers 3
|
75
143
|
threads 2,3
|
76
144
|
# accepts true or false, and if false is passed will NOT daemonize
|
77
|
-
daemonize
|
145
|
+
daemonize
|
78
146
|
----
|
79
147
|
|
80
148
|
With this method you can continue using the standard `puma` executable to get it started, but (and this is important) — **you must remove any `-d` or `--daemonize` from the command line**, or Puma v5 and above will fail with an error.
|
@@ -83,62 +151,73 @@ Here is an example of daemonizing via the config file shown above, and using the
|
|
83
151
|
|
84
152
|
[source,bash]
|
85
153
|
----
|
86
|
-
❯
|
87
|
-
❯ puma -C
|
88
|
-
|
89
|
-
[
|
90
|
-
[
|
91
|
-
[
|
92
|
-
[
|
93
|
-
[
|
94
|
-
[
|
95
|
-
[
|
96
|
-
[
|
97
|
-
[
|
98
|
-
[
|
154
|
+
❯ cd example
|
155
|
+
❯ bundle exec puma -I ../lib -C $(pwd)/puma.rb -w 4 config.ru
|
156
|
+
[62235] Puma starting in cluster mode...
|
157
|
+
[62235] * Puma version: 6.1.1 (ruby 2.7.6-p219) ("The Way Up")
|
158
|
+
[62235] * Min threads: 0
|
159
|
+
[62235] * Max threads: 16
|
160
|
+
[62235] * Environment: development
|
161
|
+
[62235] * Master PID: 62235
|
162
|
+
[62235] * Puma Daemon: Daemonizing...
|
163
|
+
[62235] * Gem: puma-daemon v0.2.2
|
164
|
+
[62235] * Gem: puma v6.1.1
|
165
|
+
[62258] * Workers: 4
|
166
|
+
[62258] * Restarts: (✔) hot (✔) phased
|
167
|
+
[62258] * Listening on unix:///tmp/puma.sock
|
168
|
+
[62258] * Listening on http://0.0.0.0:9292
|
99
169
|
----
|
100
170
|
|
101
171
|
Note that using this method you can decide whether to daemonize or not by passing true or false to the `daemonize` method.
|
102
172
|
|
103
|
-
===
|
173
|
+
=== Using Command Line
|
104
174
|
|
105
175
|
If you prefer to make a decision whether to daemonize or not on the command line, you only have to make one chance: replace `puma` with `pumad`.
|
106
176
|
|
107
|
-
NOTE: We did not want to conflict with the `puma` gem by introducing another executable under the same name.
|
177
|
+
NOTE: We did not want to conflict with the `puma` gem by introducing another executable under the same name.
|
178
|
+
The executable this gem provides is called `pumad` (where 'd' stands for daemon, and follows standard UNIX convention, as in eg `sshd`, `ftpd`, etc).
|
108
179
|
|
109
|
-
If you replace `puma` with `pumad
|
180
|
+
If you replace `puma` with `pumad`, you no longer need to pass any additional command line flag (`-d` and `--daemonize`) to daemonize.
|
181
|
+
You can continue passing them or you can remove them (these flags are stripped out before ARGV is passed onto Puma's CLI parser.)
|
110
182
|
|
111
183
|
[source,bash]
|
112
184
|
----
|
113
|
-
❯
|
114
|
-
❯
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
[98795] * Puma Daemon: Daemonizing (puma-daemon v0.1.1)...
|
185
|
+
❯ cd example
|
186
|
+
❯ ../exe/pumad -C $(pwd)/puma.rb -w 0 config.ru
|
187
|
+
|
188
|
+
Puma starting in single mode...
|
189
|
+
* Puma version: 6.1.1 (ruby 2.7.6-p219) ("The Way Up")
|
190
|
+
* Min threads: 0
|
191
|
+
* Max threads: 16
|
192
|
+
* Environment: development
|
193
|
+
* PID: 63179
|
194
|
+
* Puma Daemon: Daemonizing...
|
195
|
+
* Gem: puma-daemon v0.2.2
|
196
|
+
* Gem: puma v6.1.1
|
197
|
+
* Listening on unix:///tmp/puma.sock
|
198
|
+
* Listening on http://0.0.0.0:9292
|
128
199
|
----
|
129
200
|
|
130
201
|
As you can see, at the end it says "Daemonizing".
|
131
202
|
|
132
|
-
If you start puma this way, you can still specify `daemonize(false)` in the configuration file to turn it off, but the default is to daemonize.
|
203
|
+
If you start puma this way, you can still specify `daemonize(false)` in the configuration file to turn it off, but the default is to daemonize.
|
204
|
+
Also, if you start with `pumad` you do not need to include `require 'puma/daemon'` in your configuration file, as the `pumad` binary loads all dependencies prior to parsing the config.
|
133
205
|
|
206
|
+
== Contributing
|
134
207
|
|
135
|
-
|
208
|
+
NOTE: You do need a working `make` utility to use the below commands.
|
136
209
|
|
137
|
-
After checking out the repo, run `
|
210
|
+
* After checking out the repo, run `make puma-v5` or `make puma-v6` to configure your dependent vesion of Puma.
|
138
211
|
|
139
|
-
|
212
|
+
* After that, run `bin/setup` to install dependencies.
|
140
213
|
|
141
|
-
|
214
|
+
* Then, run `rake spec` to run the tests.
|
215
|
+
|
216
|
+
* You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
217
|
+
|
218
|
+
* To install this gem onto your local machine, run `bundle exec rake install`.
|
219
|
+
|
220
|
+
* To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to https://rubygems.org[rubygems.org].
|
142
221
|
|
143
222
|
Bug reports and pull requests are welcome on GitHub at https://github.com/kigster/puma-daemon.
|
144
223
|
|