win32-service 0.7.0-x86-mswin32-60 → 0.7.1-x86-mswin32-60

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,111 +1,113 @@
1
- ########################################################################
2
- # tc_service_status.rb
3
- #
4
- # Test case for the Struct::ServiceStatus struct.
5
- ########################################################################
6
- require 'rubygems'
7
- gem 'test-unit'
8
-
9
- require 'win32/service'
10
- require 'test/unit'
11
-
12
- class TC_Struct_ServiceStatus < Test::Unit::TestCase
13
- def setup
14
- @service_name = 'Schedule'
15
- @service_stat = Win32::Service.status(@service_name)
16
-
17
- @types = [
18
- 'file system driver',
19
- 'kernel driver',
20
- 'own process',
21
- 'share process',
22
- 'recognizer token',
23
- 'driver',
24
- 'win32',
25
- 'all',
26
- 'own process, interactive',
27
- 'share process, interactive',
28
- nil
29
- ]
30
-
31
- @states = [
32
- 'continue pending',
33
- 'pause pending',
34
- 'paused',
35
- 'running',
36
- 'start pending',
37
- 'stop pending',
38
- 'stopped',
39
- nil
40
- ]
41
-
42
- @controls = [
43
- 'netbind change',
44
- 'param change',
45
- 'pause continue',
46
- 'shutdown',
47
- 'stop',
48
- 'hardware profile change',
49
- 'power event',
50
- 'session change',
51
- nil
52
- ]
53
- end
54
-
55
- def test_service_status_service_type
56
- assert_respond_to(@service_stat, :service_type)
57
- assert(@types.include?(@service_stat.service_type))
58
- end
59
-
60
- def test_service_status_current_state
61
- assert_respond_to(@service_stat, :current_state)
62
- assert(@states.include?(@service_stat.current_state))
63
- end
64
-
65
- def test_service_status_controls_accepted
66
- assert_respond_to(@service_stat, :controls_accepted)
67
- assert(@controls.include?(@service_stat.controls_accepted))
68
- end
69
-
70
- def test_service_status_win32_exit_code
71
- assert_respond_to(@service_stat, :win32_exit_code)
72
- assert_kind_of(Fixnum, @service_stat.win32_exit_code)
73
- end
74
-
75
- def test_service_status_service_specific_exit_code
76
- assert_respond_to(@service_stat, :service_specific_exit_code)
77
- assert_kind_of(Fixnum, @service_stat.service_specific_exit_code)
78
- end
79
-
80
- def test_service_status_check_point
81
- assert_respond_to(@service_stat, :check_point)
82
- assert_kind_of(Fixnum, @service_stat.check_point)
83
- end
84
-
85
- def test_service_status_wait_hint
86
- assert_respond_to(@service_stat, :wait_hint)
87
- assert_kind_of(Fixnum, @service_stat.wait_hint)
88
- end
89
-
90
- def test_service_status_interactive
91
- assert_respond_to(@service_stat, :interactive)
92
- assert([true, false].include?(@service_stat.interactive))
93
- end
94
-
95
- def test_service_status_pid
96
- assert_respond_to(@service_stat, :pid)
97
- assert_kind_of(Fixnum, @service_stat.pid)
98
- end
99
-
100
- def test_service_status_service_flags
101
- assert_respond_to(@service_stat, :service_flags)
102
- assert_kind_of(Fixnum, @service_stat.service_flags)
103
- end
104
-
105
- def teardown
106
- @service_stat = nil
107
- @types = nil
108
- @states = nil
109
- @controls = nil
110
- end
111
- end
1
+ ########################################################################
2
+ # test_win32_service_status.rb
3
+ #
4
+ # Test case for the Struct::ServiceStatus struct.
5
+ ########################################################################
6
+ require 'rubygems'
7
+ gem 'test-unit'
8
+
9
+ require 'win32/service'
10
+ require 'test/unit'
11
+
12
+ class TC_Win32_ServiceStatus_Struct < Test::Unit::TestCase
13
+ def setup
14
+ @service_name = 'Schedule'
15
+ @service_stat = Win32::Service.status(@service_name)
16
+
17
+ @types = [
18
+ 'file system driver',
19
+ 'kernel driver',
20
+ 'own process',
21
+ 'share process',
22
+ 'recognizer token',
23
+ 'driver',
24
+ 'win32',
25
+ 'all',
26
+ 'own process, interactive',
27
+ 'share process, interactive',
28
+ nil
29
+ ]
30
+
31
+ @states = [
32
+ 'continue pending',
33
+ 'pause pending',
34
+ 'paused',
35
+ 'running',
36
+ 'start pending',
37
+ 'stop pending',
38
+ 'stopped',
39
+ nil
40
+ ]
41
+
42
+ @controls = [
43
+ 'netbind change',
44
+ 'param change',
45
+ 'pause continue',
46
+ 'shutdown',
47
+ 'stop',
48
+ 'hardware profile change',
49
+ 'power event',
50
+ 'session change'
51
+ ]
52
+ end
53
+
54
+ def test_service_status_service_type
55
+ assert_respond_to(@service_stat, :service_type)
56
+ assert(@types.include?(@service_stat.service_type))
57
+ end
58
+
59
+ def test_service_status_current_state
60
+ assert_respond_to(@service_stat, :current_state)
61
+ assert(@states.include?(@service_stat.current_state))
62
+ end
63
+
64
+ def test_service_status_controls_accepted
65
+ assert_respond_to(@service_stat, :controls_accepted)
66
+ assert_kind_of(Array, @service_stat.controls_accepted)
67
+ @service_stat.controls_accepted.each{ |control|
68
+ assert_true(@controls.include?(control))
69
+ }
70
+ end
71
+
72
+ def test_service_status_win32_exit_code
73
+ assert_respond_to(@service_stat, :win32_exit_code)
74
+ assert_kind_of(Fixnum, @service_stat.win32_exit_code)
75
+ end
76
+
77
+ def test_service_status_service_specific_exit_code
78
+ assert_respond_to(@service_stat, :service_specific_exit_code)
79
+ assert_kind_of(Fixnum, @service_stat.service_specific_exit_code)
80
+ end
81
+
82
+ def test_service_status_check_point
83
+ assert_respond_to(@service_stat, :check_point)
84
+ assert_kind_of(Fixnum, @service_stat.check_point)
85
+ end
86
+
87
+ def test_service_status_wait_hint
88
+ assert_respond_to(@service_stat, :wait_hint)
89
+ assert_kind_of(Fixnum, @service_stat.wait_hint)
90
+ end
91
+
92
+ def test_service_status_interactive
93
+ assert_respond_to(@service_stat, :interactive)
94
+ assert([true, false].include?(@service_stat.interactive))
95
+ end
96
+
97
+ def test_service_status_pid
98
+ assert_respond_to(@service_stat, :pid)
99
+ assert_kind_of(Fixnum, @service_stat.pid)
100
+ end
101
+
102
+ def test_service_status_service_flags
103
+ assert_respond_to(@service_stat, :service_flags)
104
+ assert_kind_of(Fixnum, @service_stat.service_flags)
105
+ end
106
+
107
+ def teardown
108
+ @service_stat = nil
109
+ @types = nil
110
+ @states = nil
111
+ @controls = nil
112
+ end
113
+ end
@@ -1,49 +1,41 @@
1
- require 'rubygems'
2
-
3
- spec = Gem::Specification.new do |gem|
4
- gem.name = 'win32-service'
5
- gem.version = '0.7.0'
6
- gem.authors = ['Daniel J. Berger', 'Park Heesob']
7
- gem.email = 'djberg96@gmail.com'
8
- gem.license = 'Artistic 2.0'
9
- gem.homepage = 'http://www.rubyforge.org/projects/win32utils'
10
- gem.platform = Gem::Platform::RUBY
11
- gem.summary = 'An interface for MS Windows services'
12
- gem.test_files = Dir['test/test*.rb']
13
- gem.has_rdoc = true
14
- gem.extensions = ['ext/extconf.rb']
15
-
16
- # Don't include daemon.rb for now
17
- gem.files = Dir['**/*'].delete_if{ |f|
18
- f.include?('CVS') || f.include?('daemon.rb')
19
- }
20
-
21
- gem.extra_rdoc_files = [
22
- 'CHANGES',
23
- 'README',
24
- 'MANIFEST',
25
- 'doc/service.txt',
26
- 'doc/daemon.txt',
27
- 'ext/win32/daemon.c'
28
- ]
29
-
30
- gem.rubyforge_project = 'win32utils'
31
- gem.required_ruby_version = '>= 1.8.2'
32
-
33
- gem.add_dependency('windows-pr', '>= 1.0.5')
34
- gem.add_dependency('test-unit', '>= 2.0.2')
35
-
36
- gem.description = <<-EOF
37
- The win32-service library provides a Ruby interface to services on
38
- MS Windows. You can create new services, or control, configure and
39
- inspect existing services.
40
-
41
- In addition, you can create a pure Ruby service by using the Daemon
42
- class that is included as part of the library.
43
- EOF
44
- end
45
-
46
- if $PROGRAM_NAME == __FILE__
47
- Gem.manage_gems if Gem::RubyGemsVersion.to_f < 1.0
48
- Gem::Builder.new(spec).build
49
- end
1
+ require 'rubygems'
2
+
3
+ Gem::Specification.new do |spec|
4
+ spec.name = 'win32-service'
5
+ spec.version = '0.7.1'
6
+ spec.authors = ['Daniel J. Berger', 'Park Heesob']
7
+ spec.license = 'Artistic 2.0'
8
+ spec.email = 'djberg96@gmail.com'
9
+ spec.homepage = 'http://www.rubyforge.org/projects/win32utils'
10
+ spec.platform = Gem::Platform::RUBY
11
+ spec.summary = 'An interface for MS Windows services'
12
+ spec.test_files = Dir['test/test*.rb']
13
+ spec.has_rdoc = true
14
+ spec.extensions = ['ext/extconf.rb']
15
+
16
+ spec.files = Dir['**/*'].reject{ |f| f.include?('git') }
17
+
18
+ spec.extra_rdoc_files = [
19
+ 'CHANGES',
20
+ 'README',
21
+ 'MANIFEST',
22
+ 'doc/service.txt',
23
+ 'doc/daemon.txt',
24
+ 'ext/win32/daemon.c'
25
+ ]
26
+
27
+ spec.rubyforge_project = 'win32utils'
28
+ spec.required_ruby_version = '>= 1.8.2'
29
+
30
+ spec.add_dependency('windows-pr', '>= 1.0.8')
31
+ spec.add_development_dependency('test-unit', '>= 2.0.2')
32
+
33
+ spec.description = <<-EOF
34
+ The win32-service library provides a Ruby interface to services on
35
+ MS Windows. You can create new services, or control, configure and
36
+ inspect existing services.
37
+
38
+ In addition, you can create a pure Ruby service by using the Daemon
39
+ class that is included as part of the library.
40
+ EOF
41
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: win32-service
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: x86-mswin32-60
6
6
  authors:
7
7
  - Daniel J. Berger
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-06-30 00:00:00 -06:00
13
+ date: 2010-02-09 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -21,11 +21,11 @@ dependencies:
21
21
  requirements:
22
22
  - - ">="
23
23
  - !ruby/object:Gem::Version
24
- version: 1.0.5
24
+ version: 1.0.8
25
25
  version:
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: test-unit
28
- type: :runtime
28
+ type: :development
29
29
  version_requirement:
30
30
  version_requirements: !ruby/object:Gem::Requirement
31
31
  requirements:
@@ -33,7 +33,7 @@ dependencies:
33
33
  - !ruby/object:Gem::Version
34
34
  version: 2.0.2
35
35
  version:
36
- description: " The win32-service library provides a Ruby interface to services on\n MS Windows. You can create new services, or control, configure and\n inspect existing services.\n\n In addition, you can create a pure Ruby service by using the Daemon\n class that is included as part of the library.\n"
36
+ description: " The win32-service library provides a Ruby interface to services on\n MS Windows. You can create new services, or control, configure and\n inspect existing services.\n\n In addition, you can create a pure Ruby service by using the Daemon\n class that is included as part of the library.\n"
37
37
  email: djberg96@gmail.com
38
38
  executables: []
39
39
 
@@ -90,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
90
90
  requirements: []
91
91
 
92
92
  rubyforge_project: win32utils
93
- rubygems_version: 1.3.4
93
+ rubygems_version: 1.3.5
94
94
  signing_key:
95
95
  specification_version: 3
96
96
  summary: An interface for MS Windows services