theine 0.0.5 → 0.0.6
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.
- data/lib/theine/client.rb +10 -3
- data/lib/theine/worker.rb +2 -4
- metadata +1 -1
data/lib/theine/client.rb
CHANGED
@@ -30,6 +30,12 @@ class IOUndumpedProxy
|
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
+
def readline_arity
|
34
|
+
method(:readline).arity
|
35
|
+
rescue NameError
|
36
|
+
0
|
37
|
+
end
|
38
|
+
|
33
39
|
def gets(*args)
|
34
40
|
@obj.gets(*args)
|
35
41
|
end
|
@@ -122,9 +128,10 @@ module Theine
|
|
122
128
|
end
|
123
129
|
|
124
130
|
def redirect_io
|
125
|
-
|
126
|
-
@worker.
|
127
|
-
@worker.
|
131
|
+
# Need to be careful that these don't get garbage collected
|
132
|
+
$stdin_undumped = @worker.stdin = IOUndumpedProxy.new($stdin)
|
133
|
+
$stdout_undumped = @worker.stdout = IOUndumpedProxy.new($stdout)
|
134
|
+
$stderr_undumped = @worker.stderr = IOUndumpedProxy.new($stderr)
|
128
135
|
end
|
129
136
|
|
130
137
|
def connect_worker
|
data/lib/theine/worker.rb
CHANGED
@@ -24,9 +24,7 @@ module Theine
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def readline_arity
|
27
|
-
input.
|
28
|
-
rescue NameError
|
29
|
-
0
|
27
|
+
input.readline_arity
|
30
28
|
end
|
31
29
|
|
32
30
|
def gets(*args)
|
@@ -45,7 +43,7 @@ module Theine
|
|
45
43
|
ARGV.concat(argv)
|
46
44
|
|
47
45
|
require 'pry'
|
48
|
-
::Rails.application.config.console = Pry
|
46
|
+
::Rails.application.config.console = ::Pry
|
49
47
|
pry_setup
|
50
48
|
|
51
49
|
require 'rails/commands'
|