net-protocol 0.1.1 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 92337fd3b9dd8606934c4268df73d181c6e01415cbb46d351fa3aea9efa916f7
4
- data.tar.gz: 844f8cc3ea230ffbd36bfa8a659d8e41623123f1b9de1eba5c5844986d6093a9
3
+ metadata.gz: 426f967c28318d12339c67a1c40db52f25167a546e5760947c2f4653d946aa08
4
+ data.tar.gz: 1a536d8d45be996ec1bbf72443adb8aa9aaf9951c7f70366539c836af7836dd6
5
5
  SHA512:
6
- metadata.gz: 0a4fd46f1b109a518d98d3da922a5fdbc0a62ca425e0a4e80df355a3c3ad63473c93a07068ffe92f8a4d233930344ffa353e599b6993a568ccc5cfb2b8365249
7
- data.tar.gz: 9f3be01d495d0077b40ded12a6f3dfc9eb2f65fed8e883447340c3ac2208c8e715f1fdc0e9aabd193143bee5cd7a01ceeffe4f5f39d8b8f09346b51414ed4f92
6
+ metadata.gz: 4be52fa68351db428b2e0fadfb65965bae7c5e4b7dffda269cf9d9086d7f5ac91cb9c4a399788f6c7ed515be85ecb9c01e0feee94737b60a758c44438372d85b
7
+ data.tar.gz: e282e7f623600edbe1590a390cec89f6a93f0a26226d9567decad7c0f0a890d9971fc6223b8f5698894edf493c586b2b055f67af0ea14471f7c0f5a894e04b46
@@ -0,0 +1,6 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: 'github-actions'
4
+ directory: '/'
5
+ schedule:
6
+ interval: 'weekly'
@@ -7,16 +7,15 @@ jobs:
7
7
  name: build (${{ matrix.ruby }} / ${{ matrix.os }})
8
8
  strategy:
9
9
  matrix:
10
- ruby: [ '3.0', 2.7, 2.6, 2.5, 2.4, head ]
10
+ ruby: [ head, '3.1', '3.0', '2.7', '2.6' ]
11
11
  os: [ ubuntu-latest, macos-latest ]
12
12
  runs-on: ${{ matrix.os }}
13
13
  steps:
14
- - uses: actions/checkout@v2
14
+ - uses: actions/checkout@v3
15
15
  - name: Set up Ruby
16
16
  uses: ruby/setup-ruby@v1
17
17
  with:
18
18
  ruby-version: ${{ matrix.ruby }}
19
- - name: Install dependencies
20
- run: bundle install
19
+ bundler-cache: true # 'bundle install' and cache gems
21
20
  - name: Run test
22
- run: rake test
21
+ run: bundle exec rake test
data/Rakefile CHANGED
@@ -9,7 +9,7 @@ end
9
9
 
10
10
  task :sync_tool do
11
11
  require 'fileutils'
12
- FileUtils.cp "../ruby/tool/lib/test/unit/core_assertions.rb", "./test/lib"
12
+ FileUtils.cp "../ruby/tool/lib/core_assertions.rb", "./test/lib"
13
13
  FileUtils.cp "../ruby/tool/lib/envutil.rb", "./test/lib"
14
14
  FileUtils.cp "../ruby/tool/lib/find_executable.rb", "./test/lib"
15
15
  end
data/lib/net/protocol.rb CHANGED
@@ -26,7 +26,7 @@ require 'io/wait'
26
26
  module Net # :nodoc:
27
27
 
28
28
  class Protocol #:nodoc: internal use only
29
- VERSION = "0.1.1"
29
+ VERSION = "0.1.3"
30
30
 
31
31
  private
32
32
  def Protocol.protocol_param(name, val)
@@ -383,7 +383,7 @@ module Net # :nodoc:
383
383
  len = writing {
384
384
  using_each_crlf_line {
385
385
  begin
386
- block.call(WriteAdapter.new(self, :write_message_0))
386
+ block.call(WriteAdapter.new(self.method(:write_message_0)))
387
387
  rescue LocalJumpError
388
388
  # allow `break' from writer block
389
389
  end
@@ -447,17 +447,16 @@ module Net # :nodoc:
447
447
  # The writer adapter class
448
448
  #
449
449
  class WriteAdapter
450
- def initialize(socket, method)
451
- @socket = socket
452
- @method_id = method
450
+ def initialize(writer)
451
+ @writer = writer
453
452
  end
454
453
 
455
454
  def inspect
456
- "#<#{self.class} socket=#{@socket.inspect}>"
455
+ "#<#{self.class} writer=#{@writer.inspect}>"
457
456
  end
458
457
 
459
458
  def write(str)
460
- @socket.__send__(@method_id, str)
459
+ @writer.call(str)
461
460
  end
462
461
 
463
462
  alias print write
data/net-protocol.gemspec CHANGED
@@ -13,10 +13,10 @@ Gem::Specification.new do |spec|
13
13
  spec.authors = ["Yukihiro Matsumoto"]
14
14
  spec.email = ["matz@ruby-lang.org"]
15
15
 
16
- spec.summary = %q{The abstruct interface for net-* client.}
17
- spec.description = %q{The abstruct interface for net-* client.}
16
+ spec.summary = %q{The abstract interface for net-* client.}
17
+ spec.description = %q{The abstract interface for net-* client.}
18
18
  spec.homepage = "https://github.com/ruby/net-protocol"
19
- spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
19
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.6.0")
20
20
  spec.licenses = ["Ruby", "BSD-2-Clause"]
21
21
 
22
22
  spec.metadata["homepage_uri"] = spec.homepage
@@ -27,10 +27,7 @@ Gem::Specification.new do |spec|
27
27
  spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
28
28
  `git ls-files -z 2>/dev/null`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
29
29
  end
30
- spec.bindir = "exe"
31
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
32
30
  spec.require_paths = ["lib"]
33
31
 
34
32
  spec.add_dependency "timeout"
35
- spec.add_dependency "io-wait"
36
33
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: net-protocol
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yukihiro Matsumoto
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-31 00:00:00.000000000 Z
11
+ date: 2022-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: timeout
@@ -24,31 +24,17 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: io-wait
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- description: The abstruct interface for net-* client.
27
+ description: The abstract interface for net-* client.
42
28
  email:
43
29
  - matz@ruby-lang.org
44
30
  executables: []
45
31
  extensions: []
46
32
  extra_rdoc_files: []
47
33
  files:
34
+ - ".github/dependabot.yml"
48
35
  - ".github/workflows/test.yml"
49
36
  - ".gitignore"
50
37
  - Gemfile
51
- - Gemfile.lock
52
38
  - LICENSE.txt
53
39
  - README.md
54
40
  - Rakefile
@@ -71,15 +57,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
71
57
  requirements:
72
58
  - - ">="
73
59
  - !ruby/object:Gem::Version
74
- version: 2.3.0
60
+ version: 2.6.0
75
61
  required_rubygems_version: !ruby/object:Gem::Requirement
76
62
  requirements:
77
63
  - - ">="
78
64
  - !ruby/object:Gem::Version
79
65
  version: '0'
80
66
  requirements: []
81
- rubygems_version: 3.3.0.dev
67
+ rubygems_version: 3.4.0.dev
82
68
  signing_key:
83
69
  specification_version: 4
84
- summary: The abstruct interface for net-* client.
70
+ summary: The abstract interface for net-* client.
85
71
  test_files: []
data/Gemfile.lock DELETED
@@ -1,23 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- net-protocol (0.1.0)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- power_assert (1.1.5)
10
- rake (12.3.3)
11
- test-unit (3.3.5)
12
- power_assert
13
-
14
- PLATFORMS
15
- ruby
16
-
17
- DEPENDENCIES
18
- net-protocol!
19
- rake
20
- test-unit
21
-
22
- BUNDLED WITH
23
- 2.1.4