expectr 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/expectr.gemspec +2 -2
- data/lib/expectr.rb +7 -4
- metadata +11 -11
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.8.0
|
data/expectr.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "expectr"
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.8.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Chris Wuest"]
|
12
|
-
s.date = "2012-
|
12
|
+
s.date = "2012-04-24"
|
13
13
|
s.description = "Implementation of functionality from NIST Expect in Ruby, with an emphasis on control and extensibility"
|
14
14
|
s.email = "chris@chriswuest.com"
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/expectr.rb
CHANGED
@@ -184,11 +184,13 @@ class Expectr
|
|
184
184
|
# Relinquish control of the running process to the controlling terminal,
|
185
185
|
# acting simply as a pass-through for the life of the process.
|
186
186
|
#
|
187
|
-
#
|
188
|
-
#
|
189
|
-
# * Interrupts are not handled and passed through to the application
|
187
|
+
# Interrupts should be caught and sent to the application.
|
190
188
|
#
|
191
189
|
def interact
|
190
|
+
oldtrap = trap 'INT' do
|
191
|
+
@stdin.syswrite "\C-c"
|
192
|
+
end
|
193
|
+
|
192
194
|
@flush_buffer = true
|
193
195
|
old_tty = `stty -g`
|
194
196
|
`stty -icanon min 1 time 0 -echo`
|
@@ -197,12 +199,13 @@ class Expectr
|
|
197
199
|
input = ''
|
198
200
|
while @pid > 0
|
199
201
|
if select([STDIN], nil, nil, 1)
|
200
|
-
@stdin.syswrite
|
202
|
+
@stdin.syswrite STDIN.getc
|
201
203
|
end
|
202
204
|
end
|
203
205
|
end
|
204
206
|
|
205
207
|
in_thread.join
|
208
|
+
trap 'INT', oldtrap
|
206
209
|
`stty #{old_tty}`
|
207
210
|
return nil
|
208
211
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: expectr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-04-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: shoulda
|
16
|
-
requirement: &
|
16
|
+
requirement: &21332720 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *21332720
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rdoc
|
27
|
-
requirement: &
|
27
|
+
requirement: &21331520 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '3.12'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *21331520
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: bundler
|
38
|
-
requirement: &
|
38
|
+
requirement: &21330660 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 1.0.0
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *21330660
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: jeweler
|
49
|
-
requirement: &
|
49
|
+
requirement: &21329400 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
version: 1.8.3
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *21329400
|
58
58
|
description: Implementation of functionality from NIST Expect in Ruby, with an emphasis
|
59
59
|
on control and extensibility
|
60
60
|
email: chris@chriswuest.com
|
@@ -89,7 +89,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
89
89
|
version: '0'
|
90
90
|
segments:
|
91
91
|
- 0
|
92
|
-
hash: -
|
92
|
+
hash: -1994166287173010830
|
93
93
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|