daemonite 0.1.1 → 0.1.2

This diff has not been reviewed by any users.
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
2
  SHA1:
3
- metadata.gz: 83c22b4354294d6ab1d4ba786f449b4d4b1455bd
4
- data.tar.gz: 5faa5bd5b52029c79832f2d824d68c1eea9b6d47
3
+ metadata.gz: 65942d0e1766aaaefd265802b2da578889f1f23e
4
+ data.tar.gz: 621e08d9f66f3c7f771d442550ac528434916020
5
5
  SHA512:
6
- metadata.gz: f19be74ff69ea90a0e9f795f9992e55af3f0153162957ccb292939bfc908b3dbad5d0b73ae045a21f5ac40566aa42fbaf8b00cf90f6cb6412b8f0b162b7a21a5
7
- data.tar.gz: 32366eda543ccbc3b256a39913ffd3adb7852d904c256f2a14c49cc67f3eacc9fb3c5afae5b7eb8ec09b4cc4ec670f15bcee07e1c1dcf3254ea0511bb759e6f9
6
+ metadata.gz: b010e060ec3fcd4f45724f7a3104cf633be36b6a624b36f1d4ca57db198e8a433986e86e1890602e4444ac1b79095261bfc3da9c415e42a2be7384cc65cfbb74
7
+ data.tar.gz: 6d5ab3d54e5ff67d233c069094d7491245859a80b1256b4ecc48418f641e1c97d8874ca2dd8eb4cb19ac455c9953bc0c9ca2044032234f83ee05e59ddc7471c4
data/README.md CHANGED
@@ -11,8 +11,8 @@ details.
11
11
  ## Introduction
12
12
 
13
13
  Deamonite is just syntactic sugar around Process.daemon and argparse, which are
14
- part of standard ruby. And it gives you a simple loop. And it only works on
15
- *nix because it runs 'ps ax' (that rhymes). I know, thats clumsy and I'm a lazy
14
+ part of ruby. And it gives you a simple loop. And it only works on
15
+ *nix, because it runs 'ps ax' (that rhymes). I know, thats clumsy and I'm a lazy
16
16
  git. Please contribute a better solution if you have to.
17
17
 
18
18
  ## Why
@@ -38,10 +38,10 @@ end.loop!
38
38
 
39
39
  Everything inside the #new block is executed once. Everything inside the #run
40
40
  block is executed periodically. So make sure to include sleep to not bog down
41
- your CPU. Or not - listen to network connections. #loop! finally starts the
42
- contents of #run sequentially.
41
+ your CPU. Or not - i.e. listen to network connections. #loop! finally invokes the
42
+ contents of #run continuously.
43
43
 
44
- In order to override options, or provide your own options at start:
44
+ In order to override or provide your own options:
45
45
 
46
46
  ```ruby
47
47
  Daemonite.new(opts)
data/TODO CHANGED
@@ -1,5 +1,4 @@
1
1
  Todo + Ideas:
2
2
 
3
3
  * no functional wishes so far
4
- * create detailed documention, not only examples
5
- * create unit test
4
+ * create unit tests
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "daemonite"
3
- s.version = "0.1.1"
3
+ s.version = "0.1.2"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3.0"
6
6
  s.summary = "Daemonite - Process.daemon and argparse wrapper for loopies."
@@ -124,8 +124,8 @@ class Daemonite
124
124
  end
125
125
 
126
126
  puts "Server started as PID:#{Process.pid}"
127
- File.write(@opts[:basepath] + '/' + @opts[:pidfile],Process.pid)
128
127
  Process.daemon(@opts[:basepath]) unless @opts[:verbose]
128
+ File.write(@opts[:basepath] + '/' + @opts[:pidfile],Process.pid) # after daemon, so that we get the forked pid
129
129
  Dir.chdir(@opts[:basepath])
130
130
  ::Kernel::at_exit do
131
131
  File.unlink(@opts[:basepath] + '/' + @opts[:pidfile])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: daemonite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juergen eTM Mangler