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 +4 -4
- data/lib/villein/agent.rb +7 -2
- data/lib/villein/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e679c6718206dbc881c03c462f261375a8a74a08
|
4
|
+
data.tar.gz: 7632b765490f3f0fe78dcfd87cb5c3acd5b4a0ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3e40dfc60b083bcfb5f2363bff891119b1e512918a5f4dd8b2496b10d0774fb7a85402aa8b7a69b759545cae52d57b1a924fa816b72e103769286d633186463
|
7
|
+
data.tar.gz: 71e1a9f32dcad649d124d116e613ac9ae82e980d44b3103ca350bf9176183fe1254d5888b4ffbffe4f6051233bec1189e25fc046aa6c998c616ca57683a9882b
|
data/lib/villein/agent.rb
CHANGED
@@ -274,11 +274,15 @@ module Villein
|
|
274
274
|
socks, _, _ = IO.select([sock], nil, nil, 5)
|
275
275
|
break unless socks
|
276
276
|
|
277
|
-
|
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)
|
data/lib/villein/version.rb
CHANGED
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.
|
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
|
+
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.
|
125
|
+
rubygems_version: 2.4.1
|
126
126
|
signing_key:
|
127
127
|
specification_version: 4
|
128
128
|
summary: Use `serf` (serfdom.io) from Ruby.
|