win32-service 0.8.10 → 1.0.1

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
- SHA1:
3
- metadata.gz: 28b8ae0ffc7390d29264683ea5e425e9ec92fcc6
4
- data.tar.gz: 597ab038b782f445043d993dfdbac32b4e79ddc4
2
+ SHA256:
3
+ metadata.gz: e27f59203c2e9c16dea5335981498b12a350f3b627e9991145fc51cccc7e1d8f
4
+ data.tar.gz: d692ad6fbbc89954be51465f0a5af4906554e1dcc72d4c30748e71156a07ad8c
5
5
  SHA512:
6
- metadata.gz: f52176840a11425120d4eb282e50660ba86a267a1070523e5de6aa2f8ee6694b503dd061d62b9f404a5e03f0e31ab4ccf11754f02f59d24b2e525094b42fb4f2
7
- data.tar.gz: 97b96ff3ab2ef6f7873ce8fc643e4a7ad747666d0327f12e6cff199d02e5a8004226c81e7c108c55f95fd40f24e1dd202d82a9bb4ff10d0407c10a88bcad346e
6
+ metadata.gz: 973eb074ad890a30ec58ff8befacd7a3c0b160dfe7f36c49d5a5ed6f70634cbf38909747e19609ccb085056c8070065029a0fed33440a8eeb0c339c036c1c0ae
7
+ data.tar.gz: 79e03a845dbad972be71566e1208bdb56bab7a6ba9673301030b819bd1bc3a40b78ab45142bef2161da2e1ea9075f205d9f92d94e0442bac1efba60b2d625234
@@ -1,336 +1,347 @@
1
- == 0.8.10 - 11-Dec-2016
2
- * Fixed a bug where action resolution information was not correct. Thanks go
3
- to BXII-Dave for the spot and patch.
4
-
5
- == 0.8.9 - 26-Jun-2016
6
- * Added the ffi-win32-extensions dependency.
7
- * Changed the way service dependencies are determined.
8
- * Removed the helper.rb file since it's no longer used.
9
-
10
- == 0.8.8 - 24-Jun-2016
11
- * Fixed the function prototypes for CreateEvent and AdjustTokenPrivileges
12
- where I was using :bool instead of :int.
13
- * Updated the various FFI module wrapper names so that they're more distinctly
14
- namespaced. Avoids a clash with the win32-eventlog gem, and possibly others.
15
- * Discovered more places where QueryServiceConfig2 could fail while attempting
16
- to get failure actions and delayed auto start info. Instead of failing,
17
- these now set their respective data to nil.
18
- * A timeout value in our main observer thread was increased to potentially
19
- improve performance. Feedback welcome.
20
- * This gem is now signed.
21
- * Added the win32-service.rb and win32-daemon.rb files for convenience.
22
- * Use require_relative internally.
23
- * Added win32-security as a development dependency. It was already being used
24
- for tests but now it's actually part of the gemspec.
25
- * Many tests are now skipped unless run with administrative privileges, either
26
- because they require it, or because they otherwise take too long.
27
- * Gem related tasks in the Rakefile now assume Rubygems 2.x.
28
- * Added an appveyor.yml file.
29
- * The DemoDaemon example will create C:/Tmp if it doesn't already exist.
30
-
31
- == 0.8.7 - 14-Jul-2014
32
- * Fixed a bug in the SERVICE_DELAYED_AUTO_START_INFO struct. It now returns 0
33
- or 1, though it still accepts true or false as arguments. Thanks go to
34
- Kartik Null Cating-Subramanian for the spot.
35
-
36
- == 0.8.6 - 21-Aug-2014
37
- * Some internal changes that make stopping a service more robust. Thanks go
38
- to Ethan J. Brown for the patches.
39
- * Renamed the constants module to avoid name clashes. Thanks go to Michael
40
- Smith for the spot.
41
-
42
- == 0.8.5 - 2-Jul-2014
43
- * The service type for Service.new no longer defaults to being an interactive
44
- process. This could cause process credential issues and wasn't very
45
- useful in practice anyway. Thanks go to Pierre Ynard for the report.
46
- * More tests skipped unless run with admin privileges.
47
- * Use relative_require instead of doing things manually.
48
- * Minor memory efficieny improvements.
49
- * Skip errors on ERROR_RESOURCE_TYPE_NOT_FOUND when getting service config info.
50
- Thanks go to Rob Reynolds for the patch.
51
-
52
- == 0.8.4 - 23-Jan-2014
53
- * Added support for the delayed start startup type. Thanks go to Jim Arnold
54
- for the patch.
55
- * Fixed the service test that ensures that trying to start an already running
56
- service will raise an error. Thanks again to Jim Arnold for the patch.
57
-
58
- == 0.8.3 - 1-Nov-2013
59
- * Fixed a bug where a service's state could be changed when merely
60
- interrogating the service. Thanks go to Glenn Sarti / Puppet Labs
61
- for the spot.
62
- * Fixed a bug where attempting to get the description of a service that
63
- has no description could raise an error. Now an empty string is returned.
64
-
65
- == 0.8.2 - 13-Aug-2013
66
- * Fixed a bug in the Service.start method where it was not handling arguments
67
- properly. Thanks go to Sean Karlage for the spot.
68
-
69
- == 0.8.1 - 2-Aug-2013
70
- * Fixed the failure actions code for the Service#configure method
71
- so that it is also using FFI.
72
- * An internal fix for the Daemon class was added. In short, you no longer
73
- need to, nor should you, call exit! in a service_stop method. Thanks go
74
- to Adrian Candaten for pointing out the issue in general.
75
- * Made FFI functions private.
76
- * Added Rake as a development dependency.
77
- * Removed an internal helper function that was no longer being used.
78
-
79
- == 0.8.0 - 19-Jun-2013
80
- * Converted all code to use FFI. This includes the Daemon code, which means
81
- that it also now works with JRuby.
82
-
83
- == 0.7.2 - 7-Sep-2011
84
- * Now works with mingw compiler by skipping __try and __finally if using
85
- mingw, or using them with mingw if the seh.h header is found.
86
- * The binary gem now contains binaries for both Ruby 1.8.7 and 1.9.2 using
87
- a simple wrapper.
88
- * Updated some Rake tasks.
89
-
90
- == 0.7.1 - 9-Feb-2010
91
- * Compatibility fixes for 1.9.x.
92
- * Fixed a bug where the controls_accepted struct member was always nil. This
93
- has been fixed and now always returns an array.
94
- * Added 'pre-shutdown' as possible values for the list of controls accepted.
95
- * Changed test-unit from a runtime dependency to a development dependency.
96
- * Some tests were refactored to be more reliable.
97
- * Refactored the Rakefile and gemspec.
98
-
99
- == 0.7.0 - 30-Jun-2009
100
- * INTERFACE CHANGE: The Service.new and Service.configure methods now accept
101
- a single hash argument only. The :service_name key is mandatory, while the
102
- :host key is optional.
103
- * Fixed a bug in the Service.services method where a segfault would occur if
104
- the binary_path_name was greater than 260 characters. The buffer size has
105
- been increased to 1024 characters. Thanks go to Dan Daniels for the spot.
106
- * Altered the Daemon class so that the Ruby interpreter was not invoked within
107
- the Service_Main function. The functions that close stdin, stdout and stderr
108
- are now called within the mainloop method. Thanks go to Tim Hanson for the
109
- spot and the patch.
110
- * Eliminated a minor build warning in daemon.c
111
- * License changed to Artistic 2.0, with corresponding gemspec update.
112
- * Added an uninstall rake task.
113
- * Updated the service_stop method in the demo_daemon.rb file, and added some
114
- additional comments.
115
- * The test files were renamed.
116
- * Several tests were updated and refactored to use Test::Unit 2.x. That
117
- library is now a dependency.
118
- * The 'uninstall' Rakefile task is now more verbose.
119
-
120
- == 0.6.1 - 1-Jan-2008
121
- * The Service.services method now handles the scenario where a particular
122
- service may still exist, but its underlying registry entry has been deleted.
123
- In this case, most ServiceInfo struct members are set to nil and a warning
124
- is issued.
125
- * RDoc updates.
126
-
127
- == 0.6.0 - 25-Nov-2007
128
- * The Service control class is now pure Ruby. The Daemon class is still C,
129
- however. That may change in the future. This means the windows-pr
130
- library is now a prerequisite.
131
- * The Service.new method has been altered in a way that is not backwards
132
- compatible. It is now the same as Service.create.
133
- * The Service.start method now properly handles arguments to the
134
- Daemon#service_main method.
135
- * The Daemon source code is now separate from the Service control class
136
- source code. That means you must require them separately, as needed.
137
- * The Daemon class should be much more responsive to service events now,
138
- especially service_stop. Many thanks go to Kevin Burge for the patch.
139
- * Added the Daemon.mainloop method as a shortcut for Daemon.new.mainloop.
140
- * The Daemon class now redirects STDIN, STDOUT and STDERR to the NUL device
141
- if they're still associated with a terminal when the service starts. This
142
- should help prevent Errno::EBADF errors.
143
- * The Service.services class method now supports the group parameter for
144
- versions of Ruby built with older compilers, i.e. it will now work with
145
- the one-click Ruby installer.
146
- * The Service.getdisplayname method was changed to Service.get_display_name.
147
- An alias has been provided for backwards compatibility.
148
- * The Service.getservicename method was changed to Service.get_service_name.
149
- An alias has been provided for backwards compatibility.
150
- * Added the Service.config_info method.
151
- * The Service.create and Service.configure methods now allow you to set
152
- failure actions, failure commands, and reset/retry periods.
153
- * Improved test suite.
154
- * Changed 'tdaemon.rb', 'tdaemon_ctl.rb' and 'service_test.rb' to
155
- 'demo_daemon.rb', 'demo_daemon_ctl.rb' and 'demo_services.rb', respectively.
156
- * Some refactoring and updates to the demo daemon and demo daemon controller
157
- examples.
158
- * The Win32Service struct is now ServiceInfo.
159
- * ServiceError is now Service::Error.
160
- * DaemonError is now Daemon::Error.
161
- * Some documentation improvements, corrections and updates.
162
-
163
- == 0.5.2 - 25-Nov-2006
164
- * Fixed a bug in the Daemon class where the service event handling methods
165
- (most notably service_stop) did not work properly due to thread blocking
166
- issues. Many thanks go to Patrick Hurley for the patch.
167
- * Added the Daemon#running? method as helper method for your service_main
168
- method.
169
- * The 'interactive?' struct member is now just 'interactive'. This was
170
- supposed to have been in the last release but was somehow missed. Sorry.
171
- * Scrapped the old daemon_test.rb file and split it into two new files -
172
- tdaemon.rb and tdaemon_ctl.rb. In the process a few bugs were fixed.
173
- * Added a gemspec.
174
- * Documentation and test suite updates.
175
-
176
- == 0.5.1 - 18-Jun-2006
177
- * Added the Service.open method.
178
- * The Service.new method now accepts a block, and automatically closes itself
179
- at the end of the block.
180
- * Fixed in a bug in the Service.create method where setting dependencies
181
- was not working properly. Thanks go to Scott Harper for the spot.
182
- * The 'interactive?' struct member is now just 'interactive' since Ruby no
183
- longer supports question marks in struct member names. UGH.
184
- * The block for Service#configure_service is no longer optional.
185
- * Replaced ClipSrv with W32Time for most of the test methods in tc_service.rb
186
- because it had a dependency that is disabled on most systems.
187
- * Added a tweak to the extconf.rb file to help with the test suite.
188
- * Some documentation updates and corrections.
189
-
190
- == 0.5.0 - 26-Nov-2005
191
- * Added a service_init hook, and (internally) altered the way the service
192
- starts. This was done to deal with services that need to perform any
193
- initialization in the Daemon itself before the service starts. Previously
194
- this would result in the service timing out during startup.
195
-
196
- Thanks go to Jamey Cribbs for spotting the problem.
197
-
198
- * Modified the Daemon example, adding a service_init hook that does about 10
199
- seconds worth of initialization before finally starting. See the comments
200
- in examples\daemon_test.rb for more information.
201
- * Minor test and README changes.
202
-
203
- == 0.4.6 - 24-May-2005
204
- * Fixed an initialization bug that could cause Daemons to fail unless the
205
- win32-service package was the last package require'd.
206
- * Altered the Service.start method. It now takes any number of arguments
207
- (after the service and host name). These arguments are passed to the
208
- service's Service_Main() function.
209
- * The Service.services method now returns an Array of ServiceStruct's in
210
- non-block form.
211
- * The Service.start, Service.pause, Service.resume, Service.stop and
212
- Service.delete methods now return the class (self), not 'true'.
213
- * Added the ability to add or configure the service description in
214
- Service#create_service or Service#configure, respectively.
215
- * Fixed a bug in the Service.start method where false positives could result.
216
- * Updated the ServiceStatus struct to include pid and service_flags on Win2k
217
- or later.
218
- * Unicode is now the default setting as far as internal string handling. It
219
- will still work fine with 'regular' text.
220
- * Added safe string handling for string input values.
221
- * Added rdoc comments into the C source.
222
- * Made the service.txt and daemon.txt files rdoc friendly.
223
- * Removed the service.rd and daemon.rd files. If you want html documentation,
224
- run rdoc over the service.txt and daemon.txt files.
225
- * The dreaded "code cleanup".
226
-
227
- == 0.4.5 - 28-Feb-2005
228
- * Fixed an accessor bug in Service#create. Thanks go to Nathaniel Talbott
229
- for the spot.
230
- * Eliminated a warning that appeared starting in Ruby 1.8.2 regarding Struct
231
- redefinitions.
232
- * Moved 'examples' directory to toplevel directory.
233
- * Deleted the 'test2.rb' example. This was supplanted by the 'daemon_test.rb'
234
- script.
235
- * Renamed the 'test.rb' file to 'services_test.rb'.
236
- * Made this document rdoc friendly.
237
-
238
- == 0.4.4 - 27-Aug-2004
239
- * Modified the Service class to use the newer allocation framework. The
240
- Daemon class already used this, hence no major version bump.
241
- * Fixed in a bug in the create_service() method with regards to the
242
- 'dependencies' option and null arguments (you no longer need to specify
243
- an empty array).
244
-
245
- == 0.4.3 - 14-Aug-2004
246
- * Fixed the Daemon class by adding back the constants it needed in order to
247
- run. I accidentally broke this when I changed the Daemon class from being
248
- a subclass of Service to being its own class.
249
- * Added a separate test suite for the Daemon class, tc_daemon.rb, to help
250
- me from making that mistake ever again. :)
251
- * Updated the daemon_test.rb script a bit to report error messages should
252
- any occur.
253
- * Minor doc updates
254
-
255
- == 0.4.2 - 10-Jul-2004
256
- * The Daemon class is no longer a subclass of Service.
257
- * Added the 'pid' and 'service_flags' struct members to the Win32Service
258
- struct. These members are only available to folks using Windows 2000 or
259
- later and who compile with VC++ 7.0 or later (including the .NET SDK).
260
- * The Service.services method now accepts a group name as an optional third
261
- argument. Again, you must be using Windows 2000 or later and compile with
262
- VC++ 7.0 or later (including the .NET SDK).
263
- * The deprecated STR2CSTR() functions were replaced with StringValuePtr().
264
- This also means that as of this version, win32-service requires Ruby
265
- 1.8.0 or greater.
266
- * Moved the sample programs to doc/examples
267
- * Removed the .html files under /doc. You can generate that on your own if
268
- you like.
269
-
270
- == 0.4.1 - 14-Mar-2004
271
- * Added the exists? class method and corresponding test suite additions.
272
- * Pushed the ServiceError and DaemonError classes under the Win32 module.
273
- * Normalized tc_service.rb so that it can be run outside of the test directory
274
- more easily.
275
-
276
- == 0.4.0 - 9-Feb-2004
277
- * Changed "worker" method to "service_main" method.
278
- * Added event hooks for stop, pause, resume, etc. See the documentation for
279
- further details. (Thanks Park Heesob)
280
- * Some of the Daemon functions were raising ServiceError. They have been
281
- changed to DaemonError.
282
- * Updated the daemon_test.rb file to use the new event hooks.
283
- * Documentation additions and updates.
284
-
285
- == 0.3.0 - 31-Jan-2004
286
- * Added a Daemon subclass. This allows you to run Ruby programs as a service.
287
- Please see the documentation for more details. (Thanks Park Heesob). This
288
- should be considered an ALPHA release.
289
- * The Win32ServiceError class has been renamed to just ServiceError. I felt
290
- the "Win32" was redundant, given that it's already under the Win32 module.
291
- * In some cases a bogus error description was being returned because the
292
- GetLastError() function was being called too late. This has been fixed.
293
- (Thanks Park Heesob).
294
- * The explicit garbage collection has been removed because what I thought was
295
- a memory leak was not, in fact, a memory leak. In addition, it was hurting
296
- performance badly.
297
- * The "\r\n" is now automatically stripped from error messages. This was
298
- causing slightly garbled error messages. (Thanks Park Heesob).
299
- * Added explicit closing of the Service Control Manager handle in the
300
- services() function for those rare cases where it may fail while reading
301
- service information.
302
- * Made some of the error strings a bit more descriptive.
303
- * Test suite and documentation additions, including a sample daemon program
304
- in the test directory called "daemon_test.rb".
305
-
306
- == 0.2.2 - 15-Jan-2004
307
- * Fixed a mistake in the service_init declaration within Init_service().
308
- * Fixed bug in the service_init function with regards to desired access.
309
- * Modified service_free() function to explicitly set the hSCManager handle
310
- to NULL and modified the service_close() method to test hSCManager handle
311
- for NULL value. This should eliminate accidentally trying to close an
312
- already closed handle, which may have happened as the result of a free()
313
- call. (Thanks Park Heesob).
314
- * Added explicit garbage collection in Service.services() method.
315
- * More explicit about closing open HANDLE's when error conditions arise.
316
-
317
- == 0.2.1 - 2-Nov-2003
318
- * Made the exported less redundant and less verbose, e.g.
319
- Service::SERVICE_DISABLED is now just Service::DISABLED. The same is true
320
- for the service control constants, i.e. the 'SC_' has been removed.
321
- * Corresponding test suite changes.
322
-
323
- == 0.2.0 - 16-Oct-2003
324
- * The constructor has been changed. It now only takes a machine name and a
325
- desired access for arguments. The keyword arguments are now part of the
326
- create_service method() and only in block form. See the documentation for
327
- more details.
328
- * Added a configure_service() and close() instance methods.
329
- * Added several new constants to allow finer control over created and
330
- configured services.
331
- * Added Win32ServiceError as an exception. All failures now raise this
332
- error instead of a vanilla StandardError.
333
- * Moved some common code into the service.h file.
334
-
335
- == 0.1.0 - 10-Oct-2003
336
- - Initial release
1
+ # win32-service Change Log
2
+
3
+ <!-- latest_release -->
4
+ <!-- latest_release -->
5
+
6
+ <!-- release_rollup -->
7
+ <!-- release_rollup -->
8
+
9
+ <!-- latest_stable_release -->
10
+ <!-- latest_stable_release -->
11
+
12
+ == 0.8.10 - 11-Dec-2016
13
+ * Fixed a bug where action resolution information was not correct. Thanks go
14
+ to BXII-Dave for the spot and patch.
15
+
16
+ == 0.8.9 - 26-Jun-2016
17
+ * Added the ffi-win32-extensions dependency.
18
+ * Changed the way service dependencies are determined.
19
+ * Removed the helper.rb file since it's no longer used.
20
+
21
+ == 0.8.8 - 24-Jun-2016
22
+ * Fixed the function prototypes for CreateEvent and AdjustTokenPrivileges
23
+ where I was using :bool instead of :int.
24
+ * Updated the various FFI module wrapper names so that they're more distinctly
25
+ namespaced. Avoids a clash with the win32-eventlog gem, and possibly others.
26
+ * Discovered more places where QueryServiceConfig2 could fail while attempting
27
+ to get failure actions and delayed auto start info. Instead of failing,
28
+ these now set their respective data to nil.
29
+ * A timeout value in our main observer thread was increased to potentially
30
+ improve performance. Feedback welcome.
31
+ * This gem is now signed.
32
+ * Added the win32-service.rb and win32-daemon.rb files for convenience.
33
+ * Use require_relative internally.
34
+ * Added win32-security as a development dependency. It was already being used
35
+ for tests but now it's actually part of the gemspec.
36
+ * Many tests are now skipped unless run with administrative privileges, either
37
+ because they require it, or because they otherwise take too long.
38
+ * Gem related tasks in the Rakefile now assume Rubygems 2.x.
39
+ * Added an appveyor.yml file.
40
+ * The DemoDaemon example will create C:/Tmp if it doesn't already exist.
41
+
42
+ == 0.8.7 - 14-Jul-2014
43
+ * Fixed a bug in the SERVICE_DELAYED_AUTO_START_INFO struct. It now returns 0
44
+ or 1, though it still accepts true or false as arguments. Thanks go to
45
+ Kartik Null Cating-Subramanian for the spot.
46
+
47
+ == 0.8.6 - 21-Aug-2014
48
+ * Some internal changes that make stopping a service more robust. Thanks go
49
+ to Ethan J. Brown for the patches.
50
+ * Renamed the constants module to avoid name clashes. Thanks go to Michael
51
+ Smith for the spot.
52
+
53
+ == 0.8.5 - 2-Jul-2014
54
+ * The service type for Service.new no longer defaults to being an interactive
55
+ process. This could cause process credential issues and wasn't very
56
+ useful in practice anyway. Thanks go to Pierre Ynard for the report.
57
+ * More tests skipped unless run with admin privileges.
58
+ * Use relative_require instead of doing things manually.
59
+ * Minor memory efficieny improvements.
60
+ * Skip errors on ERROR_RESOURCE_TYPE_NOT_FOUND when getting service config info.
61
+ Thanks go to Rob Reynolds for the patch.
62
+
63
+ == 0.8.4 - 23-Jan-2014
64
+ * Added support for the delayed start startup type. Thanks go to Jim Arnold
65
+ for the patch.
66
+ * Fixed the service test that ensures that trying to start an already running
67
+ service will raise an error. Thanks again to Jim Arnold for the patch.
68
+
69
+ == 0.8.3 - 1-Nov-2013
70
+ * Fixed a bug where a service's state could be changed when merely
71
+ interrogating the service. Thanks go to Glenn Sarti / Puppet Labs
72
+ for the spot.
73
+ * Fixed a bug where attempting to get the description of a service that
74
+ has no description could raise an error. Now an empty string is returned.
75
+
76
+ == 0.8.2 - 13-Aug-2013
77
+ * Fixed a bug in the Service.start method where it was not handling arguments
78
+ properly. Thanks go to Sean Karlage for the spot.
79
+
80
+ == 0.8.1 - 2-Aug-2013
81
+ * Fixed the failure actions code for the Service#configure method
82
+ so that it is also using FFI.
83
+ * An internal fix for the Daemon class was added. In short, you no longer
84
+ need to, nor should you, call exit! in a service_stop method. Thanks go
85
+ to Adrian Candaten for pointing out the issue in general.
86
+ * Made FFI functions private.
87
+ * Added Rake as a development dependency.
88
+ * Removed an internal helper function that was no longer being used.
89
+
90
+ == 0.8.0 - 19-Jun-2013
91
+ * Converted all code to use FFI. This includes the Daemon code, which means
92
+ that it also now works with JRuby.
93
+
94
+ == 0.7.2 - 7-Sep-2011
95
+ * Now works with mingw compiler by skipping __try and __finally if using
96
+ mingw, or using them with mingw if the seh.h header is found.
97
+ * The binary gem now contains binaries for both Ruby 1.8.7 and 1.9.2 using
98
+ a simple wrapper.
99
+ * Updated some Rake tasks.
100
+
101
+ == 0.7.1 - 9-Feb-2010
102
+ * Compatibility fixes for 1.9.x.
103
+ * Fixed a bug where the controls_accepted struct member was always nil. This
104
+ has been fixed and now always returns an array.
105
+ * Added 'pre-shutdown' as possible values for the list of controls accepted.
106
+ * Changed test-unit from a runtime dependency to a development dependency.
107
+ * Some tests were refactored to be more reliable.
108
+ * Refactored the Rakefile and gemspec.
109
+
110
+ == 0.7.0 - 30-Jun-2009
111
+ * INTERFACE CHANGE: The Service.new and Service.configure methods now accept
112
+ a single hash argument only. The :service_name key is mandatory, while the
113
+ :host key is optional.
114
+ * Fixed a bug in the Service.services method where a segfault would occur if
115
+ the binary_path_name was greater than 260 characters. The buffer size has
116
+ been increased to 1024 characters. Thanks go to Dan Daniels for the spot.
117
+ * Altered the Daemon class so that the Ruby interpreter was not invoked within
118
+ the Service_Main function. The functions that close stdin, stdout and stderr
119
+ are now called within the mainloop method. Thanks go to Tim Hanson for the
120
+ spot and the patch.
121
+ * Eliminated a minor build warning in daemon.c
122
+ * License changed to Artistic 2.0, with corresponding gemspec update.
123
+ * Added an uninstall rake task.
124
+ * Updated the service_stop method in the demo_daemon.rb file, and added some
125
+ additional comments.
126
+ * The test files were renamed.
127
+ * Several tests were updated and refactored to use Test::Unit 2.x. That
128
+ library is now a dependency.
129
+ * The 'uninstall' Rakefile task is now more verbose.
130
+
131
+ == 0.6.1 - 1-Jan-2008
132
+ * The Service.services method now handles the scenario where a particular
133
+ service may still exist, but its underlying registry entry has been deleted.
134
+ In this case, most ServiceInfo struct members are set to nil and a warning
135
+ is issued.
136
+ * RDoc updates.
137
+
138
+ == 0.6.0 - 25-Nov-2007
139
+ * The Service control class is now pure Ruby. The Daemon class is still C,
140
+ however. That may change in the future. This means the windows-pr
141
+ library is now a prerequisite.
142
+ * The Service.new method has been altered in a way that is not backwards
143
+ compatible. It is now the same as Service.create.
144
+ * The Service.start method now properly handles arguments to the
145
+ Daemon#service_main method.
146
+ * The Daemon source code is now separate from the Service control class
147
+ source code. That means you must require them separately, as needed.
148
+ * The Daemon class should be much more responsive to service events now,
149
+ especially service_stop. Many thanks go to Kevin Burge for the patch.
150
+ * Added the Daemon.mainloop method as a shortcut for Daemon.new.mainloop.
151
+ * The Daemon class now redirects STDIN, STDOUT and STDERR to the NUL device
152
+ if they're still associated with a terminal when the service starts. This
153
+ should help prevent Errno::EBADF errors.
154
+ * The Service.services class method now supports the group parameter for
155
+ versions of Ruby built with older compilers, i.e. it will now work with
156
+ the one-click Ruby installer.
157
+ * The Service.getdisplayname method was changed to Service.get_display_name.
158
+ An alias has been provided for backwards compatibility.
159
+ * The Service.getservicename method was changed to Service.get_service_name.
160
+ An alias has been provided for backwards compatibility.
161
+ * Added the Service.config_info method.
162
+ * The Service.create and Service.configure methods now allow you to set
163
+ failure actions, failure commands, and reset/retry periods.
164
+ * Improved test suite.
165
+ * Changed 'tdaemon.rb', 'tdaemon_ctl.rb' and 'service_test.rb' to
166
+ 'demo_daemon.rb', 'demo_daemon_ctl.rb' and 'demo_services.rb', respectively.
167
+ * Some refactoring and updates to the demo daemon and demo daemon controller
168
+ examples.
169
+ * The Win32Service struct is now ServiceInfo.
170
+ * ServiceError is now Service::Error.
171
+ * DaemonError is now Daemon::Error.
172
+ * Some documentation improvements, corrections and updates.
173
+
174
+ == 0.5.2 - 25-Nov-2006
175
+ * Fixed a bug in the Daemon class where the service event handling methods
176
+ (most notably service_stop) did not work properly due to thread blocking
177
+ issues. Many thanks go to Patrick Hurley for the patch.
178
+ * Added the Daemon#running? method as helper method for your service_main
179
+ method.
180
+ * The 'interactive?' struct member is now just 'interactive'. This was
181
+ supposed to have been in the last release but was somehow missed. Sorry.
182
+ * Scrapped the old daemon_test.rb file and split it into two new files -
183
+ tdaemon.rb and tdaemon_ctl.rb. In the process a few bugs were fixed.
184
+ * Added a gemspec.
185
+ * Documentation and test suite updates.
186
+
187
+ == 0.5.1 - 18-Jun-2006
188
+ * Added the Service.open method.
189
+ * The Service.new method now accepts a block, and automatically closes itself
190
+ at the end of the block.
191
+ * Fixed in a bug in the Service.create method where setting dependencies
192
+ was not working properly. Thanks go to Scott Harper for the spot.
193
+ * The 'interactive?' struct member is now just 'interactive' since Ruby no
194
+ longer supports question marks in struct member names. UGH.
195
+ * The block for Service#configure_service is no longer optional.
196
+ * Replaced ClipSrv with W32Time for most of the test methods in tc_service.rb
197
+ because it had a dependency that is disabled on most systems.
198
+ * Added a tweak to the extconf.rb file to help with the test suite.
199
+ * Some documentation updates and corrections.
200
+
201
+ == 0.5.0 - 26-Nov-2005
202
+ * Added a service_init hook, and (internally) altered the way the service
203
+ starts. This was done to deal with services that need to perform any
204
+ initialization in the Daemon itself before the service starts. Previously
205
+ this would result in the service timing out during startup.
206
+
207
+ Thanks go to Jamey Cribbs for spotting the problem.
208
+
209
+ * Modified the Daemon example, adding a service_init hook that does about 10
210
+ seconds worth of initialization before finally starting. See the comments
211
+ in examples\daemon_test.rb for more information.
212
+ * Minor test and README changes.
213
+
214
+ == 0.4.6 - 24-May-2005
215
+ * Fixed an initialization bug that could cause Daemons to fail unless the
216
+ win32-service package was the last package require'd.
217
+ * Altered the Service.start method. It now takes any number of arguments
218
+ (after the service and host name). These arguments are passed to the
219
+ service's Service_Main() function.
220
+ * The Service.services method now returns an Array of ServiceStruct's in
221
+ non-block form.
222
+ * The Service.start, Service.pause, Service.resume, Service.stop and
223
+ Service.delete methods now return the class (self), not 'true'.
224
+ * Added the ability to add or configure the service description in
225
+ Service#create_service or Service#configure, respectively.
226
+ * Fixed a bug in the Service.start method where false positives could result.
227
+ * Updated the ServiceStatus struct to include pid and service_flags on Win2k
228
+ or later.
229
+ * Unicode is now the default setting as far as internal string handling. It
230
+ will still work fine with 'regular' text.
231
+ * Added safe string handling for string input values.
232
+ * Added rdoc comments into the C source.
233
+ * Made the service.txt and daemon.txt files rdoc friendly.
234
+ * Removed the service.rd and daemon.rd files. If you want html documentation,
235
+ run rdoc over the service.txt and daemon.txt files.
236
+ * The dreaded "code cleanup".
237
+
238
+ == 0.4.5 - 28-Feb-2005
239
+ * Fixed an accessor bug in Service#create. Thanks go to Nathaniel Talbott
240
+ for the spot.
241
+ * Eliminated a warning that appeared starting in Ruby 1.8.2 regarding Struct
242
+ redefinitions.
243
+ * Moved 'examples' directory to toplevel directory.
244
+ * Deleted the 'test2.rb' example. This was supplanted by the 'daemon_test.rb'
245
+ script.
246
+ * Renamed the 'test.rb' file to 'services_test.rb'.
247
+ * Made this document rdoc friendly.
248
+
249
+ == 0.4.4 - 27-Aug-2004
250
+ * Modified the Service class to use the newer allocation framework. The
251
+ Daemon class already used this, hence no major version bump.
252
+ * Fixed in a bug in the create_service() method with regards to the
253
+ 'dependencies' option and null arguments (you no longer need to specify
254
+ an empty array).
255
+
256
+ == 0.4.3 - 14-Aug-2004
257
+ * Fixed the Daemon class by adding back the constants it needed in order to
258
+ run. I accidentally broke this when I changed the Daemon class from being
259
+ a subclass of Service to being its own class.
260
+ * Added a separate test suite for the Daemon class, tc_daemon.rb, to help
261
+ me from making that mistake ever again. :)
262
+ * Updated the daemon_test.rb script a bit to report error messages should
263
+ any occur.
264
+ * Minor doc updates
265
+
266
+ == 0.4.2 - 10-Jul-2004
267
+ * The Daemon class is no longer a subclass of Service.
268
+ * Added the 'pid' and 'service_flags' struct members to the Win32Service
269
+ struct. These members are only available to folks using Windows 2000 or
270
+ later and who compile with VC++ 7.0 or later (including the .NET SDK).
271
+ * The Service.services method now accepts a group name as an optional third
272
+ argument. Again, you must be using Windows 2000 or later and compile with
273
+ VC++ 7.0 or later (including the .NET SDK).
274
+ * The deprecated STR2CSTR() functions were replaced with StringValuePtr().
275
+ This also means that as of this version, win32-service requires Ruby
276
+ 1.8.0 or greater.
277
+ * Moved the sample programs to doc/examples
278
+ * Removed the .html files under /doc. You can generate that on your own if
279
+ you like.
280
+
281
+ == 0.4.1 - 14-Mar-2004
282
+ * Added the exists? class method and corresponding test suite additions.
283
+ * Pushed the ServiceError and DaemonError classes under the Win32 module.
284
+ * Normalized tc_service.rb so that it can be run outside of the test directory
285
+ more easily.
286
+
287
+ == 0.4.0 - 9-Feb-2004
288
+ * Changed "worker" method to "service_main" method.
289
+ * Added event hooks for stop, pause, resume, etc. See the documentation for
290
+ further details. (Thanks Park Heesob)
291
+ * Some of the Daemon functions were raising ServiceError. They have been
292
+ changed to DaemonError.
293
+ * Updated the daemon_test.rb file to use the new event hooks.
294
+ * Documentation additions and updates.
295
+
296
+ == 0.3.0 - 31-Jan-2004
297
+ * Added a Daemon subclass. This allows you to run Ruby programs as a service.
298
+ Please see the documentation for more details. (Thanks Park Heesob). This
299
+ should be considered an ALPHA release.
300
+ * The Win32ServiceError class has been renamed to just ServiceError. I felt
301
+ the "Win32" was redundant, given that it's already under the Win32 module.
302
+ * In some cases a bogus error description was being returned because the
303
+ GetLastError() function was being called too late. This has been fixed.
304
+ (Thanks Park Heesob).
305
+ * The explicit garbage collection has been removed because what I thought was
306
+ a memory leak was not, in fact, a memory leak. In addition, it was hurting
307
+ performance badly.
308
+ * The "\r\n" is now automatically stripped from error messages. This was
309
+ causing slightly garbled error messages. (Thanks Park Heesob).
310
+ * Added explicit closing of the Service Control Manager handle in the
311
+ services() function for those rare cases where it may fail while reading
312
+ service information.
313
+ * Made some of the error strings a bit more descriptive.
314
+ * Test suite and documentation additions, including a sample daemon program
315
+ in the test directory called "daemon_test.rb".
316
+
317
+ == 0.2.2 - 15-Jan-2004
318
+ * Fixed a mistake in the service_init declaration within Init_service().
319
+ * Fixed bug in the service_init function with regards to desired access.
320
+ * Modified service_free() function to explicitly set the hSCManager handle
321
+ to NULL and modified the service_close() method to test hSCManager handle
322
+ for NULL value. This should eliminate accidentally trying to close an
323
+ already closed handle, which may have happened as the result of a free()
324
+ call. (Thanks Park Heesob).
325
+ * Added explicit garbage collection in Service.services() method.
326
+ * More explicit about closing open HANDLE's when error conditions arise.
327
+
328
+ == 0.2.1 - 2-Nov-2003
329
+ * Made the exported less redundant and less verbose, e.g.
330
+ Service::SERVICE_DISABLED is now just Service::DISABLED. The same is true
331
+ for the service control constants, i.e. the 'SC_' has been removed.
332
+ * Corresponding test suite changes.
333
+
334
+ == 0.2.0 - 16-Oct-2003
335
+ * The constructor has been changed. It now only takes a machine name and a
336
+ desired access for arguments. The keyword arguments are now part of the
337
+ create_service method() and only in block form. See the documentation for
338
+ more details.
339
+ * Added a configure_service() and close() instance methods.
340
+ * Added several new constants to allow finer control over created and
341
+ configured services.
342
+ * Added Win32ServiceError as an exception. All failures now raise this
343
+ error instead of a vanilla StandardError.
344
+ * Moved some common code into the service.h file.
345
+
346
+ == 0.1.0 - 10-Oct-2003
347
+ - Initial release