net-protocol 0.1.1 → 0.1.2
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
- data/Rakefile +1 -1
- data/lib/net/protocol.rb +6 -7
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: d8e88ea7a722bbf9b9d0f2fa612bfde5c5208878e180f5a26516b1df9b034f17
         | 
| 4 | 
            +
              data.tar.gz: 9062b0fea9900d450c8b2384ba2bdc3a56296b3e77a8cf32a5eae11ce5af782f
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 8206f5d99416bbd72b390819fe5193dddde16b6b0d4f5bfa7fa99fc6d99ed79f1c5e2dab0da13009d27087d483d13e92d48a92ca4db853f1f531a0f884afdad9
         | 
| 7 | 
            +
              data.tar.gz: b9881f6507c2f67f24bc60034397644745e090194a5443093a9f655008bd4db8281e6a49bf76aea135b12bb534bc230866aef80c784a67e72cd024567dcfdee3
         | 
    
        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/ | 
| 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. | 
| 29 | 
            +
                VERSION = "0.1.2"
         | 
| 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 | 
| 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( | 
| 451 | 
            -
                  @ | 
| 452 | 
            -
                  @method_id = method
         | 
| 450 | 
            +
                def initialize(writer)
         | 
| 451 | 
            +
                  @writer = writer
         | 
| 453 452 | 
             
                end
         | 
| 454 453 |  | 
| 455 454 | 
             
                def inspect
         | 
| 456 | 
            -
                  "#<#{self.class}  | 
| 455 | 
            +
                  "#<#{self.class} writer=#{@writer.inspect}>"
         | 
| 457 456 | 
             
                end
         | 
| 458 457 |  | 
| 459 458 | 
             
                def write(str)
         | 
| 460 | 
            -
                  @ | 
| 459 | 
            +
                  @writer.call(str)
         | 
| 461 460 | 
             
                end
         | 
| 462 461 |  | 
| 463 462 | 
             
                alias print write
         | 
    
        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. | 
| 4 | 
            +
              version: 0.1.2
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Yukihiro Matsumoto
         | 
| 8 8 | 
             
            autorequire:
         | 
| 9 9 | 
             
            bindir: exe
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2021- | 
| 11 | 
            +
            date: 2021-10-21 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: timeout
         |