windows-pr 1.1.3 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. data/CHANGES +15 -0
  2. data/MANIFEST +65 -65
  3. data/README +149 -149
  4. data/Rakefile +37 -52
  5. data/doc/conversion_guide.txt +37 -37
  6. data/lib/windows/clipboard.rb +2 -0
  7. data/lib/windows/com.rb +2 -0
  8. data/lib/windows/com/accessibility.rb +12 -10
  9. data/lib/windows/com/automation.rb +149 -147
  10. data/lib/windows/com/variant.rb +24 -22
  11. data/lib/windows/console.rb +114 -112
  12. data/lib/windows/debug.rb +35 -33
  13. data/lib/windows/device_io.rb +248 -246
  14. data/lib/windows/directory.rb +2 -0
  15. data/lib/windows/error.rb +2 -0
  16. data/lib/windows/eventlog.rb +2 -0
  17. data/lib/windows/file.rb +264 -262
  18. data/lib/windows/file_mapping.rb +25 -23
  19. data/lib/windows/filesystem.rb +2 -0
  20. data/lib/windows/gdi/bitmap.rb +65 -63
  21. data/lib/windows/gdi/device_context.rb +46 -44
  22. data/lib/windows/gdi/metafile.rb +40 -38
  23. data/lib/windows/gdi/painting_drawing.rb +115 -113
  24. data/lib/windows/handle.rb +2 -0
  25. data/lib/windows/library.rb +2 -0
  26. data/lib/windows/limits.rb +34 -31
  27. data/lib/windows/mailslot.rb +2 -0
  28. data/lib/windows/memory.rb +2 -0
  29. data/lib/windows/msvcrt/buffer.rb +75 -73
  30. data/lib/windows/msvcrt/directory.rb +31 -29
  31. data/lib/windows/msvcrt/file.rb +47 -45
  32. data/lib/windows/msvcrt/io.rb +62 -60
  33. data/lib/windows/msvcrt/string.rb +2 -0
  34. data/lib/windows/msvcrt/time.rb +169 -167
  35. data/lib/windows/national.rb +580 -578
  36. data/lib/windows/network/management.rb +525 -523
  37. data/lib/windows/network/snmp.rb +92 -90
  38. data/lib/windows/network/winsock.rb +128 -126
  39. data/lib/windows/nio.rb +2 -0
  40. data/lib/windows/ntfs/winternl.rb +96 -82
  41. data/lib/windows/path.rb +143 -141
  42. data/lib/windows/pipe.rb +42 -40
  43. data/lib/windows/process.rb +2 -0
  44. data/lib/windows/registry.rb +171 -126
  45. data/lib/windows/security.rb +479 -477
  46. data/lib/windows/security/authentication.rb +32 -30
  47. data/lib/windows/service.rb +142 -140
  48. data/lib/windows/shell.rb +171 -169
  49. data/lib/windows/socket.rb +86 -0
  50. data/lib/windows/sound.rb +39 -37
  51. data/lib/windows/synchronize.rb +133 -131
  52. data/lib/windows/system_info.rb +4 -2
  53. data/lib/windows/thread.rb +2 -0
  54. data/lib/windows/time.rb +48 -46
  55. data/lib/windows/tool_helper.rb +36 -34
  56. data/lib/windows/unicode.rb +2 -0
  57. data/lib/windows/volume.rb +61 -59
  58. data/lib/windows/window.rb +81 -79
  59. data/lib/windows/window/classes.rb +59 -57
  60. data/lib/windows/window/dialog.rb +91 -89
  61. data/lib/windows/window/menu.rb +102 -100
  62. data/lib/windows/window/message.rb +297 -295
  63. data/lib/windows/window/properties.rb +20 -18
  64. data/lib/windows/window/timer.rb +19 -17
  65. data/lib/windows/wsa.rb +102 -0
  66. data/test/tc_clipboard.rb +41 -41
  67. data/test/tc_com.rb +32 -32
  68. data/test/tc_com_automation.rb +15 -15
  69. data/test/tc_console.rb +108 -108
  70. data/test/tc_debug.rb +48 -48
  71. data/test/tc_device_io.rb +29 -29
  72. data/test/tc_directory.rb +25 -25
  73. data/test/tc_error.rb +38 -50
  74. data/test/tc_eventlog.rb +58 -58
  75. data/test/tc_file.rb +67 -67
  76. data/test/tc_file_mapping.rb +38 -38
  77. data/test/tc_filesystem.rb +27 -27
  78. data/test/tc_gdi_bitmap.rb +25 -25
  79. data/test/tc_gdi_metafile.rb +23 -23
  80. data/test/tc_handle.rb +36 -36
  81. data/test/tc_library.rb +37 -37
  82. data/test/tc_limits.rb +34 -34
  83. data/test/tc_mailslot.rb +22 -22
  84. data/test/tc_memory.rb +44 -44
  85. data/test/tc_msvcrt_buffer.rb +59 -68
  86. data/test/tc_msvcrt_directory.rb +96 -98
  87. data/test/tc_msvcrt_file.rb +80 -80
  88. data/test/tc_msvcrt_io.rb +48 -48
  89. data/test/tc_msvcrt_string.rb +94 -93
  90. data/test/tc_msvcrt_time.rb +19 -29
  91. data/test/tc_national.rb +38 -38
  92. data/test/tc_network_management.rb +32 -32
  93. data/test/tc_network_snmp.rb +31 -31
  94. data/test/tc_network_winsock.rb +34 -34
  95. data/test/tc_nio.rb +32 -32
  96. data/test/tc_ntfs_winternl.rb +33 -18
  97. data/test/tc_path.rb +90 -90
  98. data/test/tc_pipe.rb +53 -53
  99. data/test/tc_process.rb +24 -24
  100. data/test/tc_registry.rb +29 -29
  101. data/test/tc_security.rb +104 -104
  102. data/test/tc_security_authentication.rb +34 -34
  103. data/test/tc_service.rb +57 -57
  104. data/test/tc_shell.rb +34 -34
  105. data/test/tc_socket.rb +20 -0
  106. data/test/tc_sound.rb +37 -37
  107. data/test/tc_synchronize.rb +75 -75
  108. data/test/tc_system_info.rb +33 -43
  109. data/test/tc_thread.rb +29 -29
  110. data/test/tc_time.rb +32 -32
  111. data/test/tc_tool_helper.rb +29 -29
  112. data/test/tc_unicode.rb +62 -62
  113. data/test/tc_volume.rb +47 -47
  114. data/test/tc_window.rb +45 -45
  115. data/test/tc_window_classes.rb +33 -33
  116. data/test/tc_window_dialog.rb +33 -33
  117. data/test/tc_window_menu.rb +29 -29
  118. data/test/tc_window_message.rb +33 -33
  119. data/test/tc_window_properties.rb +29 -29
  120. data/test/tc_window_timer.rb +29 -29
  121. data/test/tc_wsa.rb +19 -0
  122. data/windows-pr.gemspec +1 -1
  123. metadata +13 -7
@@ -1,33 +1,33 @@
1
- #####################################################################
2
- # tc_window_classes.rb
3
- #
4
- # Test case for the Windows::Window::Classes module.
5
- #####################################################################
6
- require 'windows/window/classes'
7
- require 'test/unit'
8
-
9
- class WindowClassesFoo
10
- include Windows::Window::Classes
11
- end
12
-
13
- class TC_Windows_Window_Classes < Test::Unit::TestCase
14
- def setup
15
- @foo = WindowClassesFoo.new
16
- end
17
-
18
- def test_numeric_constants
19
- assert_equal(-8, WindowClassesFoo::GCL_MENUNAME)
20
- end
21
-
22
- def test_method_constants
23
- assert_not_nil(WindowClassesFoo::GetClassInfo)
24
- end
25
-
26
- def test_method_mixin
27
- assert_respond_to(@foo, :GetClassInfo)
28
- end
29
-
30
- def teardown
31
- @foo = nil
32
- end
33
- end
1
+ #####################################################################
2
+ # tc_window_classes.rb
3
+ #
4
+ # Test case for the Windows::Window::Classes module.
5
+ #####################################################################
6
+ require 'windows/window/classes'
7
+ require 'test/unit'
8
+
9
+ class WindowClassesFoo
10
+ include Windows::Window::Classes
11
+ end
12
+
13
+ class TC_Windows_Window_Classes < Test::Unit::TestCase
14
+ def setup
15
+ @foo = WindowClassesFoo.new
16
+ end
17
+
18
+ def test_numeric_constants
19
+ assert_equal(-8, WindowClassesFoo::GCL_MENUNAME)
20
+ end
21
+
22
+ def test_method_constants
23
+ assert_not_nil(WindowClassesFoo::GetClassInfo)
24
+ end
25
+
26
+ def test_method_mixin
27
+ assert_respond_to(@foo, :GetClassInfo)
28
+ end
29
+
30
+ def teardown
31
+ @foo = nil
32
+ end
33
+ end
@@ -1,33 +1,33 @@
1
- #####################################################################
2
- # tc_window_dialog.rb
3
- #
4
- # Test case for the Windows::Window::Dialog module.
5
- #####################################################################
6
- require 'windows/window/dialog'
7
- require 'test/unit'
8
-
9
- class WindowDialogFoo
10
- include Windows::Window::Dialog
11
- end
12
-
13
- class TC_Windows_Window_Dialog < Test::Unit::TestCase
14
- def setup
15
- @foo = WindowDialogFoo.new
16
- end
17
-
18
- def test_numeric_constants
19
- assert_equal(0, WindowDialogFoo::MB_OK)
20
- end
21
-
22
- def test_method_constants
23
- assert_not_nil(WindowDialogFoo::MessageBox)
24
- end
25
-
26
- def test_method_mixin
27
- assert_respond_to(@foo, :MessageBox)
28
- end
29
-
30
- def teardown
31
- @foo = nil
32
- end
33
- end
1
+ #####################################################################
2
+ # tc_window_dialog.rb
3
+ #
4
+ # Test case for the Windows::Window::Dialog module.
5
+ #####################################################################
6
+ require 'windows/window/dialog'
7
+ require 'test/unit'
8
+
9
+ class WindowDialogFoo
10
+ include Windows::Window::Dialog
11
+ end
12
+
13
+ class TC_Windows_Window_Dialog < Test::Unit::TestCase
14
+ def setup
15
+ @foo = WindowDialogFoo.new
16
+ end
17
+
18
+ def test_numeric_constants
19
+ assert_equal(0, WindowDialogFoo::MB_OK)
20
+ end
21
+
22
+ def test_method_constants
23
+ assert_not_nil(WindowDialogFoo::MessageBox)
24
+ end
25
+
26
+ def test_method_mixin
27
+ assert_respond_to(@foo, :MessageBox)
28
+ end
29
+
30
+ def teardown
31
+ @foo = nil
32
+ end
33
+ end
@@ -1,29 +1,29 @@
1
- #####################################################################
2
- # tc_window_menu.rb
3
- #
4
- # Test case for the Windows::Window::Menu module.
5
- #####################################################################
6
- require 'windows/window/menu'
7
- require 'test/unit'
8
-
9
- class WindowMenuFoo
10
- include Windows::Window::Menu
11
- end
12
-
13
- class TC_Windows_Window_Menu < Test::Unit::TestCase
14
- def setup
15
- @foo = WindowMenuFoo.new
16
- end
17
-
18
- def test_numeric_constants
19
- assert_equal(0, WindowMenuFoo::MF_INSERT)
20
- end
21
-
22
- def test_method_constants
23
- assert_not_nil(WindowMenuFoo::AppendMenu)
24
- end
25
-
26
- def teardown
27
- @foo = nil
28
- end
29
- end
1
+ #####################################################################
2
+ # tc_window_menu.rb
3
+ #
4
+ # Test case for the Windows::Window::Menu module.
5
+ #####################################################################
6
+ require 'windows/window/menu'
7
+ require 'test/unit'
8
+
9
+ class WindowMenuFoo
10
+ include Windows::Window::Menu
11
+ end
12
+
13
+ class TC_Windows_Window_Menu < Test::Unit::TestCase
14
+ def setup
15
+ @foo = WindowMenuFoo.new
16
+ end
17
+
18
+ def test_numeric_constants
19
+ assert_equal(0, WindowMenuFoo::MF_INSERT)
20
+ end
21
+
22
+ def test_method_constants
23
+ assert_not_nil(WindowMenuFoo::AppendMenu)
24
+ end
25
+
26
+ def teardown
27
+ @foo = nil
28
+ end
29
+ end
@@ -1,33 +1,33 @@
1
- #####################################################################
2
- # tc_window_message.rb
3
- #
4
- # Test case for the Windows::Window::Message module.
5
- #####################################################################
6
- require 'windows/window/message'
7
- require 'test/unit'
8
-
9
- class WindowMessageFoo
10
- include Windows::Window::Message
11
- end
12
-
13
- class TC_Windows_Window_Message < Test::Unit::TestCase
14
- def setup
15
- @foo = WindowMessageFoo.new
16
- end
17
-
18
- def test_numeric_constants
19
- assert_equal(5, WindowMessageFoo::WM_SIZE)
20
- end
21
-
22
- def test_method_constants
23
- assert_not_nil(WindowMessageFoo::PostMessage)
24
- end
25
-
26
- def test_method_mixin
27
- assert_respond_to(@foo, :PostMessage)
28
- end
29
-
30
- def teardown
31
- @foo = nil
32
- end
33
- end
1
+ #####################################################################
2
+ # tc_window_message.rb
3
+ #
4
+ # Test case for the Windows::Window::Message module.
5
+ #####################################################################
6
+ require 'windows/window/message'
7
+ require 'test/unit'
8
+
9
+ class WindowMessageFoo
10
+ include Windows::Window::Message
11
+ end
12
+
13
+ class TC_Windows_Window_Message < Test::Unit::TestCase
14
+ def setup
15
+ @foo = WindowMessageFoo.new
16
+ end
17
+
18
+ def test_numeric_constants
19
+ assert_equal(5, WindowMessageFoo::WM_SIZE)
20
+ end
21
+
22
+ def test_method_constants
23
+ assert_not_nil(WindowMessageFoo::PostMessage)
24
+ end
25
+
26
+ def test_method_mixin
27
+ assert_respond_to(@foo, :PostMessage)
28
+ end
29
+
30
+ def teardown
31
+ @foo = nil
32
+ end
33
+ end
@@ -1,29 +1,29 @@
1
- #####################################################################
2
- # tc_window_properties.rb
3
- #
4
- # Test case for the Windows::Window::Properties module.
5
- #####################################################################
6
- require 'windows/window/properties'
7
- require 'test/unit'
8
-
9
- class WindowPropertiesFoo
10
- include Windows::Window::Properties
11
- end
12
-
13
- class TC_Windows_Window_Properties < Test::Unit::TestCase
14
- def setup
15
- @foo = WindowPropertiesFoo.new
16
- end
17
-
18
- def test_method_constants
19
- assert_not_nil(WindowPropertiesFoo::EnumProps)
20
- end
21
-
22
- def test_method_mixin
23
- assert_respond_to(@foo, :EnumProps)
24
- end
25
-
26
- def teardown
27
- @foo = nil
28
- end
29
- end
1
+ #####################################################################
2
+ # tc_window_properties.rb
3
+ #
4
+ # Test case for the Windows::Window::Properties module.
5
+ #####################################################################
6
+ require 'windows/window/properties'
7
+ require 'test/unit'
8
+
9
+ class WindowPropertiesFoo
10
+ include Windows::Window::Properties
11
+ end
12
+
13
+ class TC_Windows_Window_Properties < Test::Unit::TestCase
14
+ def setup
15
+ @foo = WindowPropertiesFoo.new
16
+ end
17
+
18
+ def test_method_constants
19
+ assert_not_nil(WindowPropertiesFoo::EnumProps)
20
+ end
21
+
22
+ def test_method_mixin
23
+ assert_respond_to(@foo, :EnumProps)
24
+ end
25
+
26
+ def teardown
27
+ @foo = nil
28
+ end
29
+ end
@@ -1,29 +1,29 @@
1
- #####################################################################
2
- # tc_window_timer.rb
3
- #
4
- # Test case for the Windows::Window::Timer module.
5
- #####################################################################
6
- require 'windows/window/timer'
7
- require 'test/unit'
8
-
9
- class WindowTimerFoo
10
- include Windows::Window::Timer
11
- end
12
-
13
- class TC_Windows_Window_Timer < Test::Unit::TestCase
14
- def setup
15
- @foo = WindowTimerFoo.new
16
- end
17
-
18
- def test_method_constants
19
- assert_not_nil(WindowTimerFoo::KillTimer)
20
- end
21
-
22
- def test_method_mixin
23
- assert_respond_to(@foo, :KillTimer)
24
- end
25
-
26
- def teardown
27
- @foo = nil
28
- end
29
- end
1
+ #####################################################################
2
+ # tc_window_timer.rb
3
+ #
4
+ # Test case for the Windows::Window::Timer module.
5
+ #####################################################################
6
+ require 'windows/window/timer'
7
+ require 'test/unit'
8
+
9
+ class WindowTimerFoo
10
+ include Windows::Window::Timer
11
+ end
12
+
13
+ class TC_Windows_Window_Timer < Test::Unit::TestCase
14
+ def setup
15
+ @foo = WindowTimerFoo.new
16
+ end
17
+
18
+ def test_method_constants
19
+ assert_not_nil(WindowTimerFoo::KillTimer)
20
+ end
21
+
22
+ def test_method_mixin
23
+ assert_respond_to(@foo, :KillTimer)
24
+ end
25
+
26
+ def teardown
27
+ @foo = nil
28
+ end
29
+ end
data/test/tc_wsa.rb ADDED
@@ -0,0 +1,19 @@
1
+ #####################################################################
2
+ # tc_wsa.rb
3
+ #
4
+ # Test case for the Windows::WSA module.
5
+ #####################################################################
6
+ require 'windows/wsa'
7
+ require 'test/unit'
8
+
9
+ class TC_Windows_WSA < Test::Unit::TestCase
10
+ include Windows::WSA
11
+
12
+ def test_methods
13
+ assert_respond_to(self, :WSAAccept)
14
+ end
15
+
16
+ def test_constants
17
+ assert_equal(1, WSA_FLAG_OVERLAPPED)
18
+ end
19
+ end
data/windows-pr.gemspec CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'windows-pr'
5
- spec.version = '1.1.3'
5
+ spec.version = '1.2.0'
6
6
  spec.license = 'Artistic 2.0'
7
7
  spec.authors = ['Daniel J. Berger', 'Park Heesob']
8
8
  spec.email = 'djberg96@gmail.com'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: windows-pr
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
5
- prerelease: false
4
+ hash: 31
5
+ prerelease:
6
6
  segments:
7
7
  - 1
8
- - 1
9
- - 3
10
- version: 1.1.3
8
+ - 2
9
+ - 0
10
+ version: 1.2.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Daniel J. Berger
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-01-20 00:00:00 -07:00
19
+ date: 2011-03-24 00:00:00 -06:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -108,6 +108,7 @@ files:
108
108
  - lib/windows/security.rb
109
109
  - lib/windows/service.rb
110
110
  - lib/windows/shell.rb
111
+ - lib/windows/socket.rb
111
112
  - lib/windows/sound.rb
112
113
  - lib/windows/synchronize.rb
113
114
  - lib/windows/system_info.rb
@@ -123,6 +124,7 @@ files:
123
124
  - lib/windows/window/properties.rb
124
125
  - lib/windows/window/timer.rb
125
126
  - lib/windows/window.rb
127
+ - lib/windows/wsa.rb
126
128
  - MANIFEST
127
129
  - Rakefile
128
130
  - README
@@ -165,6 +167,7 @@ files:
165
167
  - test/tc_security_authentication.rb
166
168
  - test/tc_service.rb
167
169
  - test/tc_shell.rb
170
+ - test/tc_socket.rb
168
171
  - test/tc_sound.rb
169
172
  - test/tc_synchronize.rb
170
173
  - test/tc_system_info.rb
@@ -180,6 +183,7 @@ files:
180
183
  - test/tc_window_message.rb
181
184
  - test/tc_window_properties.rb
182
185
  - test/tc_window_timer.rb
186
+ - test/tc_wsa.rb
183
187
  - windows-pr.gemspec
184
188
  has_rdoc: true
185
189
  homepage: http://www.rubyforge.org/projects/win32utils
@@ -211,7 +215,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
211
215
  requirements: []
212
216
 
213
217
  rubyforge_project: win32utils
214
- rubygems_version: 1.3.7
218
+ rubygems_version: 1.4.2
215
219
  signing_key:
216
220
  specification_version: 3
217
221
  summary: Windows functions and constants bundled via Win32::API
@@ -255,6 +259,7 @@ test_files:
255
259
  - test/tc_security_authentication.rb
256
260
  - test/tc_service.rb
257
261
  - test/tc_shell.rb
262
+ - test/tc_socket.rb
258
263
  - test/tc_sound.rb
259
264
  - test/tc_synchronize.rb
260
265
  - test/tc_system_info.rb
@@ -270,3 +275,4 @@ test_files:
270
275
  - test/tc_window_message.rb
271
276
  - test/tc_window_properties.rb
272
277
  - test/tc_window_timer.rb
278
+ - test/tc_wsa.rb