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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5114c4c5cb5dba3befcc82f6eaa45d901036bc7357a6d4d81cfd8cad8c49dae6
4
- data.tar.gz: 0eb7b12972a659d053b87d4d59e24d5a3de21a9ff94c3432e8da62ac08f5c127
3
+ metadata.gz: cb08e3c11dd04ba70fdfa9a27e41d004839a48318b77bf7edb5e93976de129f7
4
+ data.tar.gz: 683d0ed93f6a41378a3ed585035b773f4008a147542ab6f29281374aa746ccf9
5
5
  SHA512:
6
- metadata.gz: '00970b9deb9eab30e1ce69b31ceca7617bf406692f5dbbb5a9459c5a5a898bc8a0e751fb751cb463f027be1977b54c0b914fcee996ad0cbea997829ce54d2360'
7
- data.tar.gz: f98f5696a4f482e29eb22c38fddc9fa6dafcfaaa4c6989a5015191c53711848e703267dc3c0da25080d9509035bf91b7aac7f009b4ccbb6de53fd8a299a4834b
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
  [![Build Status](https://travis-ci.org/thuehlinger/daemons.svg?branch=master)](https://travis-ci.org/thuehlinger/daemons)[![Code Climate](https://codeclimate.com/github/acuppy/daemons/badges/gpa.svg)](https://codeclimate.com/github/acuppy/daemons)[![Test Coverage](https://circleci.com/gh/acuppy/daemons.svg?style=shield&circle-token=a4f96fd41f7682661d6543e30207427ac8870c0d)](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
- ``` ruby
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
- ``` ruby
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
- ``` ruby
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
- ``` ruby
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
- ``` ruby
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
- ``` ruby
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)
@@ -1,3 +1,3 @@
1
1
  module Daemons
2
- VERSION = '1.4.0'
2
+ VERSION = '1.4.1'
3
3
  end
data/lib/daemons.rb CHANGED
@@ -251,7 +251,7 @@ module Daemons
251
251
  fail 'Daemons.call: no block given' unless block_given?
252
252
 
253
253
  options[:app_name] ||= 'proc'
254
- options[:proc] = Proc.new
254
+ options[:proc] = Proc.new(&block)
255
255
  options[:mode] = :proc
256
256
  options[:dir_mode] = :normal
257
257
 
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.0
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-05-02 00:00:00.000000000 Z
11
+ date: 2021-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake