mlanett-daemons 1.0.13

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.
Files changed (85) hide show
  1. data/.gitignore +1 -0
  2. data/Gemfile +4 -0
  3. data/Gemfile.lock +17 -0
  4. data/LICENSE +29 -0
  5. data/README +223 -0
  6. data/Rakefile +15 -0
  7. data/Releases +126 -0
  8. data/TODO +6 -0
  9. data/daemons.gemspec +27 -0
  10. data/daemons.tmproj +56 -0
  11. data/examples/call/call.rb +56 -0
  12. data/examples/call/call.rb.log +1 -0
  13. data/examples/call/call_monitor.rb +55 -0
  14. data/examples/daemonize/daemonize.rb +20 -0
  15. data/examples/run/ctrl_crash.rb +17 -0
  16. data/examples/run/ctrl_exec.rb +16 -0
  17. data/examples/run/ctrl_exit.rb +15 -0
  18. data/examples/run/ctrl_keep_pid_files.rb +17 -0
  19. data/examples/run/ctrl_monitor.rb +16 -0
  20. data/examples/run/ctrl_multiple.rb +16 -0
  21. data/examples/run/ctrl_normal.rb +12 -0
  22. data/examples/run/ctrl_ontop.rb +16 -0
  23. data/examples/run/ctrl_optionparser.rb +43 -0
  24. data/examples/run/ctrl_proc.rb +25 -0
  25. data/examples/run/ctrl_proc.rb.output +101 -0
  26. data/examples/run/ctrl_proc_multiple.rb +22 -0
  27. data/examples/run/ctrl_proc_multiple.rb.output +2 -0
  28. data/examples/run/ctrl_proc_simple.rb +17 -0
  29. data/examples/run/myserver.rb +12 -0
  30. data/examples/run/myserver_crashing.rb +14 -0
  31. data/examples/run/myserver_crashing.rb.output +30 -0
  32. data/examples/run/myserver_exiting.rb +8 -0
  33. data/html/classes/Daemonize.html +497 -0
  34. data/html/classes/Daemons.html +683 -0
  35. data/html/classes/Daemons/Application.html +836 -0
  36. data/html/classes/Daemons/ApplicationGroup.html +508 -0
  37. data/html/classes/Daemons/CmdException.html +113 -0
  38. data/html/classes/Daemons/Controller.html +429 -0
  39. data/html/classes/Daemons/Error.html +113 -0
  40. data/html/classes/Daemons/Exception.html +111 -0
  41. data/html/classes/Daemons/Monitor.html +263 -0
  42. data/html/classes/Daemons/Optparse.html +244 -0
  43. data/html/classes/Daemons/Pid.html +339 -0
  44. data/html/classes/Daemons/PidFile.html +441 -0
  45. data/html/classes/Daemons/PidMem.html +126 -0
  46. data/html/classes/Daemons/RuntimeException.html +113 -0
  47. data/html/classes/Daemons/SystemError.html +163 -0
  48. data/html/created.rid +1 -0
  49. data/html/files/README.html +377 -0
  50. data/html/files/Releases.html +342 -0
  51. data/html/files/TODO.html +121 -0
  52. data/html/files/lib/daemons/application_group_rb.html +101 -0
  53. data/html/files/lib/daemons/application_rb.html +110 -0
  54. data/html/files/lib/daemons/cmdline_rb.html +101 -0
  55. data/html/files/lib/daemons/controller_rb.html +101 -0
  56. data/html/files/lib/daemons/daemonize_rb.html +207 -0
  57. data/html/files/lib/daemons/exceptions_rb.html +101 -0
  58. data/html/files/lib/daemons/monitor_rb.html +108 -0
  59. data/html/files/lib/daemons/pid_rb.html +108 -0
  60. data/html/files/lib/daemons/pidfile_rb.html +108 -0
  61. data/html/files/lib/daemons/pidmem_rb.html +108 -0
  62. data/html/files/lib/daemons_rb.html +117 -0
  63. data/html/fr_class_index.html +41 -0
  64. data/html/fr_file_index.html +40 -0
  65. data/html/fr_method_index.html +91 -0
  66. data/html/index.html +24 -0
  67. data/html/rdoc-style.css +208 -0
  68. data/lib/daemons.rb +284 -0
  69. data/lib/daemons/application.rb +376 -0
  70. data/lib/daemons/application_group.rb +152 -0
  71. data/lib/daemons/cmdline.rb +117 -0
  72. data/lib/daemons/controller.rb +137 -0
  73. data/lib/daemons/daemonize.rb +263 -0
  74. data/lib/daemons/exceptions.rb +28 -0
  75. data/lib/daemons/monitor.rb +136 -0
  76. data/lib/daemons/pid.rb +115 -0
  77. data/lib/daemons/pidfile.rb +111 -0
  78. data/lib/daemons/pidmem.rb +10 -0
  79. data/lib/daemons/version.rb +3 -0
  80. data/setup.rb +1360 -0
  81. data/test/call_as_daemon.rb +12 -0
  82. data/test/tc_main.rb +24 -0
  83. data/test/test1.rb +19 -0
  84. data/test/testapp.rb +11 -0
  85. metadata +170 -0
@@ -0,0 +1,12 @@
1
+ SCRIPT_DIR = File.split(File.expand_path(__FILE__))[0]
2
+
3
+ $LOAD_PATH << File.join(SCRIPT_DIR, '../lib')
4
+
5
+
6
+ require 'pp'
7
+
8
+ require 'daemons'
9
+
10
+ print Daemonize::call_as_daemon(File.join(SCRIPT_DIR, 'tmp/call_as_daemon.log')) {
11
+ print "hello"
12
+ }
data/test/tc_main.rb ADDED
@@ -0,0 +1,24 @@
1
+ require 'test/unit'
2
+
3
+ #CURRENT_DIR = File.split(File.expand_path(__FILE__))[0]
4
+
5
+ #$LOAD_PATH << File.join(CURRENT_DIR, '../lib')
6
+
7
+
8
+ require 'pp'
9
+
10
+ require 'daemons'
11
+
12
+
13
+ class TestMain < Test::Unit::TestCase
14
+
15
+ def test_argv_parsing
16
+ end
17
+
18
+ def test_run
19
+ #Daemons.run(File.join(CURRENT_DIR,'testapp.rb'))
20
+ end
21
+
22
+ end
23
+
24
+
data/test/test1.rb ADDED
@@ -0,0 +1,19 @@
1
+
2
+ SCRIPT_DIR = File.split(File.expand_path(__FILE__))[0]
3
+
4
+ $LOAD_PATH << File.join(SCRIPT_DIR, '../lib')
5
+
6
+
7
+ require 'pp'
8
+
9
+ require 'daemons'
10
+
11
+
12
+ options = {
13
+ :dir_mode => :script,
14
+ :dir => 'tmp',
15
+ :multiple => true
16
+ }
17
+
18
+ Daemons.run(File.join(SCRIPT_DIR,'testapp.rb'), options)
19
+
data/test/testapp.rb ADDED
@@ -0,0 +1,11 @@
1
+
2
+ require 'pp'
3
+
4
+ puts "Application ARGV:"
5
+ pp ARGV
6
+
7
+
8
+ loop do
9
+ sleep(5)
10
+ end
11
+
metadata ADDED
@@ -0,0 +1,170 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mlanett-daemons
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.13
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Thomas Uehlinger
9
+ autorequire: daemons
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2009-08-26 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: bundler
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '1.0'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '1.0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: rake
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ description: Daemons provides an easy way to wrap existing ruby scripts (for example
47
+ a self-written server) to be run as a daemon and to be controlled by simple start/stop/restart
48
+ commands. You can also call blocks as daemons and control them from the parent
49
+ or just daemonize the current process. Besides this basic functionality, daemons
50
+ offers many advanced features like exception backtracing and logging (in case your
51
+ ruby script crashes) and monitoring and automatic restarting of your processes if
52
+ they crash.
53
+ email: th.uehlinger@gmx.ch
54
+ executables: []
55
+ extensions: []
56
+ extra_rdoc_files: []
57
+ files:
58
+ - .gitignore
59
+ - Gemfile
60
+ - Gemfile.lock
61
+ - LICENSE
62
+ - README
63
+ - Rakefile
64
+ - Releases
65
+ - TODO
66
+ - daemons.gemspec
67
+ - daemons.tmproj
68
+ - examples/call/call.rb
69
+ - examples/call/call.rb.log
70
+ - examples/call/call_monitor.rb
71
+ - examples/daemonize/daemonize.rb
72
+ - examples/run/ctrl_crash.rb
73
+ - examples/run/ctrl_exec.rb
74
+ - examples/run/ctrl_exit.rb
75
+ - examples/run/ctrl_keep_pid_files.rb
76
+ - examples/run/ctrl_monitor.rb
77
+ - examples/run/ctrl_multiple.rb
78
+ - examples/run/ctrl_normal.rb
79
+ - examples/run/ctrl_ontop.rb
80
+ - examples/run/ctrl_optionparser.rb
81
+ - examples/run/ctrl_proc.rb
82
+ - examples/run/ctrl_proc.rb.output
83
+ - examples/run/ctrl_proc_multiple.rb
84
+ - examples/run/ctrl_proc_multiple.rb.output
85
+ - examples/run/ctrl_proc_simple.rb
86
+ - examples/run/myserver.rb
87
+ - examples/run/myserver_crashing.rb
88
+ - examples/run/myserver_crashing.rb.output
89
+ - examples/run/myserver_exiting.rb
90
+ - html/classes/Daemonize.html
91
+ - html/classes/Daemons.html
92
+ - html/classes/Daemons/Application.html
93
+ - html/classes/Daemons/ApplicationGroup.html
94
+ - html/classes/Daemons/CmdException.html
95
+ - html/classes/Daemons/Controller.html
96
+ - html/classes/Daemons/Error.html
97
+ - html/classes/Daemons/Exception.html
98
+ - html/classes/Daemons/Monitor.html
99
+ - html/classes/Daemons/Optparse.html
100
+ - html/classes/Daemons/Pid.html
101
+ - html/classes/Daemons/PidFile.html
102
+ - html/classes/Daemons/PidMem.html
103
+ - html/classes/Daemons/RuntimeException.html
104
+ - html/classes/Daemons/SystemError.html
105
+ - html/created.rid
106
+ - html/files/README.html
107
+ - html/files/Releases.html
108
+ - html/files/TODO.html
109
+ - html/files/lib/daemons/application_group_rb.html
110
+ - html/files/lib/daemons/application_rb.html
111
+ - html/files/lib/daemons/cmdline_rb.html
112
+ - html/files/lib/daemons/controller_rb.html
113
+ - html/files/lib/daemons/daemonize_rb.html
114
+ - html/files/lib/daemons/exceptions_rb.html
115
+ - html/files/lib/daemons/monitor_rb.html
116
+ - html/files/lib/daemons/pid_rb.html
117
+ - html/files/lib/daemons/pidfile_rb.html
118
+ - html/files/lib/daemons/pidmem_rb.html
119
+ - html/files/lib/daemons_rb.html
120
+ - html/fr_class_index.html
121
+ - html/fr_file_index.html
122
+ - html/fr_method_index.html
123
+ - html/index.html
124
+ - html/rdoc-style.css
125
+ - lib/daemons.rb
126
+ - lib/daemons/application.rb
127
+ - lib/daemons/application_group.rb
128
+ - lib/daemons/cmdline.rb
129
+ - lib/daemons/controller.rb
130
+ - lib/daemons/daemonize.rb
131
+ - lib/daemons/exceptions.rb
132
+ - lib/daemons/monitor.rb
133
+ - lib/daemons/pid.rb
134
+ - lib/daemons/pidfile.rb
135
+ - lib/daemons/pidmem.rb
136
+ - lib/daemons/version.rb
137
+ - setup.rb
138
+ - test/call_as_daemon.rb
139
+ - test/tc_main.rb
140
+ - test/test1.rb
141
+ - test/testapp.rb
142
+ homepage: http://daemons.rubyforge.org
143
+ licenses: []
144
+ post_install_message:
145
+ rdoc_options: []
146
+ require_paths:
147
+ - lib
148
+ required_ruby_version: !ruby/object:Gem::Requirement
149
+ none: false
150
+ requirements:
151
+ - - ! '>='
152
+ - !ruby/object:Gem::Version
153
+ version: '0'
154
+ required_rubygems_version: !ruby/object:Gem::Requirement
155
+ none: false
156
+ requirements:
157
+ - - ! '>='
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ requirements: []
161
+ rubyforge_project: daemons
162
+ rubygems_version: 1.8.23
163
+ signing_key:
164
+ specification_version: 3
165
+ summary: A toolkit to create and control daemons in different ways
166
+ test_files:
167
+ - test/call_as_daemon.rb
168
+ - test/tc_main.rb
169
+ - test/test1.rb
170
+ - test/testapp.rb