pause_output 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pause_output/globalize.rb +1 -1
- data/lib/pause_output/output_pager.rb +3 -3
- data/lib/pause_output/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5342f9d87af606805365df2af5c446efca66ba75
|
4
|
+
data.tar.gz: 6b1f9b15f87fd1c025a74c72e152a9abe3db487a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: daf91ec8df41fc794ef1771f9bb144ed9edd1c1e9bbba18f8ac7c714c836c494144b825bf500346566af525ec4f2dc091aab5088fbdb6f50555336c2fdba907d
|
7
|
+
data.tar.gz: 16c3baf9839ed3cf8538a613a16cd4ea34d10cae13fd9ecf599f0dc5fb60faab2b24f14a1d64ec7d5224ce8e6261cb8dbfb5a75222413768be17834d89beda8c
|
@@ -8,12 +8,12 @@ class Object
|
|
8
8
|
# Execute a block with page paused output.
|
9
9
|
def more(options={})
|
10
10
|
saved = $stdout
|
11
|
+
outer = $stdout.equal?($pause_output_out)
|
11
12
|
|
12
13
|
disabled = options[:page_pause]
|
13
14
|
disabled = disabled.downcase if disabled.is_a?(String)
|
14
15
|
|
15
16
|
unless [false, 'false', 'off', 'no'].include?(disabled)
|
16
|
-
outer = $stdout.equal?($pause_output_out)
|
17
17
|
$stdout = ::PauseOutput::OutputPager.new(options) if outer
|
18
18
|
end
|
19
19
|
|
@@ -40,11 +40,11 @@ module PauseOutput
|
|
40
40
|
@chars += len
|
41
41
|
return
|
42
42
|
else
|
43
|
-
|
44
|
-
$pause_output_out.write(str[0,
|
43
|
+
tipping_point = chars_per_line - @chars
|
44
|
+
$pause_output_out.write(str[0, tipping_point])
|
45
45
|
count_lines
|
46
46
|
|
47
|
-
str = (str[
|
47
|
+
str = (str[tipping_point..-1])
|
48
48
|
end
|
49
49
|
end
|
50
50
|
end
|
data/lib/pause_output/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pause_output
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PeterCamilleri
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|