daemons 1.4.0 → 1.4.1
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 +4 -4
- data/README.md +13 -18
- data/Releases +5 -0
- data/lib/daemons/version.rb +1 -1
- data/lib/daemons.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb08e3c11dd04ba70fdfa9a27e41d004839a48318b77bf7edb5e93976de129f7
|
4
|
+
data.tar.gz: 683d0ed93f6a41378a3ed585035b773f4008a147542ab6f29281374aa746ccf9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a8743b8307c977149bcfbb1d6b6b36897a1c750ef63a25f7225d7b1774eaffd128843a1d92d626c3062ff680066831214eed8dc3523216b61f15b355701f4d5
|
7
|
+
data.tar.gz: de074de7aa4ba81a507d9b06f900c2eb044628ceb3a02b5cf4abb717dfdbf6df52c56f709caa85b223d8a18b9da2c0057017074089832412a231499ef050dcde
|
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
Ruby Daemons
|
2
|
-
|
1
|
+
# Ruby Daemons
|
2
|
+
|
3
3
|
[](https://travis-ci.org/thuehlinger/daemons)[](https://codeclimate.com/github/acuppy/daemons)[](https://circleci.com/gh/acuppy/daemons)
|
4
4
|
|
5
5
|
Daemons provides an easy way to wrap existing ruby scripts (for example a self-written server)
|
@@ -12,8 +12,7 @@ Besides this basic functionality, daemons offers many advanced features like _ex
|
|
12
12
|
and logging (in case your ruby script crashes) and _monitoring_ and automatic restarting of your processes
|
13
13
|
if they crash.
|
14
14
|
|
15
|
-
Basic Usage
|
16
|
-
-----------
|
15
|
+
## Basic Usage
|
17
16
|
|
18
17
|
You can use Daemons in four different ways:
|
19
18
|
|
@@ -45,7 +44,7 @@ Daemons.run('myserver.rb')
|
|
45
44
|
|
46
45
|
And use it like this from the console:
|
47
46
|
|
48
|
-
```
|
47
|
+
``` sh
|
49
48
|
$ ruby myserver_control.rb start
|
50
49
|
(myserver.rb is now running in the background)
|
51
50
|
$ ruby myserver_control.rb restart
|
@@ -55,18 +54,17 @@ $ ruby myserver_control.rb stop
|
|
55
54
|
|
56
55
|
For testing purposes you can even run `myserver.rb` _without forking_ in the background:
|
57
56
|
|
58
|
-
```
|
57
|
+
``` sh
|
59
58
|
$ ruby myserver_control.rb run
|
60
59
|
```
|
61
60
|
|
62
61
|
An additional nice feature of Daemons is that you can pass _additional arguments_ to the script that
|
63
62
|
should be daemonized by seperating them by two _hyphens_:
|
64
63
|
|
65
|
-
```
|
64
|
+
``` sh
|
66
65
|
$ ruby myserver_control.rb start -- --file=anyfile --a_switch another_argument
|
67
66
|
```
|
68
67
|
|
69
|
-
|
70
68
|
### 2. Create wrapper scripts that include your server procs
|
71
69
|
|
72
70
|
Layout: suppose you have some code you want to run in the background and control that background process
|
@@ -96,7 +94,7 @@ end
|
|
96
94
|
|
97
95
|
And use it like this from the console:
|
98
96
|
|
99
|
-
```
|
97
|
+
``` sh
|
100
98
|
$ ruby myproc_control.rb start
|
101
99
|
(myproc.rb is now running in the background)
|
102
100
|
$ ruby myproc_control.rb restart
|
@@ -106,7 +104,7 @@ $ ruby myproc_control.rb stop
|
|
106
104
|
|
107
105
|
For testing purposes you can even run `myproc.rb` _without forking_ in the background:
|
108
106
|
|
109
|
-
```
|
107
|
+
``` sh
|
110
108
|
$ ruby myproc_control.rb run
|
111
109
|
```
|
112
110
|
|
@@ -169,13 +167,12 @@ end
|
|
169
167
|
|
170
168
|
For further documentation, refer to the module documentation of Daemons.
|
171
169
|
|
172
|
-
Displaying daemon status
|
173
|
-
------------------------
|
170
|
+
## Displaying daemon status
|
174
171
|
|
175
172
|
When daemonizing a process using a wrapper script, as examples 1 and 2 above,
|
176
173
|
the status can be shown using
|
177
174
|
|
178
|
-
```
|
175
|
+
``` sh
|
179
176
|
$ ruby myproc_control.rb status
|
180
177
|
```
|
181
178
|
|
@@ -201,12 +198,10 @@ end
|
|
201
198
|
Daemons.run('myserver.rb', { show_status_callback: :custom_show_status })
|
202
199
|
```
|
203
200
|
|
204
|
-
Documentation
|
205
|
-
-------------------
|
201
|
+
## Documentation
|
206
202
|
|
207
|
-
Documentation can be found at http://www.rubydoc.info/gems/daemons
|
203
|
+
Documentation can be found at <http://www.rubydoc.info/gems/daemons>.
|
208
204
|
|
209
|
-
Author
|
210
|
-
------
|
205
|
+
## Author
|
211
206
|
|
212
207
|
Written 2005-2021 by Thomas Uehlinger, 2014-2016 by Aaron Stone.
|
data/Releases
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
= Daemons Release History
|
2
2
|
|
3
|
+
== Release 1.4.1: August 26, 2021
|
4
|
+
|
5
|
+
* Fix :proc mode (pass &block explicitly) (thanks to Graham Rogers)
|
6
|
+
* Fix style of REAMDE.md
|
7
|
+
|
3
8
|
== Release 1.4.0: May 1, 2021
|
4
9
|
|
5
10
|
* Allow for customization which signals are sent to stop process (thanks to philister)
|
data/lib/daemons/version.rb
CHANGED
data/lib/daemons.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: daemons
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Uehlinger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|