nrepl-lazuli 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/nrepl/fake_stdout.rb +38 -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: e9806d1a707607c97f52c191fe34e6027fd58740ada2692d5f998e5d81e9e2e2
|
4
|
+
data.tar.gz: fbaa80613144afaa7cd5c0d56db8d0655819008895fc10a59904a1980dae033c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa9bbcfed7f0fb97e91805297589ab1341553d82372caf318e1118332bf1e74e4e39898cce008af093f10e2678f75505d82e4502c8b42f887ef6d75823f0cf36
|
7
|
+
data.tar.gz: 1fc41134491cd81daa30bf1148c9c1ce09644922d4342e4745cc48b56ab009be68784874d0e6ef34d946ae43dd90b237d7910bf60c4198fb125860987d196cc5
|
data/lib/nrepl/fake_stdout.rb
CHANGED
@@ -1,18 +1,53 @@
|
|
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
|
+
nil
|
12
|
+
end
|
13
|
+
|
14
|
+
def print(text)
|
15
|
+
write(text.to_s)
|
16
|
+
nil
|
17
|
+
end
|
18
|
+
|
19
|
+
def puts(text)
|
20
|
+
write("#{text}\n")
|
21
|
+
nil
|
22
|
+
end
|
23
|
+
|
24
|
+
def method_missing(method, *)
|
25
|
+
@io.send(method, *)
|
26
|
+
end
|
27
|
+
|
8
28
|
def write(text)
|
9
|
-
|
10
|
-
STDOUT.write(text)
|
29
|
+
@io.write(text)
|
11
30
|
@connections.each do |conn|
|
12
31
|
conn.send_msg(
|
13
32
|
@kind => text
|
14
33
|
)
|
15
34
|
end
|
16
35
|
end
|
36
|
+
|
37
|
+
def flush
|
38
|
+
@io.flush
|
39
|
+
end
|
40
|
+
|
41
|
+
def close
|
42
|
+
@io.close
|
43
|
+
end
|
44
|
+
|
45
|
+
def sync
|
46
|
+
@io.sync
|
47
|
+
end
|
48
|
+
|
49
|
+
def sync=(val)
|
50
|
+
@io.sync = val
|
51
|
+
end
|
17
52
|
end
|
18
53
|
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.2
|
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-22 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
|