expectr 2.0.1 → 2.0.2
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.
- checksums.yaml +4 -4
- data/lib/expectr.rb +4 -1
- data/lib/expectr/child.rb +3 -2
- data/lib/expectr/version.rb +1 -1
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 893f8bdd9a37dac2459e243c00e7251831d0b62a
|
4
|
+
data.tar.gz: 57774fc6e99ba685279e7f704a5f6b209591bd90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a8ca8ad62dbe729e1d10bc4615e51c4f67d40f7cc4e0b3d43ff5d6c919bce084aab513f754f030801795bdaaecdbc863850ddce687006dcb6fcccc972f6dda9
|
7
|
+
data.tar.gz: e9d1ee0bd782f4e9636894963acb4bd4acba4f1a249779ec48120887b46e23db46e984d445437317053b524777f3b0f5a1a1557aad059789a150597f37ce0274
|
data/lib/expectr.rb
CHANGED
@@ -317,7 +317,10 @@ class Expectr
|
|
317
317
|
while match.nil?
|
318
318
|
@out_mutex.synchronize do
|
319
319
|
match = pattern.match(@buffer)
|
320
|
-
|
320
|
+
if match.nil?
|
321
|
+
raise Timeout::Error if @pid.zero?
|
322
|
+
@out_mutex.sleep
|
323
|
+
end
|
321
324
|
end
|
322
325
|
end
|
323
326
|
match
|
data/lib/expectr/child.rb
CHANGED
@@ -53,7 +53,7 @@ class Expectr
|
|
53
53
|
def send(str)
|
54
54
|
begin
|
55
55
|
@stdin.syswrite str
|
56
|
-
rescue Errno::EIO #Application is not running
|
56
|
+
rescue Errno::EIO, EOFError # Application is not running
|
57
57
|
@pid = 0
|
58
58
|
end
|
59
59
|
unless @pid > 0
|
@@ -72,8 +72,9 @@ class Expectr
|
|
72
72
|
|
73
73
|
begin
|
74
74
|
@stdout.sysread(@buffer_size, buf)
|
75
|
-
rescue Errno::EIO #Application is not running
|
75
|
+
rescue Errno::EIO, EOFError #Application is not running
|
76
76
|
@pid = 0
|
77
|
+
@thread.wakeup if @thread
|
77
78
|
return
|
78
79
|
end
|
79
80
|
process_output(buf)
|
data/lib/expectr/version.rb
CHANGED
metadata
CHANGED
@@ -1,22 +1,23 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: expectr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Tina Wuest
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Expectr is an interface to the functionality of Expect in Ruby
|
14
|
-
email:
|
14
|
+
email: tina@wuest.me
|
15
15
|
executables:
|
16
16
|
- expectr
|
17
17
|
extensions: []
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
|
+
- bin/expectr
|
20
21
|
- lib/expectr.rb
|
21
22
|
- lib/expectr/adopt.rb
|
22
23
|
- lib/expectr/child.rb
|
@@ -26,8 +27,7 @@ files:
|
|
26
27
|
- lib/expectr/interpreter.rb
|
27
28
|
- lib/expectr/lambda.rb
|
28
29
|
- lib/expectr/version.rb
|
29
|
-
|
30
|
-
homepage: http://github.com/cwuest/expectr
|
30
|
+
homepage: http://github.com/wuest/expectr
|
31
31
|
licenses:
|
32
32
|
- MIT
|
33
33
|
metadata: {}
|
@@ -37,17 +37,17 @@ require_paths:
|
|
37
37
|
- lib
|
38
38
|
required_ruby_version: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
|
-
- -
|
40
|
+
- - ">="
|
41
41
|
- !ruby/object:Gem::Version
|
42
42
|
version: '0'
|
43
43
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
requirements: []
|
49
49
|
rubyforge_project:
|
50
|
-
rubygems_version: 2.
|
50
|
+
rubygems_version: 2.4.4
|
51
51
|
signing_key:
|
52
52
|
specification_version: 4
|
53
53
|
summary: Expect for Ruby
|