ath 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ath/shell.rb +11 -6
- data/lib/ath/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: acccdd6a3edf523a81dbc0d32e285bf417dfe537
|
4
|
+
data.tar.gz: 1761cd55e84939da93c52170201bca105b0df184
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 205ea572886da933579376542b6a7392d183ceae6e2d6128891d76853e9399b1de8a205ff1d85f6dc5d34d39c6a6fc9cb638c31d4962b789fa1257355f617a4c
|
7
|
+
data.tar.gz: 408b92a5b45da05507a84d497f3167e4a17829fee263889b5b64334040a0434017a5e4eaa6e18adb2280f4769c757ff83d52eafb95dff65d2ecd6841953ddec4
|
data/lib/ath/shell.rb
CHANGED
@@ -74,16 +74,16 @@ class Ath::Shell
|
|
74
74
|
|
75
75
|
if out.kind_of?(File)
|
76
76
|
begin
|
77
|
-
cmd = "cat #{out.path}"
|
78
|
-
cmd << " | #{@pager}" if @pager
|
79
|
-
system(cmd)
|
80
|
-
|
81
77
|
begin
|
82
78
|
out.seek(-1, IO::SEEK_END)
|
83
|
-
|
79
|
+
append_nl(out) if out.gets !~ /\n\z/
|
84
80
|
rescue Errno::EINVAL
|
85
|
-
|
81
|
+
append_nl(out)
|
86
82
|
end
|
83
|
+
|
84
|
+
cmd = "cat #{out.path}"
|
85
|
+
cmd << " | #{@pager}" if @pager
|
86
|
+
system(cmd)
|
87
87
|
ensure
|
88
88
|
out.close
|
89
89
|
end
|
@@ -126,4 +126,9 @@ class Ath::Shell
|
|
126
126
|
history.each {|l| f.puts l }
|
127
127
|
end
|
128
128
|
end
|
129
|
+
|
130
|
+
def append_nl(file)
|
131
|
+
file.puts
|
132
|
+
file.flush
|
133
|
+
end
|
129
134
|
end
|
data/lib/ath/version.rb
CHANGED