ztk 1.5.0 → 1.5.1
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.
- data/lib/ztk/command.rb +5 -5
- data/lib/ztk/version.rb +1 -1
- metadata +3 -3
data/lib/ztk/command.rb
CHANGED
@@ -115,9 +115,8 @@ module ZTK
|
|
115
115
|
begin
|
116
116
|
Timeout.timeout(options.timeout) do
|
117
117
|
loop do
|
118
|
-
|
119
|
-
|
120
|
-
data = pipe.read
|
118
|
+
reader_writer_map.keys.each do |pipe|
|
119
|
+
data = (pipe.readpartial(1024) rescue nil)
|
121
120
|
next if (data.nil? || data.empty?)
|
122
121
|
|
123
122
|
case reader_writer_key[pipe]
|
@@ -143,6 +142,7 @@ module ZTK
|
|
143
142
|
output += data
|
144
143
|
end
|
145
144
|
break if reader_writer_map.keys.all?{ |reader| reader.eof? }
|
145
|
+
sleep(0.1)
|
146
146
|
end
|
147
147
|
end
|
148
148
|
rescue Timeout::Error => e
|
@@ -184,8 +184,8 @@ module ZTK
|
|
184
184
|
# Returns a string in the format of "user@hostname" for the current
|
185
185
|
# shell.
|
186
186
|
def tag
|
187
|
-
@@hostname ||= %x(hostname).
|
188
|
-
"#{ENV['USER']}@#{
|
187
|
+
@@hostname ||= %x(hostname).split('.').first.strip
|
188
|
+
"#{ENV['USER']}@#{@@hostname}"
|
189
189
|
end
|
190
190
|
|
191
191
|
# Formats a header suitable for writing to the direct logger when logging
|
data/lib/ztk/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ztk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -281,7 +281,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
281
281
|
version: '0'
|
282
282
|
segments:
|
283
283
|
- 0
|
284
|
-
hash: -
|
284
|
+
hash: -953822928743577515
|
285
285
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
286
286
|
none: false
|
287
287
|
requirements:
|
@@ -290,7 +290,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
290
290
|
version: '0'
|
291
291
|
segments:
|
292
292
|
- 0
|
293
|
-
hash: -
|
293
|
+
hash: -953822928743577515
|
294
294
|
requirements: []
|
295
295
|
rubyforge_project:
|
296
296
|
rubygems_version: 1.8.25
|