expectr 2.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fdb63c98692074edfb85dfd5652de4bb858b98bc
4
- data.tar.gz: c0cf8fcfbc6d926bf779884265db4fb1a484839f
3
+ metadata.gz: 893f8bdd9a37dac2459e243c00e7251831d0b62a
4
+ data.tar.gz: 57774fc6e99ba685279e7f704a5f6b209591bd90
5
5
  SHA512:
6
- metadata.gz: fb3dac4b059cc9d1453637b020ffa0fa0c094ca04ff5a62acba1dc95d23de265ac4781daf3ce59bd174cc0110a839d4826127a01298e06a4f2650ca5f1047b55
7
- data.tar.gz: 47d9d136860390bcb8deb5296b6f3b2eac9406db8ef561770ae6a610a5600eaf07f8ec3acd0c260710278b72585c877106e61d63012d626f58f16684909b4ce6
6
+ metadata.gz: 6a8ca8ad62dbe729e1d10bc4615e51c4f67d40f7cc4e0b3d43ff5d6c919bce084aab513f754f030801795bdaaecdbc863850ddce687006dcb6fcccc972f6dda9
7
+ data.tar.gz: e9d1ee0bd782f4e9636894963acb4bd4acba4f1a249779ec48120887b46e23db46e984d445437317053b524777f3b0f5a1a1557aad059789a150597f37ce0274
@@ -317,7 +317,10 @@ class Expectr
317
317
  while match.nil?
318
318
  @out_mutex.synchronize do
319
319
  match = pattern.match(@buffer)
320
- @out_mutex.sleep if match.nil?
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
@@ -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)
@@ -1,3 +1,3 @@
1
1
  class Expectr
2
- VERSION = '2.0.1'
2
+ VERSION = '2.0.2'
3
3
  end
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.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
- - Chris Wuest
7
+ - Tina Wuest
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-29 00:00:00.000000000 Z
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: chris@chriswuest.com
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
- - bin/expectr
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.0.5
50
+ rubygems_version: 2.4.4
51
51
  signing_key:
52
52
  specification_version: 4
53
53
  summary: Expect for Ruby