nrepl-lazuli 0.1.0 → 0.1.1
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/lib/nrepl/fake_stdout.rb +31 -3
 - data/lib/nrepl/server.rb +2 -2
 - metadata +3 -3
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: e8c7b738b28d8706af9ab59acf572433ead185ba273a7112628cff68c8125c7f
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 9c7aac117b7990da308c140a00623c5e8fa641c10e1caa72c68105dd8606ffad
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 667c1a317abc19e990c5c8d98426101ec26145e0d2c468d089714739844ea8d8acad01aaf4b048552a6198a0d3505ac4d29e7898dde42c1a4898712143bf726c
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: e4c9bb03661a59935a37d77dc348beb0053e99776aacdf10b89a83694dbc7eddd4d14cb27ccbe352921de332d8bdbeeb144a245a8285a424715aec9407b15adf
         
     | 
    
        data/lib/nrepl/fake_stdout.rb
    CHANGED
    
    | 
         @@ -1,18 +1,46 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            module NREPL
         
     | 
| 
       2 
2 
     | 
    
         
             
              class FakeStdout
         
     | 
| 
       3 
     | 
    
         
            -
                def initialize(connections, kind)
         
     | 
| 
      
 3 
     | 
    
         
            +
                def initialize(connections, io, kind)
         
     | 
| 
       4 
4 
     | 
    
         
             
                  @connections = connections
         
     | 
| 
      
 5 
     | 
    
         
            +
                  @io = io
         
     | 
| 
       5 
6 
     | 
    
         
             
                  @kind = kind
         
     | 
| 
       6 
7 
     | 
    
         
             
                end
         
     | 
| 
       7 
8 
     | 
    
         | 
| 
      
 9 
     | 
    
         
            +
                def <<(text)
         
     | 
| 
      
 10 
     | 
    
         
            +
                  print(text)
         
     | 
| 
      
 11 
     | 
    
         
            +
                end
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
                def print(text)
         
     | 
| 
      
 14 
     | 
    
         
            +
                  write(text.to_s)
         
     | 
| 
      
 15 
     | 
    
         
            +
                end
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
                def puts(text)
         
     | 
| 
      
 18 
     | 
    
         
            +
                  write("#{text}\n")
         
     | 
| 
      
 19 
     | 
    
         
            +
                end
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
       8 
21 
     | 
    
         
             
                def write(text)
         
     | 
| 
       9 
     | 
    
         
            -
                   
     | 
| 
       10 
     | 
    
         
            -
                  STDOUT.write(text)
         
     | 
| 
      
 22 
     | 
    
         
            +
                  @io.write(text)
         
     | 
| 
       11 
23 
     | 
    
         
             
                  @connections.each do |conn|
         
     | 
| 
       12 
24 
     | 
    
         
             
                    conn.send_msg(
         
     | 
| 
       13 
25 
     | 
    
         
             
                      @kind => text
         
     | 
| 
       14 
26 
     | 
    
         
             
                    )
         
     | 
| 
       15 
27 
     | 
    
         
             
                  end
         
     | 
| 
       16 
28 
     | 
    
         
             
                end
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
                def flush
         
     | 
| 
      
 31 
     | 
    
         
            +
                  @io.flush
         
     | 
| 
      
 32 
     | 
    
         
            +
                end
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
                def close
         
     | 
| 
      
 35 
     | 
    
         
            +
                  @io.close
         
     | 
| 
      
 36 
     | 
    
         
            +
                end
         
     | 
| 
      
 37 
     | 
    
         
            +
             
     | 
| 
      
 38 
     | 
    
         
            +
                def sync
         
     | 
| 
      
 39 
     | 
    
         
            +
                  @io.sync
         
     | 
| 
      
 40 
     | 
    
         
            +
                end
         
     | 
| 
      
 41 
     | 
    
         
            +
             
     | 
| 
      
 42 
     | 
    
         
            +
                def sync=(val)
         
     | 
| 
      
 43 
     | 
    
         
            +
                  @io.sync = val
         
     | 
| 
      
 44 
     | 
    
         
            +
                end
         
     | 
| 
       17 
45 
     | 
    
         
             
              end
         
     | 
| 
       18 
46 
     | 
    
         
             
            end
         
     | 
    
        data/lib/nrepl/server.rb
    CHANGED
    
    | 
         @@ -36,8 +36,8 @@ module NREPL 
     | 
|
| 
       36 
36 
     | 
    
         
             
                  puts "Running in debug mode" if debug?
         
     | 
| 
       37 
37 
     | 
    
         
             
                  record_port
         
     | 
| 
       38 
38 
     | 
    
         | 
| 
       39 
     | 
    
         
            -
                  $stdout = FakeStdout.new(@connections, "out")
         
     | 
| 
       40 
     | 
    
         
            -
                  $stderr = FakeStdout.new(@connections, "err")
         
     | 
| 
      
 39 
     | 
    
         
            +
                  $stdout = FakeStdout.new(@connections, STDOUT, "out")
         
     | 
| 
      
 40 
     | 
    
         
            +
                  $stderr = FakeStdout.new(@connections, STDERR, "err")
         
     | 
| 
       41 
41 
     | 
    
         | 
| 
       42 
42 
     | 
    
         
             
                  Signal.trap("INT") { stop }
         
     | 
| 
       43 
43 
     | 
    
         
             
                  Signal.trap("TERM") { stop }
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: nrepl-lazuli
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.1. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.1.1
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Maurício Szabo
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2024-03- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2024-03-19 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: bencode
         
     | 
| 
         @@ -54,7 +54,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       54 
54 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       55 
55 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       56 
56 
     | 
    
         
             
            requirements: []
         
     | 
| 
       57 
     | 
    
         
            -
            rubygems_version: 3. 
     | 
| 
      
 57 
     | 
    
         
            +
            rubygems_version: 3.5.3
         
     | 
| 
       58 
58 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       59 
59 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       60 
60 
     | 
    
         
             
            summary: A Ruby nREPL server
         
     |