virb 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/virb/default.rb +8 -7
- data/lib/virb/pry.rb +9 -7
- data/lib/virb/version.rb +1 -1
- metadata +2 -2
data/lib/virb/default.rb
CHANGED
@@ -22,13 +22,6 @@ require "irb/ruby-lex"
|
|
22
22
|
require "irb/input-method"
|
23
23
|
require "irb/locale"
|
24
24
|
|
25
|
-
`rm -rf .virb`
|
26
|
-
`mkdir -p .virb`
|
27
|
-
unless File.exist?('.virb/fifo')
|
28
|
-
`mkfifo .virb/fifo`
|
29
|
-
end
|
30
|
-
`touch .virb/session`
|
31
|
-
|
32
25
|
STDOUT.sync = true
|
33
26
|
|
34
27
|
$outfile = '.virb/session'
|
@@ -165,6 +158,14 @@ module IRB
|
|
165
158
|
class Irb
|
166
159
|
def initialize(workspace = nil, input_method = StdioInputMethod.new , output_method = nil)
|
167
160
|
|
161
|
+
`rm -rf .virb`
|
162
|
+
`mkdir -p .virb`
|
163
|
+
unless File.exist?('.virb/fifo')
|
164
|
+
`mkfifo .virb/fifo`
|
165
|
+
end
|
166
|
+
`touch .virb/session`
|
167
|
+
|
168
|
+
|
168
169
|
# input_method is hard to override
|
169
170
|
|
170
171
|
@context = Context.new(self, workspace, input_method, output_method)
|
data/lib/virb/pry.rb
CHANGED
@@ -1,10 +1,3 @@
|
|
1
|
-
`rm -rf .virb`
|
2
|
-
`mkdir -p .virb`
|
3
|
-
unless File.exist?('.virb/fifo')
|
4
|
-
`mkfifo .virb/fifo`
|
5
|
-
end
|
6
|
-
`touch .virb/session`
|
7
|
-
|
8
1
|
module Virb
|
9
2
|
class Pry
|
10
3
|
class Fifo
|
@@ -12,12 +5,21 @@ module Virb
|
|
12
5
|
reinit_fifo
|
13
6
|
end
|
14
7
|
def reinit_fifo
|
8
|
+
|
9
|
+
`rm -rf .virb`
|
10
|
+
`mkdir -p .virb`
|
11
|
+
unless File.exist?('.virb/fifo')
|
12
|
+
`mkfifo .virb/fifo`
|
13
|
+
end
|
14
|
+
`touch .virb/session`
|
15
|
+
|
15
16
|
fd = IO.sysopen(".virb/fifo")
|
16
17
|
@io = IO.new(fd, 'r')
|
17
18
|
end
|
18
19
|
def readline(current_prompt)
|
19
20
|
$stdout.print current_prompt
|
20
21
|
if @io.eof?
|
22
|
+
@io.close
|
21
23
|
reinit_fifo
|
22
24
|
end
|
23
25
|
x = @io.gets
|
data/lib/virb/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: virb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-01-
|
12
|
+
date: 2013-01-08 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: A Vim shell for irb and rails console
|
15
15
|
email:
|