villein 0.5.1 → 0.5.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: 41b8d910bd4151d844adacb3cd5b0ea790126f77
4
- data.tar.gz: 3def03c36b0c875625ef937e53a34c124431ef39
3
+ metadata.gz: e679c6718206dbc881c03c462f261375a8a74a08
4
+ data.tar.gz: 7632b765490f3f0fe78dcfd87cb5c3acd5b4a0ff
5
5
  SHA512:
6
- metadata.gz: 9b542beb6919302171caccb4f93a6a1bcb1cd17f479e878a076a0f8ced90597a002aa5992e8b14bf1501f81de381496122ae1c6699d63ca5eb2ac0ae5a7354a8
7
- data.tar.gz: a4ac469867ac00e37f9c73000719ac4acea56d668d24f8637863df0b198db8c38e1cc97d1793a8c35385d4c65e806d7386d3e71d93871386e1cc6f2822a4d049
6
+ metadata.gz: e3e40dfc60b083bcfb5f2363bff891119b1e512918a5f4dd8b2496b10d0774fb7a85402aa8b7a69b759545cae52d57b1a924fa816b72e103769286d633186463
7
+ data.tar.gz: 71e1a9f32dcad649d124d116e613ac9ae82e980d44b3103ca350bf9176183fe1254d5888b4ffbffe4f6051233bec1189e25fc046aa6c998c616ca57683a9882b
@@ -274,11 +274,15 @@ module Villein
274
274
  socks, _, _ = IO.select([sock], nil, nil, 5)
275
275
  break unless socks
276
276
 
277
- socks[0].read_nonblock(2048, obuf)
277
+ begin
278
+ socks[0].read_nonblock(2048, obuf)
279
+ rescue EOFError
280
+ break
281
+ end
282
+
278
283
  buf << obuf
279
284
  break if socks[0].eof?
280
285
  end
281
-
282
286
  event = parse_event(buf)
283
287
  next unless event
284
288
 
@@ -315,6 +319,7 @@ module Villein
315
319
 
316
320
  def parse_event(payload)
317
321
  env_payload, input = payload.split(/\0\0/,2) # ['name=val', 'name=val', '', 'input']
322
+ return unless env_payload && input
318
323
 
319
324
  env = Hash[env_payload.split(/\0/).map do |line|
320
325
  line.split(/=/,2)
@@ -1,3 +1,3 @@
1
1
  module Villein
2
- VERSION = "0.5.1"
2
+ VERSION = "0.5.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: villein
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shota Fukumori (sora_h)
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-11 00:00:00.000000000 Z
11
+ date: 2014-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -122,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
122
122
  version: '0'
123
123
  requirements: []
124
124
  rubyforge_project:
125
- rubygems_version: 2.2.2
125
+ rubygems_version: 2.4.1
126
126
  signing_key:
127
127
  specification_version: 4
128
128
  summary: Use `serf` (serfdom.io) from Ruby.