ath 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ath/shell.rb +11 -6
  3. data/lib/ath/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb806476d2749543f41ac3e801cd9af8af2b3082
4
- data.tar.gz: 0c4ae894e1fbca69275fec6ff15d7a549f0b9b16
3
+ metadata.gz: acccdd6a3edf523a81dbc0d32e285bf417dfe537
4
+ data.tar.gz: 1761cd55e84939da93c52170201bca105b0df184
5
5
  SHA512:
6
- metadata.gz: 5dad41ecaac38804705d303fb47e5fb91fceaa3ea7b4a7f1b10e13f80dc536525c810659a17c694cf591f0c3f568b28e78fc6d059f9bdf662d0ecefa08dec3f7
7
- data.tar.gz: b296e942ad27658a2f8c285ca6e9c232e7c50462a435a3882c5ccf186c45dc148fbc71175e2f804b68e656f739217b6ce512491dda399a3f657f8d53b87938d3
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
- puts if out.gets !~ /\n\z/
79
+ append_nl(out) if out.gets !~ /\n\z/
84
80
  rescue Errno::EINVAL
85
- puts
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
@@ -1,3 +1,3 @@
1
1
  module Ath
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ath
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - winebarrel