async-io 1.13.0 → 1.14.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
  SHA256:
3
- metadata.gz: 71c04e110e0ca7bf28d0066c8ea5d9efc5286a61533a8d713a0b27ce2721af57
4
- data.tar.gz: 675aa3d7916f0da52fffb46d2d36879501b060bb4e362a3d4bdbd12a9b196044
3
+ metadata.gz: '08ed02b9fabc43bcd20e61f50473ee0606a821b7e655710805da340164cb7c2d'
4
+ data.tar.gz: 2275335c17c84fb21fdd70275c6108a184c513e4eeb92d0fbd1140b683112f10
5
5
  SHA512:
6
- metadata.gz: ca06ea7ac6ccc5d9f957789dee7f6d5ba4d87a727123ae9b57d676ab1d921658e1657cb10362adcba2fd749249d8be419369b49213e17af329acc6aaecbd2d3a
7
- data.tar.gz: 59bc63d72e63db1f555d5753f3f3d7c497749a619b0acc1e42c32e926ffc4125409571d9f3cad249f2f69a34cdaf3bdf8366efc94b2f0084e479a8fd5b2797a6
6
+ metadata.gz: 944f73030f9c9134b8a209eda2fdd8afb9b438c2c8a52085c250a8a695c9e546cbe65447b96c09caa8b7699a0c0a742b24fdabb574d1b56b37fee323a59a3017
7
+ data.tar.gz: c7b5d911865071df5a711269547388d13e2dcdd0ad5fd685b1545ff334d7d0d18d6a93efec111eac7203eca0fb58a5349f44a5aa1bd3123bc27f3b947dcdefe4
data/async-io.gemspec CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
  spec.homepage = "https://github.com/socketry/async-io"
12
12
 
13
13
  spec.files = `git ls-files`.split($/)
14
- spec.executables = spec.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
14
+ spec.executables = spec.files.grep(%r{^bin/}).map{|f| File.basename(f)}
15
15
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
16
16
  spec.require_paths = ["lib"]
17
17
  spec.has_rdoc = "yard"
@@ -0,0 +1,43 @@
1
+ # Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
+ #
3
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ # of this software and associated documentation files (the "Software"), to deal
5
+ # in the Software without restriction, including without limitation the rights
6
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ # copies of the Software, and to permit persons to whom the Software is
8
+ # furnished to do so, subject to the following conditions:
9
+ #
10
+ # The above copyright notice and this permission notice shall be included in
11
+ # all copies or substantial portions of the Software.
12
+ #
13
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ # THE SOFTWARE.
20
+
21
+ require_relative '../stream'
22
+
23
+ module Async
24
+ module IO
25
+ module Protocol
26
+ class Generic
27
+ def initialize(stream)
28
+ @stream = stream
29
+ end
30
+
31
+ def closed?
32
+ @stream.closed?
33
+ end
34
+
35
+ def close
36
+ @stream.close
37
+ end
38
+
39
+ attr :stream
40
+ end
41
+ end
42
+ end
43
+ end
@@ -18,22 +18,18 @@
18
18
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
19
  # THE SOFTWARE.
20
20
 
21
- require_relative '../stream'
21
+ require_relative 'generic'
22
22
 
23
23
  module Async
24
24
  module IO
25
25
  module Protocol
26
- class Line
26
+ class Line < Generic
27
27
  def initialize(stream, eol = $/)
28
- @stream = stream
28
+ super(stream)
29
+
29
30
  @eol = eol
30
31
  end
31
32
 
32
- def close
33
- @stream.close
34
- end
35
-
36
- attr :stream
37
33
  attr :eol
38
34
 
39
35
  def write_lines(*args)
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Async
22
22
  module IO
23
- VERSION = "1.13.0"
23
+ VERSION = "1.14.0"
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async-io
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.13.0
4
+ version: 1.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-09 00:00:00.000000000 Z
11
+ date: 2018-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async
@@ -111,6 +111,7 @@ files:
111
111
  - lib/async/io/generic.rb
112
112
  - lib/async/io/host_endpoint.rb
113
113
  - lib/async/io/notification.rb
114
+ - lib/async/io/protocol/generic.rb
114
115
  - lib/async/io/protocol/line.rb
115
116
  - lib/async/io/shared_endpoint.rb
116
117
  - lib/async/io/socket.rb