win32-pipe 0.3.7 → 0.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b1572a543a4cf5a0fead04fcb17d1ebd6343b8e5
4
- data.tar.gz: d98b3919225b3822fbc52e65e6a8dc4f1ab2f00b
3
+ metadata.gz: 4ce1ca9769e6df7f9758f67985198f2eb5fc6458
4
+ data.tar.gz: 273f57ab1a1cc3865ab234f773a694cea259cb34
5
5
  SHA512:
6
- metadata.gz: 16d34e937672af8fd001d043a6bf7ae67dc5c8cb04f2a0837f063ccadef027c815078673a2dfe3177cb55cc42fce1449c37ced301857416e5c0340bcc9b11bfe
7
- data.tar.gz: e8d62266689176b0f1628c8bff6c703109b66186f8048bcaefe9991595b83b0385b67dd5fa864a2cbc923accec89ba6401240f787c3e2b13a2713f10d25dc5b4
6
+ metadata.gz: 500674a4be715d61438ca8b109ba1460911189148628e4d50054698fd7f214ae43899e28c2396481183407f4670144158830817d7403eb3c07dc5907c73e735c
7
+ data.tar.gz: 18994e54c58746e2adafc445e500be42f659e0ceec59caa3c9018604313889de3005c9d8e3d76f503bedfc909ef852ba63da2c72a0124b0d8beb576b6ae421bf
Binary file
data.tar.gz.sig CHANGED
@@ -1,2 +1,2 @@
1
- �LQ�;��پ~iXf ������w��T=���w
2
- ���{���XMF�9��e��[��?a;���ml*y� �2�!��Ah� �;u���^,���Ry/D4 oR�a#>푑],lJ�?�9kU�� ��3��W !����9��z���7=��Wy���*W
1
+ %�P�תPL?&�H�sOv�q��V
2
+ �]��>r�2kdת{�͚ oް� �Čt���+�6�:���ё|%�f+"���G����o�ʛ@po��i\ D�)� c�$����`�%Up{�d6"j.XVuvp$x+�Lf��tT]���;��&��1���ϩ���!e���ރef
data/CHANGES CHANGED
@@ -1,3 +1,8 @@
1
+ == 0.4.0 - 19-Jun-2016
2
+ * License changed to Apache 2.0.
3
+ * The Pipe#read method now accepts an optional length. Thanks go to
4
+ Ritta Narita for the patch.
5
+
1
6
  == 0.3.7 - 24-Nov-2015
2
7
  * Fixed two function prototypes where I mistakenly specified :bool instead
3
8
  of :int, and updated the underlying code to match.
@@ -16,7 +16,7 @@ module Win32
16
16
  class Error < StandardError; end
17
17
 
18
18
  # The version of this library
19
- VERSION = '0.3.7'
19
+ VERSION = '0.4.0'
20
20
 
21
21
  DEFAULT_PIPE_BUFFER_SIZE = 4096 #:nodoc:
22
22
  PIPE_TIMEOUT = 5000 #:nodoc:
@@ -143,13 +143,13 @@ module Win32
143
143
  # Reads data from the pipe. You can read data from either end of a named
144
144
  # pipe.
145
145
  #
146
- def read
146
+ def read(read_size = @ffi_buffer.size)
147
147
  bytes = FFI::MemoryPointer.new(:ulong)
148
148
 
149
149
  raise Error, "no pipe created" unless @pipe
150
150
 
151
151
  if @asynchronous
152
- bool = ReadFile(@pipe, @ffi_buffer, @ffi_buffer.size, bytes, @overlapped)
152
+ bool = ReadFile(@pipe, @ffi_buffer, read_size, bytes, @overlapped)
153
153
  bytes_read = bytes.read_ulong
154
154
 
155
155
  if bool && bytes_read > 0
@@ -166,7 +166,7 @@ module Win32
166
166
 
167
167
  return false
168
168
  else
169
- unless ReadFile(@pipe, @ffi_buffer, @ffi_buffer.size, bytes, nil)
169
+ unless ReadFile(@pipe, @ffi_buffer, read_size, bytes, nil)
170
170
  raise SystemCallError.new("ReadFile", FFI.errno)
171
171
  end
172
172
  @buffer = @ffi_buffer.get_string(0, bytes.read_ulong)
@@ -14,7 +14,7 @@ class TC_Win32_Pipe < Test::Unit::TestCase
14
14
  end
15
15
 
16
16
  test "version is set to expected value" do
17
- assert_equal('0.3.7', Pipe::VERSION)
17
+ assert_equal('0.4.0', Pipe::VERSION)
18
18
  end
19
19
 
20
20
  test "name method basic functionality" do
@@ -2,9 +2,9 @@ require 'rubygems'
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'win32-pipe'
5
- spec.version = '0.3.7'
5
+ spec.version = '0.4.0'
6
6
  spec.author = 'Daniel J. Berger'
7
- spec.license = 'Artistic 2.0'
7
+ spec.license = 'Apache 2.0'
8
8
  spec.email = 'djberg96@gmail.com'
9
9
  spec.homepage = 'https://github.com/djberg96/win32-pipe'
10
10
  spec.summary = 'An interface for named pipes on MS Windows'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: win32-pipe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel J. Berger
@@ -30,7 +30,7 @@ cert_chain:
30
30
  EJYzxdPOrx2n6NYR3Hk+vHP0U7UBSveI6+qx+ndQYaeyCn+GRX2PKS9h66YF/Q1V
31
31
  tGSHgAmcLlkdGgan182qsE/4kKM=
32
32
  -----END CERTIFICATE-----
33
- date: 2015-11-24 00:00:00.000000000 Z
33
+ date: 2016-06-19 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: ffi
@@ -114,7 +114,7 @@ files:
114
114
  - win32-pipe.gemspec
115
115
  homepage: https://github.com/djberg96/win32-pipe
116
116
  licenses:
117
- - Artistic 2.0
117
+ - Apache 2.0
118
118
  metadata: {}
119
119
  post_install_message:
120
120
  rdoc_options: []
@@ -132,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
132
  version: '0'
133
133
  requirements: []
134
134
  rubyforge_project:
135
- rubygems_version: 2.4.8
135
+ rubygems_version: 2.6.4
136
136
  signing_key:
137
137
  specification_version: 4
138
138
  summary: An interface for named pipes on MS Windows
metadata.gz.sig CHANGED
@@ -1 +1,2 @@
1
- ��0�-���s�.��)��WX��(�|�3
1
+ FoõdB�a*j�u��f�
2
+ R��K5��H�7�(��#k��<��J�|����֝'f���6m2���ĭ�yЀ�^�Z�u��5oڕ$S 5��6f����-�8 �$