duoconsole 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.
- data/lib/duoconsole.rb +10 -0
- metadata +2 -2
data/lib/duoconsole.rb
CHANGED
@@ -101,7 +101,17 @@ class Duoconsole
|
|
101
101
|
|
102
102
|
def send msg
|
103
103
|
socket.write(msg)
|
104
|
+
recv
|
105
|
+
end
|
106
|
+
|
107
|
+
def recv
|
108
|
+
socket.recv(1000)
|
109
|
+
rescue IRB::Abort => e
|
110
|
+
# IRB::Abort is triggered by ctrl-c
|
111
|
+
# When raise, we didn't get to recv message returned from this run
|
112
|
+
# Clear it out now so that it won't be in the buffer for next run
|
104
113
|
socket.recv(1000)
|
114
|
+
raise e
|
105
115
|
end
|
106
116
|
|
107
117
|
def method_missing(m, *args, &block)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: duoconsole
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
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: 2012-12-
|
12
|
+
date: 2012-12-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|