win32-ipc 0.6.6 → 0.7.0
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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +2 -4
- data/CHANGES +96 -93
- data/MANIFEST +8 -7
- data/README +32 -33
- data/Rakefile +28 -28
- data/certs/djberg96_pub.pem +21 -21
- data/lib/win32/ipc.rb +185 -185
- data/test/test_win32_ipc.rb +88 -88
- data/win32-ipc.gemspec +25 -25
- metadata +12 -8
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4854bf6c5523a5a3bcb3c35785e0448d36803329
|
4
|
+
data.tar.gz: 1e6631654eb37738ea553f54c5f3146d91604bfa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ccd55f35361002d9a659c50efe71b1b4c3727071cfa7ea0b2d8c6402add2d6f2de820aa5eb0ed9cea3ab0fed0cf4b198f6a36df4f598195f1d51bf5f26a9e308
|
7
|
+
data.tar.gz: 15a5278aea868b69aaab99924d60a6c2abbd45b1d05c97de294cb67fddc6d2474364f4c94b264c71f01c286373485702a77c469f5b8bcce1e9e3f910aaa9f8ed
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
@@ -1,4 +1,2 @@
|
|
1
|
-
|
2
|
-
�
|
3
|
-
���{����҉Uۘuks����R'�
|
4
|
-
�+�iӆR�D�[�)��B�k���=D�K��ٟ��V�C�ɓ���m�ʐ�N��g{���!&U�4X>���*T%��C����2�i�몆����(�űݮC<����C���L�Y�b_�IO�W���{ ή5�$�$Pw#U��Fk�z]�M�����?֯�x�����
|
1
|
+
J�9;%��H��+a�)�j01K��HZs����M����e��f[da5h"�j�xK�y�������N{/�zٯ���1���.o��Ebe�G`���Ѷ��^&���Ȟ]1кe�<��;X(=Y� =&ݬ�Y�V�*�'1�5]{0�CDX��O�ݛm�t'�%gmC¥��Ff��r��F2�
|
2
|
+
��1�tH�l�ڟR�S�3%~���
|
data/CHANGES
CHANGED
@@ -1,93 +1,96 @@
|
|
1
|
-
== 0.
|
2
|
-
* The
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
*
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
*
|
15
|
-
|
16
|
-
== 0.6.
|
17
|
-
* Declare the FFI prototype for
|
18
|
-
|
19
|
-
== 0.6.
|
20
|
-
*
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
* The
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
*
|
40
|
-
|
41
|
-
|
42
|
-
*
|
43
|
-
|
44
|
-
|
45
|
-
*
|
46
|
-
|
47
|
-
|
48
|
-
*
|
49
|
-
|
50
|
-
|
51
|
-
*
|
52
|
-
|
53
|
-
|
54
|
-
*
|
55
|
-
*
|
56
|
-
*
|
57
|
-
|
58
|
-
|
59
|
-
*
|
60
|
-
|
61
|
-
== 0.4.
|
62
|
-
*
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
*
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
*
|
80
|
-
signaled
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
*
|
91
|
-
|
92
|
-
|
93
|
-
*
|
1
|
+
== 0.7.0 - 22-Jun-2016
|
2
|
+
* The license is now Apache 2.0.
|
3
|
+
|
4
|
+
== 0.6.6 - 13-Sep-2015
|
5
|
+
* The gem is now signed.
|
6
|
+
* Added the win32-ipc.rb file for convenience.
|
7
|
+
|
8
|
+
== 0.6.5 - 7-Jul-2015
|
9
|
+
* Fixed the wait_for_multiple method for x64 platforms. Thanks go to Rafal
|
10
|
+
Bigaj for the spot and patch.
|
11
|
+
|
12
|
+
== 0.6.4 - 1-Jul-2015
|
13
|
+
* Fixed boolean argument type parameter. Thanks go to Rafal Bigaj for the patch.
|
14
|
+
* Updates to gemspec and Rakefile.
|
15
|
+
|
16
|
+
== 0.6.3 - 10-Jan-2015
|
17
|
+
* Declare the FFI prototype for WaitForSingleObject as blocking.
|
18
|
+
|
19
|
+
== 0.6.2 - 10-Jan-2015
|
20
|
+
* Declare the FFI prototype for WaitForMultipleObjects as blocking.
|
21
|
+
|
22
|
+
== 0.6.1 - 9-Apr-2013
|
23
|
+
* Updated the HANDLE function prototypes in the underlying FFI code. This
|
24
|
+
affects 64 bit versions of Ruby.
|
25
|
+
|
26
|
+
== 0.6.0 - 8-Jul-2012
|
27
|
+
* Now uses FFI instead of win32-api.
|
28
|
+
* The #signaled? method now has a meaningful default implementation.
|
29
|
+
* If an internal C function fails it raises a SystemCallError (Errno) instead
|
30
|
+
of an Ipc::Error.
|
31
|
+
* The Ipc::Error class, although defined for those who wish to still use it
|
32
|
+
in inherited classes, is no longer used internally.
|
33
|
+
|
34
|
+
== 0.5.3 - 19-Apr-2010
|
35
|
+
* Added a few gem related tasks to the Rakefile, and removed an old install
|
36
|
+
task.
|
37
|
+
* Removed the inline gem building code from the gemspec. That's now handled
|
38
|
+
by a Rake task.
|
39
|
+
* Some cosmetic changes to the source code.
|
40
|
+
|
41
|
+
== 0.5.2 - 6-Aug-2009
|
42
|
+
* License changed to Artistic 2.0.
|
43
|
+
* Some gemspec updates, including an updated description and adding a
|
44
|
+
license attribute.
|
45
|
+
* Renamed the test file to test_win32_ipc.rb.
|
46
|
+
|
47
|
+
== 0.5.1 - 1-Jan-2008
|
48
|
+
* Fixed bugs in the private wait_for_multiple method. Thanks go to an
|
49
|
+
anonymous user for the spot and the patch.
|
50
|
+
* Removed the install.rb file. Installation was merged into the Rakefile.
|
51
|
+
* Updated the MANIFEST.
|
52
|
+
|
53
|
+
== 0.5.0 - 30-Apr-2007
|
54
|
+
* Now pure Ruby.
|
55
|
+
* Ipc.new no longer accepts a block.
|
56
|
+
* Changed IpcError to Ipc::Error.
|
57
|
+
* Removed the 'doc' directory. The documentation is now inlined via rdoc.
|
58
|
+
* Added a gemspec.
|
59
|
+
* Added a Rakefile, including tasks for installation and testing.
|
60
|
+
|
61
|
+
== 0.4.1 - 23-Jan-2005
|
62
|
+
* Minor internal modifications for handling block arguments.
|
63
|
+
|
64
|
+
== 0.4.0 - 16-Dec-2004
|
65
|
+
* Changed the timeout from milliseconds to seconds. This wasn't documented,
|
66
|
+
and I'm guessing most people didn't know that they were passing milliseconds
|
67
|
+
instead of seconds. But, I've bumped the version number, just in case.
|
68
|
+
|
69
|
+
== 0.3.1 - 11-Dec-2004
|
70
|
+
* Fixed a bug in Ipc#wait where a segfault would occur if a block was not
|
71
|
+
provided.
|
72
|
+
* Moved the 'examples' directory to the toplevel directory.
|
73
|
+
|
74
|
+
== 0.3.0 - 31-Oct-2004
|
75
|
+
* The constructor now takes an optional block. Instance objects will call
|
76
|
+
that block if they are signaled.
|
77
|
+
* Added the 'block' method (read-only). Allows you to access the block
|
78
|
+
provided to the constructor.
|
79
|
+
* Modified the 'wait' instance method to take an optional block. This block
|
80
|
+
will be called if the object is signaled. Overrides the block to the
|
81
|
+
constructor for that instance object (only).
|
82
|
+
* Added the 'signaled?' instance method to indicate if the object is in the
|
83
|
+
signaled state or not.
|
84
|
+
* Modified all methods to raise an IpcError if an error occurs (instead of
|
85
|
+
simply returning nil).
|
86
|
+
* Added internal comments in order to make the code rdoc friendly, including
|
87
|
+
changes to the README file.
|
88
|
+
|
89
|
+
== 0.2.0 - 15-Jul-2004
|
90
|
+
* Updated to use the newer allocation framework. This means that as of
|
91
|
+
version 0.2.0, this package requires Ruby 1.8.0 or later.
|
92
|
+
* Moved the test.rb script to docs/examples.
|
93
|
+
* Minor code cleanup
|
94
|
+
|
95
|
+
== 0.1.0 - 30-Apr-2004
|
96
|
+
* Initial release
|
data/MANIFEST
CHANGED
@@ -1,7 +1,8 @@
|
|
1
|
-
* CHANGES
|
2
|
-
* MANIFEST
|
3
|
-
* README
|
4
|
-
* Rakefile
|
5
|
-
* win32-ipc.gemspec
|
6
|
-
*
|
7
|
-
*
|
1
|
+
* CHANGES
|
2
|
+
* MANIFEST
|
3
|
+
* README
|
4
|
+
* Rakefile
|
5
|
+
* win32-ipc.gemspec
|
6
|
+
* certs/djberg96_pub.pem
|
7
|
+
* lib/win32/ipc.rb
|
8
|
+
* test/test_win32_ipc.rb
|
data/README
CHANGED
@@ -1,33 +1,32 @@
|
|
1
|
-
= Description
|
2
|
-
An abstract base class for Windows synchronization objects.
|
3
|
-
|
4
|
-
= Installation
|
5
|
-
gem install win32-ipc
|
6
|
-
|
7
|
-
= Synopsis
|
8
|
-
There is no synopsis. Don't use this library directly. It is used as the basis
|
9
|
-
for other libraries, such as win32-mutex, etc. Think of it as an interface.
|
10
|
-
|
11
|
-
= Notes
|
12
|
-
Originally based on the Win32::Ipc Perl module by Gurusamy Sarathy.
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
*
|
33
|
-
* Daniel J. Berger
|
1
|
+
= Description
|
2
|
+
An abstract base class for Windows synchronization objects.
|
3
|
+
|
4
|
+
= Installation
|
5
|
+
gem install win32-ipc
|
6
|
+
|
7
|
+
= Synopsis
|
8
|
+
There is no synopsis. Don't use this library directly. It is used as the basis
|
9
|
+
for other libraries, such as win32-mutex, etc. Think of it as an interface.
|
10
|
+
|
11
|
+
= Notes
|
12
|
+
Originally based on the Win32::Ipc Perl module by Gurusamy Sarathy.
|
13
|
+
This library is a prerequisite for several other IPC related Windows gems.
|
14
|
+
|
15
|
+
= Known Bugs
|
16
|
+
None that I know of. Please log any bug reports on the project page
|
17
|
+
at https://github.com/djberg96/win32-ipc.
|
18
|
+
|
19
|
+
= License
|
20
|
+
Apache 2.0
|
21
|
+
|
22
|
+
= Copyright
|
23
|
+
(C) 2003-2016 Daniel J. Berger, All Rights Reserved
|
24
|
+
|
25
|
+
= Warranty
|
26
|
+
This package is provided "as is" and without any express or
|
27
|
+
implied warranties, including, without limitation, the implied
|
28
|
+
warranties of merchantability and fitness for a particular purpose.
|
29
|
+
|
30
|
+
= Authors
|
31
|
+
* Park Heesob
|
32
|
+
* Daniel J. Berger
|
data/Rakefile
CHANGED
@@ -1,28 +1,28 @@
|
|
1
|
-
require 'rake'
|
2
|
-
require 'rake/testtask'
|
3
|
-
require 'rake/clean'
|
4
|
-
|
5
|
-
CLEAN.include("**/*.gem", "**/*.rbc")
|
6
|
-
|
7
|
-
namespace 'gem' do
|
8
|
-
desc 'Create the win32-ipc gem'
|
9
|
-
task :create => [:clean] do
|
10
|
-
require 'rubygems/package'
|
11
|
-
spec = eval(IO.read('win32-ipc.gemspec'))
|
12
|
-
spec.signing_key = File.join(Dir.home, '.ssh', 'gem-private_key.pem')
|
13
|
-
Gem::Package.build(spec)
|
14
|
-
end
|
15
|
-
|
16
|
-
desc 'Install the win32-ipc gem'
|
17
|
-
task :install => [:create] do
|
18
|
-
file = Dir['*.gem'].first
|
19
|
-
sh "gem install -l #{file}"
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
Rake::TestTask.new do |t|
|
24
|
-
t.verbose = true
|
25
|
-
t.warning = true
|
26
|
-
end
|
27
|
-
|
28
|
-
task :default => :test
|
1
|
+
require 'rake'
|
2
|
+
require 'rake/testtask'
|
3
|
+
require 'rake/clean'
|
4
|
+
|
5
|
+
CLEAN.include("**/*.gem", "**/*.rbc")
|
6
|
+
|
7
|
+
namespace 'gem' do
|
8
|
+
desc 'Create the win32-ipc gem'
|
9
|
+
task :create => [:clean] do
|
10
|
+
require 'rubygems/package'
|
11
|
+
spec = eval(IO.read('win32-ipc.gemspec'))
|
12
|
+
spec.signing_key = File.join(Dir.home, '.ssh', 'gem-private_key.pem')
|
13
|
+
Gem::Package.build(spec, true)
|
14
|
+
end
|
15
|
+
|
16
|
+
desc 'Install the win32-ipc gem'
|
17
|
+
task :install => [:create] do
|
18
|
+
file = Dir['*.gem'].first
|
19
|
+
sh "gem install -l #{file}"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
Rake::TestTask.new do |t|
|
24
|
+
t.verbose = true
|
25
|
+
t.warning = true
|
26
|
+
end
|
27
|
+
|
28
|
+
task :default => :test
|
data/certs/djberg96_pub.pem
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
-----BEGIN CERTIFICATE-----
|
2
|
-
MIIDcDCCAligAwIBAgIBATANBgkqhkiG9w0BAQUFADA/MREwDwYDVQQDDAhkamJl
|
3
|
-
cmc5NjEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPyLGQBGRYDY29t
|
4
|
-
MB4XDTE1MDkwMjIwNDkxOFoXDTE2MDkwMTIwNDkxOFowPzERMA8GA1UEAwwIZGpi
|
5
|
-
ZXJnOTYxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkWA2Nv
|
6
|
-
bTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMyTkvXqRp6hLs9eoJOS
|
7
|
-
Hmi8kRYbq9Vkf15/hMxJpotYMgJVHHWrmDcC5Dye2PbnXjTkKf266Zw0PtT9h+lI
|
8
|
-
S3ts9HO+vaCFSMwFFZmnWJSpQ3CNw2RcHxjWkk9yF7imEM8Kz9ojhiDXzBetdV6M
|
9
|
-
gr0lV/alUr7TNVBDngbXEfTWscyXh1qd7xZ4EcOdsDktCe5G45N/o3662tPQvJsi
|
10
|
-
FOF0CM/KuBsa/HL1/eoEmF4B3EKIRfTHrQ3hu20Kv3RJ88QM4ec2+0dd97uX693O
|
11
|
-
zv6981fyEg+aXLkxrkViM/tz2qR2ZE0jPhHTREPYeMEgptRkTmWSKAuLVWrJEfgl
|
12
|
-
DtkCAwEAAaN3MHUwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFEwe
|
13
|
-
nn6bfJADmuIDiMSOzedOrL+xMB0GA1UdEQQWMBSBEmRqYmVyZzk2QGdtYWlsLmNv
|
14
|
-
bTAdBgNVHRIEFjAUgRJkamJlcmc5NkBnbWFpbC5jb20wDQYJKoZIhvcNAQEFBQAD
|
15
|
-
ggEBAHmNOCWoDVD75zHFueY0viwGDVP1BNGFC+yXcb7u2GlK+nEMCORqzURbYPf7
|
16
|
-
tL+/hzmePIRz7i30UM//64GI1NLv9jl7nIwjhPpXpf7/lu2I9hOTsvwSumb5UiKC
|
17
|
-
/sqBxI3sfj9pr79Wpv4MuikX1XPik7Ncb7NPsJPw06Lvyc3Hkg5X2XpPtLtS+Gr2
|
18
|
-
wKJnmzb5rIPS1cmsqv0M9LPWflzfwoZ/SpnmhagP+g05p8bRNKjZSA2iImM/GyYZ
|
19
|
-
EJYzxdPOrx2n6NYR3Hk+vHP0U7UBSveI6+qx+ndQYaeyCn+GRX2PKS9h66YF/Q1V
|
20
|
-
tGSHgAmcLlkdGgan182qsE/4kKM=
|
21
|
-
-----END CERTIFICATE-----
|
1
|
+
-----BEGIN CERTIFICATE-----
|
2
|
+
MIIDcDCCAligAwIBAgIBATANBgkqhkiG9w0BAQUFADA/MREwDwYDVQQDDAhkamJl
|
3
|
+
cmc5NjEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPyLGQBGRYDY29t
|
4
|
+
MB4XDTE1MDkwMjIwNDkxOFoXDTE2MDkwMTIwNDkxOFowPzERMA8GA1UEAwwIZGpi
|
5
|
+
ZXJnOTYxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkWA2Nv
|
6
|
+
bTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMyTkvXqRp6hLs9eoJOS
|
7
|
+
Hmi8kRYbq9Vkf15/hMxJpotYMgJVHHWrmDcC5Dye2PbnXjTkKf266Zw0PtT9h+lI
|
8
|
+
S3ts9HO+vaCFSMwFFZmnWJSpQ3CNw2RcHxjWkk9yF7imEM8Kz9ojhiDXzBetdV6M
|
9
|
+
gr0lV/alUr7TNVBDngbXEfTWscyXh1qd7xZ4EcOdsDktCe5G45N/o3662tPQvJsi
|
10
|
+
FOF0CM/KuBsa/HL1/eoEmF4B3EKIRfTHrQ3hu20Kv3RJ88QM4ec2+0dd97uX693O
|
11
|
+
zv6981fyEg+aXLkxrkViM/tz2qR2ZE0jPhHTREPYeMEgptRkTmWSKAuLVWrJEfgl
|
12
|
+
DtkCAwEAAaN3MHUwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFEwe
|
13
|
+
nn6bfJADmuIDiMSOzedOrL+xMB0GA1UdEQQWMBSBEmRqYmVyZzk2QGdtYWlsLmNv
|
14
|
+
bTAdBgNVHRIEFjAUgRJkamJlcmc5NkBnbWFpbC5jb20wDQYJKoZIhvcNAQEFBQAD
|
15
|
+
ggEBAHmNOCWoDVD75zHFueY0viwGDVP1BNGFC+yXcb7u2GlK+nEMCORqzURbYPf7
|
16
|
+
tL+/hzmePIRz7i30UM//64GI1NLv9jl7nIwjhPpXpf7/lu2I9hOTsvwSumb5UiKC
|
17
|
+
/sqBxI3sfj9pr79Wpv4MuikX1XPik7Ncb7NPsJPw06Lvyc3Hkg5X2XpPtLtS+Gr2
|
18
|
+
wKJnmzb5rIPS1cmsqv0M9LPWflzfwoZ/SpnmhagP+g05p8bRNKjZSA2iImM/GyYZ
|
19
|
+
EJYzxdPOrx2n6NYR3Hk+vHP0U7UBSveI6+qx+ndQYaeyCn+GRX2PKS9h66YF/Q1V
|
20
|
+
tGSHgAmcLlkdGgan182qsE/4kKM=
|
21
|
+
-----END CERTIFICATE-----
|
data/lib/win32/ipc.rb
CHANGED
@@ -1,185 +1,185 @@
|
|
1
|
-
require 'ffi'
|
2
|
-
|
3
|
-
# The Win32 module serves as a namespace only.
|
4
|
-
module Win32
|
5
|
-
|
6
|
-
# This is a an abstract base class for IPC related classes, such as
|
7
|
-
# Events and Semaphores.
|
8
|
-
#
|
9
|
-
class Ipc
|
10
|
-
extend FFI::Library
|
11
|
-
typedef :ulong, :dword
|
12
|
-
typedef :uintptr_t, :handle
|
13
|
-
|
14
|
-
ffi_lib :kernel32
|
15
|
-
|
16
|
-
attach_function :CloseHandle, [:handle], :bool
|
17
|
-
attach_function :WaitForSingleObject, [:handle, :dword], :dword, :blocking => true
|
18
|
-
attach_function :WaitForMultipleObjects, [:dword, :pointer, :bool, :dword], :dword, :blocking => true
|
19
|
-
|
20
|
-
private_class_method :CloseHandle, :WaitForSingleObject, :WaitForMultipleObjects
|
21
|
-
|
22
|
-
# The version of the win32-ipc library
|
23
|
-
VERSION = '0.
|
24
|
-
|
25
|
-
SIGNALED = 1
|
26
|
-
ABANDONED = -1
|
27
|
-
TIMEOUT = 0
|
28
|
-
INFINITE = 0xFFFFFFFF
|
29
|
-
|
30
|
-
WAIT_OBJECT_0 = 0
|
31
|
-
WAIT_TIMEOUT = 0x102
|
32
|
-
WAIT_ABANDONED = 128
|
33
|
-
WAIT_ABANDONED_0 = WAIT_ABANDONED
|
34
|
-
WAIT_FAILED = 0xFFFFFFFF
|
35
|
-
|
36
|
-
# The HANDLE object (an unsigned long value). Mostly provided for
|
37
|
-
# subclasses to use internally when needed.
|
38
|
-
#
|
39
|
-
attr_reader :handle
|
40
|
-
|
41
|
-
# Creates and returns a new IPC object. Since the IPC class is meant
|
42
|
-
# as an abstract base class, you should never call this method directly.
|
43
|
-
#
|
44
|
-
def initialize(handle)
|
45
|
-
@handle = handle
|
46
|
-
@signaled = false
|
47
|
-
end
|
48
|
-
|
49
|
-
# Closes the handle object provided in the constructor.
|
50
|
-
#
|
51
|
-
def close
|
52
|
-
CloseHandle(@handle)
|
53
|
-
end
|
54
|
-
|
55
|
-
# Returns whether or not the IPC object is in a signaled state.
|
56
|
-
#--
|
57
|
-
# This method assumes a single object. You may need to redefine this
|
58
|
-
# to suit your needs in your subclass.
|
59
|
-
#
|
60
|
-
def signaled?
|
61
|
-
state = WaitForSingleObject(@handle, 0)
|
62
|
-
|
63
|
-
if state == WAIT_FAILED
|
64
|
-
raise SystemCallError.new("WaitForSingleObject", FFI.errno)
|
65
|
-
elsif state == WAIT_OBJECT_0
|
66
|
-
@signaled = true
|
67
|
-
else
|
68
|
-
@signaled = false
|
69
|
-
end
|
70
|
-
|
71
|
-
@signaled
|
72
|
-
end
|
73
|
-
|
74
|
-
# call-seq:
|
75
|
-
# Ipc#wait(timeout)
|
76
|
-
# Ipc#wait(timeout){ block called when signaled }
|
77
|
-
#
|
78
|
-
# Waits for the calling object to be signaled. The +timeout+ value is
|
79
|
-
# the maximum time to wait, in seconds. A timeout of 0 returns immediately.
|
80
|
-
#
|
81
|
-
# Returns SIGNALED (1), ABANDONED (-1) or TIMEOUT (0). Raises a
|
82
|
-
# SystemCallError (Errno) if the wait fails for some reason.
|
83
|
-
#
|
84
|
-
def wait(timeout = INFINITE)
|
85
|
-
timeout *= 1000 if timeout && timeout != INFINITE
|
86
|
-
|
87
|
-
wait = WaitForSingleObject(@handle, timeout)
|
88
|
-
|
89
|
-
case wait
|
90
|
-
when WAIT_FAILED
|
91
|
-
raise SystemCallError.new("WaitForSingleObject", FFI.errno)
|
92
|
-
when WAIT_OBJECT_0
|
93
|
-
@signaled = true
|
94
|
-
yield if block_given?
|
95
|
-
return SIGNALED
|
96
|
-
when WAIT_ABANDONED
|
97
|
-
return ABANDONED
|
98
|
-
when WAIT_TIMEOUT
|
99
|
-
return TIMEOUT
|
100
|
-
else
|
101
|
-
raise SystemCallError.new("WaitForSingleObject", FFI.errno)
|
102
|
-
end
|
103
|
-
end
|
104
|
-
|
105
|
-
# :call-seq:
|
106
|
-
# IPC#wait_any([ipc_objects], timeout = INFINITE)
|
107
|
-
#
|
108
|
-
# Waits for at least one of the +ipc_objects+ to be signaled. The
|
109
|
-
# +timeout+ value is maximum time to wait in seconds. A timeout of 0
|
110
|
-
# returns immediately.
|
111
|
-
#
|
112
|
-
# Returns the index+1 of the object that was signaled. If multiple
|
113
|
-
# objects are signaled, the one with the lowest index is returned.
|
114
|
-
# Returns 0 if no objects are signaled.
|
115
|
-
#
|
116
|
-
def wait_any(ipc_objects, timeout=INFINITE)
|
117
|
-
timeout *= 1000 if timeout && timeout != INFINITE
|
118
|
-
wait_for_multiple(ipc_objects, false, timeout)
|
119
|
-
end
|
120
|
-
|
121
|
-
# :call-seq:
|
122
|
-
# IPC#wait_all([ipc_objects], timeout = INFINITE)
|
123
|
-
#
|
124
|
-
# Identical to IPC#wait_any, except that it waits for all +ipc_objects+
|
125
|
-
# to be signaled instead of just one.
|
126
|
-
#
|
127
|
-
# Returns the index of the last object signaled. If at least one of the
|
128
|
-
# objects is an abandoned mutex, the return value is negative.
|
129
|
-
#
|
130
|
-
def wait_all(ipc_objects, timeout=INFINITE)
|
131
|
-
timeout *= 1000 if timeout && timeout != INFINITE
|
132
|
-
wait_for_multiple(ipc_objects, true, timeout)
|
133
|
-
end
|
134
|
-
|
135
|
-
private
|
136
|
-
|
137
|
-
# Waits until one or all (depending on the value of +wait_all+) of the
|
138
|
-
# +ipc_objects+ are in the signaled state or the +timeout+ interval
|
139
|
-
# elapses.
|
140
|
-
#
|
141
|
-
def wait_for_multiple(ipc_objects, wait_all=false, timeout=INFINITE)
|
142
|
-
unless ipc_objects.is_a?(Array)
|
143
|
-
msg = 'invalid argument - must be an array of Ipc objects'
|
144
|
-
raise TypeError, msg
|
145
|
-
end
|
146
|
-
|
147
|
-
length = ipc_objects.size
|
148
|
-
|
149
|
-
if length == 0
|
150
|
-
raise ArgumentError, 'no objects to wait for'
|
151
|
-
end
|
152
|
-
|
153
|
-
ptr = FFI::MemoryPointer.new(:pointer, length)
|
154
|
-
|
155
|
-
handles = ipc_objects.map(&:handle)
|
156
|
-
ptr.write_array_of_pointer(handles)
|
157
|
-
|
158
|
-
wait = WaitForMultipleObjects(
|
159
|
-
length,
|
160
|
-
ptr,
|
161
|
-
wait_all,
|
162
|
-
timeout
|
163
|
-
)
|
164
|
-
|
165
|
-
if wait == WAIT_FAILED
|
166
|
-
raise SystemCallError.new("WaitForMultipleObjects", FFI.errno)
|
167
|
-
end
|
168
|
-
|
169
|
-
# signaled
|
170
|
-
if (wait >= WAIT_OBJECT_0) && (wait < WAIT_OBJECT_0 + length)
|
171
|
-
return wait - WAIT_OBJECT_0 + 1
|
172
|
-
end
|
173
|
-
|
174
|
-
# abandoned mutex - return negative value
|
175
|
-
if (wait >= WAIT_ABANDONED) && (wait < WAIT_ABANDONED + length)
|
176
|
-
return -wait - WAIT_ABANDONED + 1
|
177
|
-
end
|
178
|
-
|
179
|
-
# timed out
|
180
|
-
return 0 if wait == WAIT_TIMEOUT
|
181
|
-
|
182
|
-
nil
|
183
|
-
end
|
184
|
-
end
|
185
|
-
end
|
1
|
+
require 'ffi'
|
2
|
+
|
3
|
+
# The Win32 module serves as a namespace only.
|
4
|
+
module Win32
|
5
|
+
|
6
|
+
# This is a an abstract base class for IPC related classes, such as
|
7
|
+
# Events and Semaphores.
|
8
|
+
#
|
9
|
+
class Ipc
|
10
|
+
extend FFI::Library
|
11
|
+
typedef :ulong, :dword
|
12
|
+
typedef :uintptr_t, :handle
|
13
|
+
|
14
|
+
ffi_lib :kernel32
|
15
|
+
|
16
|
+
attach_function :CloseHandle, [:handle], :bool
|
17
|
+
attach_function :WaitForSingleObject, [:handle, :dword], :dword, :blocking => true
|
18
|
+
attach_function :WaitForMultipleObjects, [:dword, :pointer, :bool, :dword], :dword, :blocking => true
|
19
|
+
|
20
|
+
private_class_method :CloseHandle, :WaitForSingleObject, :WaitForMultipleObjects
|
21
|
+
|
22
|
+
# The version of the win32-ipc library
|
23
|
+
VERSION = '0.7.0'
|
24
|
+
|
25
|
+
SIGNALED = 1
|
26
|
+
ABANDONED = -1
|
27
|
+
TIMEOUT = 0
|
28
|
+
INFINITE = 0xFFFFFFFF
|
29
|
+
|
30
|
+
WAIT_OBJECT_0 = 0
|
31
|
+
WAIT_TIMEOUT = 0x102
|
32
|
+
WAIT_ABANDONED = 128
|
33
|
+
WAIT_ABANDONED_0 = WAIT_ABANDONED
|
34
|
+
WAIT_FAILED = 0xFFFFFFFF
|
35
|
+
|
36
|
+
# The HANDLE object (an unsigned long value). Mostly provided for
|
37
|
+
# subclasses to use internally when needed.
|
38
|
+
#
|
39
|
+
attr_reader :handle
|
40
|
+
|
41
|
+
# Creates and returns a new IPC object. Since the IPC class is meant
|
42
|
+
# as an abstract base class, you should never call this method directly.
|
43
|
+
#
|
44
|
+
def initialize(handle)
|
45
|
+
@handle = handle
|
46
|
+
@signaled = false
|
47
|
+
end
|
48
|
+
|
49
|
+
# Closes the handle object provided in the constructor.
|
50
|
+
#
|
51
|
+
def close
|
52
|
+
CloseHandle(@handle)
|
53
|
+
end
|
54
|
+
|
55
|
+
# Returns whether or not the IPC object is in a signaled state.
|
56
|
+
#--
|
57
|
+
# This method assumes a single object. You may need to redefine this
|
58
|
+
# to suit your needs in your subclass.
|
59
|
+
#
|
60
|
+
def signaled?
|
61
|
+
state = WaitForSingleObject(@handle, 0)
|
62
|
+
|
63
|
+
if state == WAIT_FAILED
|
64
|
+
raise SystemCallError.new("WaitForSingleObject", FFI.errno)
|
65
|
+
elsif state == WAIT_OBJECT_0
|
66
|
+
@signaled = true
|
67
|
+
else
|
68
|
+
@signaled = false
|
69
|
+
end
|
70
|
+
|
71
|
+
@signaled
|
72
|
+
end
|
73
|
+
|
74
|
+
# call-seq:
|
75
|
+
# Ipc#wait(timeout)
|
76
|
+
# Ipc#wait(timeout){ block called when signaled }
|
77
|
+
#
|
78
|
+
# Waits for the calling object to be signaled. The +timeout+ value is
|
79
|
+
# the maximum time to wait, in seconds. A timeout of 0 returns immediately.
|
80
|
+
#
|
81
|
+
# Returns SIGNALED (1), ABANDONED (-1) or TIMEOUT (0). Raises a
|
82
|
+
# SystemCallError (Errno) if the wait fails for some reason.
|
83
|
+
#
|
84
|
+
def wait(timeout = INFINITE)
|
85
|
+
timeout *= 1000 if timeout && timeout != INFINITE
|
86
|
+
|
87
|
+
wait = WaitForSingleObject(@handle, timeout)
|
88
|
+
|
89
|
+
case wait
|
90
|
+
when WAIT_FAILED
|
91
|
+
raise SystemCallError.new("WaitForSingleObject", FFI.errno)
|
92
|
+
when WAIT_OBJECT_0
|
93
|
+
@signaled = true
|
94
|
+
yield if block_given?
|
95
|
+
return SIGNALED
|
96
|
+
when WAIT_ABANDONED
|
97
|
+
return ABANDONED
|
98
|
+
when WAIT_TIMEOUT
|
99
|
+
return TIMEOUT
|
100
|
+
else
|
101
|
+
raise SystemCallError.new("WaitForSingleObject", FFI.errno)
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
# :call-seq:
|
106
|
+
# IPC#wait_any([ipc_objects], timeout = INFINITE)
|
107
|
+
#
|
108
|
+
# Waits for at least one of the +ipc_objects+ to be signaled. The
|
109
|
+
# +timeout+ value is maximum time to wait in seconds. A timeout of 0
|
110
|
+
# returns immediately.
|
111
|
+
#
|
112
|
+
# Returns the index+1 of the object that was signaled. If multiple
|
113
|
+
# objects are signaled, the one with the lowest index is returned.
|
114
|
+
# Returns 0 if no objects are signaled.
|
115
|
+
#
|
116
|
+
def wait_any(ipc_objects, timeout=INFINITE)
|
117
|
+
timeout *= 1000 if timeout && timeout != INFINITE
|
118
|
+
wait_for_multiple(ipc_objects, false, timeout)
|
119
|
+
end
|
120
|
+
|
121
|
+
# :call-seq:
|
122
|
+
# IPC#wait_all([ipc_objects], timeout = INFINITE)
|
123
|
+
#
|
124
|
+
# Identical to IPC#wait_any, except that it waits for all +ipc_objects+
|
125
|
+
# to be signaled instead of just one.
|
126
|
+
#
|
127
|
+
# Returns the index of the last object signaled. If at least one of the
|
128
|
+
# objects is an abandoned mutex, the return value is negative.
|
129
|
+
#
|
130
|
+
def wait_all(ipc_objects, timeout=INFINITE)
|
131
|
+
timeout *= 1000 if timeout && timeout != INFINITE
|
132
|
+
wait_for_multiple(ipc_objects, true, timeout)
|
133
|
+
end
|
134
|
+
|
135
|
+
private
|
136
|
+
|
137
|
+
# Waits until one or all (depending on the value of +wait_all+) of the
|
138
|
+
# +ipc_objects+ are in the signaled state or the +timeout+ interval
|
139
|
+
# elapses.
|
140
|
+
#
|
141
|
+
def wait_for_multiple(ipc_objects, wait_all=false, timeout=INFINITE)
|
142
|
+
unless ipc_objects.is_a?(Array)
|
143
|
+
msg = 'invalid argument - must be an array of Ipc objects'
|
144
|
+
raise TypeError, msg
|
145
|
+
end
|
146
|
+
|
147
|
+
length = ipc_objects.size
|
148
|
+
|
149
|
+
if length == 0
|
150
|
+
raise ArgumentError, 'no objects to wait for'
|
151
|
+
end
|
152
|
+
|
153
|
+
ptr = FFI::MemoryPointer.new(:pointer, length)
|
154
|
+
|
155
|
+
handles = ipc_objects.map(&:handle)
|
156
|
+
ptr.write_array_of_pointer(handles)
|
157
|
+
|
158
|
+
wait = WaitForMultipleObjects(
|
159
|
+
length,
|
160
|
+
ptr,
|
161
|
+
wait_all,
|
162
|
+
timeout
|
163
|
+
)
|
164
|
+
|
165
|
+
if wait == WAIT_FAILED
|
166
|
+
raise SystemCallError.new("WaitForMultipleObjects", FFI.errno)
|
167
|
+
end
|
168
|
+
|
169
|
+
# signaled
|
170
|
+
if (wait >= WAIT_OBJECT_0) && (wait < WAIT_OBJECT_0 + length)
|
171
|
+
return wait - WAIT_OBJECT_0 + 1
|
172
|
+
end
|
173
|
+
|
174
|
+
# abandoned mutex - return negative value
|
175
|
+
if (wait >= WAIT_ABANDONED) && (wait < WAIT_ABANDONED + length)
|
176
|
+
return -wait - WAIT_ABANDONED + 1
|
177
|
+
end
|
178
|
+
|
179
|
+
# timed out
|
180
|
+
return 0 if wait == WAIT_TIMEOUT
|
181
|
+
|
182
|
+
nil
|
183
|
+
end
|
184
|
+
end
|
185
|
+
end
|
data/test/test_win32_ipc.rb
CHANGED
@@ -1,88 +1,88 @@
|
|
1
|
-
##########################################################################
|
2
|
-
# test_win32_ipc.rb
|
3
|
-
#
|
4
|
-
# Test case for the Win32::Ipc class. Note that this class is rather
|
5
|
-
# difficult to test directly since it is meant to be subclassed, not
|
6
|
-
# used directly.
|
7
|
-
#
|
8
|
-
# You should run this test via the 'rake test' task.
|
9
|
-
##########################################################################
|
10
|
-
require 'win32/ipc'
|
11
|
-
require 'test-unit'
|
12
|
-
include Win32
|
13
|
-
|
14
|
-
class TC_Win32_Ipc < Test::Unit::TestCase
|
15
|
-
def setup
|
16
|
-
@ipc = Ipc.new(1)
|
17
|
-
end
|
18
|
-
|
19
|
-
test "version is set to expected value" do
|
20
|
-
assert_equal('0.
|
21
|
-
end
|
22
|
-
|
23
|
-
test "handle method basic functionality" do
|
24
|
-
assert_respond_to(@ipc, :handle)
|
25
|
-
assert_equal(1, @ipc.handle)
|
26
|
-
end
|
27
|
-
|
28
|
-
test "signaled? method is defined" do
|
29
|
-
assert_respond_to(@ipc, :signaled?)
|
30
|
-
end
|
31
|
-
|
32
|
-
test "wait method is defined" do
|
33
|
-
assert_respond_to(@ipc, :wait)
|
34
|
-
end
|
35
|
-
|
36
|
-
test "wait raises ENXIO if handle is invalid" do
|
37
|
-
assert_raises(Errno::ENXIO){ @ipc.wait }
|
38
|
-
end
|
39
|
-
|
40
|
-
test "wait accepts a maximum of one argument" do
|
41
|
-
assert_raises(ArgumentError){ @ipc.wait(1,2) }
|
42
|
-
end
|
43
|
-
|
44
|
-
test "wait_any method is defined" do
|
45
|
-
assert_respond_to(@ipc, :wait_any)
|
46
|
-
end
|
47
|
-
|
48
|
-
test "wait_any raises an ArgumentError if the array is empty" do
|
49
|
-
assert_raises(ArgumentError){ @ipc.wait_any([]) }
|
50
|
-
end
|
51
|
-
|
52
|
-
test "wait_any only accepts an array" do
|
53
|
-
assert_raises(TypeError){ @ipc.wait_any(1,2) }
|
54
|
-
end
|
55
|
-
|
56
|
-
test "wait_all method is defined" do
|
57
|
-
assert_respond_to(@ipc, :wait_all)
|
58
|
-
end
|
59
|
-
|
60
|
-
test "wait_all raises an ArgumentError if the array is empty" do
|
61
|
-
assert_raises(ArgumentError){ @ipc.wait_all([]) }
|
62
|
-
end
|
63
|
-
|
64
|
-
test "wait_all only accepts an array" do
|
65
|
-
assert_raises(TypeError){ @ipc.wait_all(1,2) }
|
66
|
-
end
|
67
|
-
|
68
|
-
test "close method basic functionality" do
|
69
|
-
assert_respond_to(@ipc, :close)
|
70
|
-
assert_nothing_raised{ @ipc.close }
|
71
|
-
end
|
72
|
-
|
73
|
-
test "expected constants are defined" do
|
74
|
-
assert_not_nil(Ipc::SIGNALED)
|
75
|
-
assert_not_nil(Ipc::ABANDONED)
|
76
|
-
assert_not_nil(Ipc::TIMEOUT)
|
77
|
-
end
|
78
|
-
|
79
|
-
test "ffi functions are private" do
|
80
|
-
assert_not_respond_to(Ipc, :CloseHandle)
|
81
|
-
assert_not_respond_to(Ipc, :WaitForSingleObject)
|
82
|
-
assert_not_respond_to(Ipc, :WaitForMultipleObjects)
|
83
|
-
end
|
84
|
-
|
85
|
-
def teardown
|
86
|
-
@ipc = nil
|
87
|
-
end
|
88
|
-
end
|
1
|
+
##########################################################################
|
2
|
+
# test_win32_ipc.rb
|
3
|
+
#
|
4
|
+
# Test case for the Win32::Ipc class. Note that this class is rather
|
5
|
+
# difficult to test directly since it is meant to be subclassed, not
|
6
|
+
# used directly.
|
7
|
+
#
|
8
|
+
# You should run this test via the 'rake test' task.
|
9
|
+
##########################################################################
|
10
|
+
require 'win32/ipc'
|
11
|
+
require 'test-unit'
|
12
|
+
include Win32
|
13
|
+
|
14
|
+
class TC_Win32_Ipc < Test::Unit::TestCase
|
15
|
+
def setup
|
16
|
+
@ipc = Ipc.new(1)
|
17
|
+
end
|
18
|
+
|
19
|
+
test "version is set to expected value" do
|
20
|
+
assert_equal('0.7.0', Ipc::VERSION)
|
21
|
+
end
|
22
|
+
|
23
|
+
test "handle method basic functionality" do
|
24
|
+
assert_respond_to(@ipc, :handle)
|
25
|
+
assert_equal(1, @ipc.handle)
|
26
|
+
end
|
27
|
+
|
28
|
+
test "signaled? method is defined" do
|
29
|
+
assert_respond_to(@ipc, :signaled?)
|
30
|
+
end
|
31
|
+
|
32
|
+
test "wait method is defined" do
|
33
|
+
assert_respond_to(@ipc, :wait)
|
34
|
+
end
|
35
|
+
|
36
|
+
test "wait raises ENXIO if handle is invalid" do
|
37
|
+
assert_raises(Errno::ENXIO){ @ipc.wait }
|
38
|
+
end
|
39
|
+
|
40
|
+
test "wait accepts a maximum of one argument" do
|
41
|
+
assert_raises(ArgumentError){ @ipc.wait(1,2) }
|
42
|
+
end
|
43
|
+
|
44
|
+
test "wait_any method is defined" do
|
45
|
+
assert_respond_to(@ipc, :wait_any)
|
46
|
+
end
|
47
|
+
|
48
|
+
test "wait_any raises an ArgumentError if the array is empty" do
|
49
|
+
assert_raises(ArgumentError){ @ipc.wait_any([]) }
|
50
|
+
end
|
51
|
+
|
52
|
+
test "wait_any only accepts an array" do
|
53
|
+
assert_raises(TypeError){ @ipc.wait_any(1,2) }
|
54
|
+
end
|
55
|
+
|
56
|
+
test "wait_all method is defined" do
|
57
|
+
assert_respond_to(@ipc, :wait_all)
|
58
|
+
end
|
59
|
+
|
60
|
+
test "wait_all raises an ArgumentError if the array is empty" do
|
61
|
+
assert_raises(ArgumentError){ @ipc.wait_all([]) }
|
62
|
+
end
|
63
|
+
|
64
|
+
test "wait_all only accepts an array" do
|
65
|
+
assert_raises(TypeError){ @ipc.wait_all(1,2) }
|
66
|
+
end
|
67
|
+
|
68
|
+
test "close method basic functionality" do
|
69
|
+
assert_respond_to(@ipc, :close)
|
70
|
+
assert_nothing_raised{ @ipc.close }
|
71
|
+
end
|
72
|
+
|
73
|
+
test "expected constants are defined" do
|
74
|
+
assert_not_nil(Ipc::SIGNALED)
|
75
|
+
assert_not_nil(Ipc::ABANDONED)
|
76
|
+
assert_not_nil(Ipc::TIMEOUT)
|
77
|
+
end
|
78
|
+
|
79
|
+
test "ffi functions are private" do
|
80
|
+
assert_not_respond_to(Ipc, :CloseHandle)
|
81
|
+
assert_not_respond_to(Ipc, :WaitForSingleObject)
|
82
|
+
assert_not_respond_to(Ipc, :WaitForMultipleObjects)
|
83
|
+
end
|
84
|
+
|
85
|
+
def teardown
|
86
|
+
@ipc = nil
|
87
|
+
end
|
88
|
+
end
|
data/win32-ipc.gemspec
CHANGED
@@ -1,25 +1,25 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
|
3
|
-
Gem::Specification.new do |spec|
|
4
|
-
spec.name = 'win32-ipc'
|
5
|
-
spec.version = '0.
|
6
|
-
spec.authors = ['Daniel J. Berger', 'Park Heesob']
|
7
|
-
spec.license = '
|
8
|
-
spec.email = 'djberg96@gmail.com'
|
9
|
-
spec.homepage = 'http://github.com/djberg96/win32-ipc'
|
10
|
-
spec.summary = 'An abstract base class for Windows synchronization objects.'
|
11
|
-
spec.test_file = 'test/test_win32_ipc.rb'
|
12
|
-
spec.files = Dir['**/*'].reject{ |f| f.include?('git') }
|
13
|
-
spec.cert_chain = ['certs/djberg96_pub.pem']
|
14
|
-
|
15
|
-
spec.extra_rdoc_files = ['README', 'CHANGES', 'MANIFEST']
|
16
|
-
|
17
|
-
spec.add_dependency('ffi')
|
18
|
-
spec.add_development_dependency('test-unit')
|
19
|
-
|
20
|
-
spec.description = <<-EOF
|
21
|
-
The win32-ipc library provides the Win32::IPC class. This is meant to
|
22
|
-
serve as an abstract base class for other IPC related libraries for MS
|
23
|
-
Windows, such as win32-semaphore, win32-event, and so on.
|
24
|
-
EOF
|
25
|
-
end
|
1
|
+
require 'rubygems'
|
2
|
+
|
3
|
+
Gem::Specification.new do |spec|
|
4
|
+
spec.name = 'win32-ipc'
|
5
|
+
spec.version = '0.7.0'
|
6
|
+
spec.authors = ['Daniel J. Berger', 'Park Heesob']
|
7
|
+
spec.license = 'Apache 2.0'
|
8
|
+
spec.email = 'djberg96@gmail.com'
|
9
|
+
spec.homepage = 'http://github.com/djberg96/win32-ipc'
|
10
|
+
spec.summary = 'An abstract base class for Windows synchronization objects.'
|
11
|
+
spec.test_file = 'test/test_win32_ipc.rb'
|
12
|
+
spec.files = Dir['**/*'].reject{ |f| f.include?('git') }
|
13
|
+
spec.cert_chain = ['certs/djberg96_pub.pem']
|
14
|
+
|
15
|
+
spec.extra_rdoc_files = ['README', 'CHANGES', 'MANIFEST']
|
16
|
+
|
17
|
+
spec.add_dependency('ffi')
|
18
|
+
spec.add_development_dependency('test-unit')
|
19
|
+
|
20
|
+
spec.description = <<-EOF
|
21
|
+
The win32-ipc library provides the Win32::IPC class. This is meant to
|
22
|
+
serve as an abstract base class for other IPC related libraries for MS
|
23
|
+
Windows, such as win32-semaphore, win32-event, and so on.
|
24
|
+
EOF
|
25
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: win32-ipc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel J. Berger
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
EJYzxdPOrx2n6NYR3Hk+vHP0U7UBSveI6+qx+ndQYaeyCn+GRX2PKS9h66YF/Q1V
|
32
32
|
tGSHgAmcLlkdGgan182qsE/4kKM=
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date:
|
34
|
+
date: 2016-06-23 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: ffi
|
@@ -73,18 +73,22 @@ extra_rdoc_files:
|
|
73
73
|
- CHANGES
|
74
74
|
- MANIFEST
|
75
75
|
files:
|
76
|
+
- certs
|
77
|
+
- certs/djberg96_pub.pem
|
76
78
|
- CHANGES
|
79
|
+
- lib
|
80
|
+
- lib/win32
|
81
|
+
- lib/win32/ipc.rb
|
82
|
+
- lib/win32-ipc.rb
|
77
83
|
- MANIFEST
|
78
|
-
- README
|
79
84
|
- Rakefile
|
80
|
-
-
|
81
|
-
-
|
82
|
-
- lib/win32/ipc.rb
|
85
|
+
- README
|
86
|
+
- test
|
83
87
|
- test/test_win32_ipc.rb
|
84
88
|
- win32-ipc.gemspec
|
85
89
|
homepage: http://github.com/djberg96/win32-ipc
|
86
90
|
licenses:
|
87
|
-
-
|
91
|
+
- Apache 2.0
|
88
92
|
metadata: {}
|
89
93
|
post_install_message:
|
90
94
|
rdoc_options: []
|
@@ -102,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
106
|
version: '0'
|
103
107
|
requirements: []
|
104
108
|
rubyforge_project:
|
105
|
-
rubygems_version: 2.4
|
109
|
+
rubygems_version: 2.6.4
|
106
110
|
signing_key:
|
107
111
|
specification_version: 4
|
108
112
|
summary: An abstract base class for Windows synchronization objects.
|
metadata.gz.sig
CHANGED
Binary file
|