tty-pager 0.4.0 → 0.5.0
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.
- checksums.yaml +4 -4
- data/.travis.yml +8 -12
- data/CHANGELOG.md +9 -0
- data/Gemfile +2 -1
- data/README.md +14 -11
- data/appveyor.yml +23 -0
- data/lib/tty/pager/system.rb +2 -2
- data/lib/tty/pager/version.rb +1 -1
- data/spec/unit/system/command_exists_spec.rb +2 -2
- data/spec/unit/system/page_spec.rb +7 -1
- data/tty-pager.gemspec +3 -3
- metadata +24 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 56d2ed8cb89440a27dd776970440c0153bb60c9e
|
4
|
+
data.tar.gz: f6ccd5310563574e8513999c8abf0f7eef348eac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43e545434d18c077488549e05d3e0bc2b7e26c6838f27fb4e630d70c7fe281ed0c4b61f697be70891535d8a6993bdaf5069a4212e6b1b81e438c650b91abd9be
|
7
|
+
data.tar.gz: 79ad0cf1b7f4c0d90f4d36764104ced35e2f7a947198f8da3b4c7b4b55b7643491f9f63858c7510915bf77f4c1a9ace6d3c1789e74b8638791996a68248e9dbb
|
data/.travis.yml
CHANGED
@@ -6,23 +6,19 @@ bundler_args: --without yard benchmarks
|
|
6
6
|
script: "bundle exec rake ci"
|
7
7
|
rvm:
|
8
8
|
- 1.9.3
|
9
|
-
- 2.0
|
10
|
-
- 2.1
|
11
|
-
- 2.2
|
12
|
-
- 2.3.
|
9
|
+
- 2.0.0
|
10
|
+
- 2.1.10
|
11
|
+
- 2.2.5
|
12
|
+
- 2.3.1
|
13
13
|
- ruby-head
|
14
|
+
- jruby-9000
|
15
|
+
- jruby-head
|
16
|
+
- rbx-2
|
14
17
|
matrix:
|
15
|
-
include:
|
16
|
-
- rvm: jruby-19mode
|
17
|
-
- rvm: jruby-20mode
|
18
|
-
- rvm: jruby-21mode
|
19
|
-
- rvm: jruby-head
|
20
|
-
- rvm: rbx-2
|
21
18
|
allow_failures:
|
22
19
|
- rvm: ruby-head
|
23
20
|
- rvm: jruby-head
|
24
|
-
- rvm:
|
25
|
-
- rvm: jruby-21mode
|
21
|
+
- rvm: rbx-2
|
26
22
|
fast_finish: true
|
27
23
|
branches:
|
28
24
|
only: master
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Change log
|
2
2
|
|
3
|
+
## [v0.5.0] - 2016-12-19
|
4
|
+
|
5
|
+
### Changed
|
6
|
+
* Change to call TTY::Which#exist? new api
|
7
|
+
* Change to send fork message directly to SystemPager
|
8
|
+
* Update tty-which
|
9
|
+
* Update verse dependency
|
10
|
+
|
3
11
|
## [v0.4.0] - 2016-02-06
|
4
12
|
|
5
13
|
### Changed
|
@@ -15,6 +23,7 @@
|
|
15
23
|
### Changed
|
16
24
|
* Change SystemPager to correctly paginate inside a process.
|
17
25
|
|
26
|
+
[v0.5.0]: https://github.com/peter-murach/tty-prompt/compare/v0.4.0...v0.5.0
|
18
27
|
[v0.4.0]: https://github.com/peter-murach/tty-prompt/compare/v0.3.0...v0.4.0
|
19
28
|
[v0.3.0]: https://github.com/peter-murach/tty-prompt/compare/v0.2.0...v0.3.0
|
20
29
|
[v0.2.0]: https://github.com/peter-murach/tty-prompt/compare/v0.1.0...v0.2.0
|
data/Gemfile
CHANGED
@@ -4,7 +4,7 @@ gemspec
|
|
4
4
|
|
5
5
|
group :development do
|
6
6
|
gem 'rake', '~> 10.4.2'
|
7
|
-
gem 'rspec', '~> 3.
|
7
|
+
gem 'rspec', '~> 3.5.0'
|
8
8
|
gem 'yard', '~> 0.8.7'
|
9
9
|
end
|
10
10
|
|
@@ -12,4 +12,5 @@ group :metrics do
|
|
12
12
|
gem 'coveralls', '~> 0.8.1'
|
13
13
|
gem 'simplecov', '~> 0.10.0'
|
14
14
|
gem 'yardstick', '~> 0.9.9'
|
15
|
+
gem 'term-ansicolor', '=1.3.2'
|
15
16
|
end
|
data/README.md
CHANGED
@@ -1,19 +1,22 @@
|
|
1
|
-
# TTY::Pager
|
1
|
+
# TTY::Pager [][gitter]
|
2
2
|
[][gem]
|
3
|
-
[][travis]
|
4
|
+
[][appveyor]
|
5
|
+
[][codeclimate]
|
6
|
+
[][coverage]
|
7
|
+
[][inchpages]
|
7
8
|
|
9
|
+
[gitter]: https://gitter.im/piotrmurach/tty
|
8
10
|
[gem]: http://badge.fury.io/rb/tty-pager
|
9
|
-
[travis]: http://travis-ci.org/
|
10
|
-
[
|
11
|
-
[
|
12
|
-
[
|
11
|
+
[travis]: http://travis-ci.org/piotrmurach/tty-pager
|
12
|
+
[appveyor]: https://ci.appveyor.com/project/piotrmurach/tty-pager
|
13
|
+
[codeclimate]: https://codeclimate.com/github/piotrmurach/tty-pager
|
14
|
+
[coverage]: https://coveralls.io/github/piotrmurach/tty-pager
|
15
|
+
[inchpages]: http://inch-ci.org/github/piotrmurach/tty-pager
|
13
16
|
|
14
17
|
> Terminal output paging in a cross-platform way supporting all major ruby interpreters.
|
15
18
|
|
16
|
-
**TTY::Pager** provides independent terminal output paging component for [TTY](https://github.com/
|
19
|
+
**TTY::Pager** provides independent terminal output paging component for [TTY](https://github.com/piotrmurach/tty) toolkit.
|
17
20
|
|
18
21
|
## Installation
|
19
22
|
|
@@ -77,7 +80,7 @@ ENV['PAGER']='less'
|
|
77
80
|
|
78
81
|
## Contributing
|
79
82
|
|
80
|
-
1. Fork it ( https://github.com/
|
83
|
+
1. Fork it ( https://github.com/piotrmurach/tty-pager/fork )
|
81
84
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
82
85
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
83
86
|
4. Push to the branch (`git push origin my-new-feature`)
|
data/appveyor.yml
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
---
|
2
|
+
install:
|
3
|
+
- SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
|
4
|
+
- ruby --version
|
5
|
+
- gem --version
|
6
|
+
- bundle install
|
7
|
+
build: off
|
8
|
+
test_script:
|
9
|
+
- bundle exec rake ci
|
10
|
+
environment:
|
11
|
+
matrix:
|
12
|
+
- ruby_version: "193"
|
13
|
+
- ruby_version: "200"
|
14
|
+
- ruby_version: "200-x64"
|
15
|
+
- ruby_version: "21"
|
16
|
+
- ruby_version: "21-x64"
|
17
|
+
- ruby_version: "22"
|
18
|
+
- ruby_version: "22-x64"
|
19
|
+
- ruby_version: "23"
|
20
|
+
- ruby_version: "23-x64"
|
21
|
+
matrix:
|
22
|
+
allow_failures:
|
23
|
+
- ruby_version: "193"
|
data/lib/tty/pager/system.rb
CHANGED
@@ -55,7 +55,7 @@ module TTY
|
|
55
55
|
def page(text, &callback)
|
56
56
|
read_io, write_io = IO.pipe
|
57
57
|
|
58
|
-
pid =
|
58
|
+
pid = fork do
|
59
59
|
write_io.close
|
60
60
|
input.reopen(read_io)
|
61
61
|
read_io.close
|
@@ -104,7 +104,7 @@ module TTY
|
|
104
104
|
#
|
105
105
|
# @api private
|
106
106
|
def self.command_exists?(command)
|
107
|
-
|
107
|
+
TTY::Which.exist?(command)
|
108
108
|
end
|
109
109
|
|
110
110
|
# The pager command to run
|
data/lib/tty/pager/version.rb
CHANGED
@@ -4,12 +4,12 @@ RSpec.describe TTY::Pager::SystemPager, '#command_exists?' do
|
|
4
4
|
subject(:pager) { described_class }
|
5
5
|
|
6
6
|
it "successfully checks command exists on the system" do
|
7
|
-
allow(TTY::Which).to receive(:
|
7
|
+
allow(TTY::Which).to receive(:exist?).with('less').and_return('/usr/bin/less').and_return(true)
|
8
8
|
expect(pager.command_exists?('less')).to eq(true)
|
9
9
|
end
|
10
10
|
|
11
11
|
it "fails to check command exists on the system" do
|
12
|
-
allow(TTY::Which).to receive(:
|
12
|
+
allow(TTY::Which).to receive(:exist?).with('less').and_return(false)
|
13
13
|
expect(pager.command_exists?('less')).to eq(false)
|
14
14
|
end
|
15
15
|
end
|
@@ -10,9 +10,15 @@ RSpec.describe TTY::Pager::SystemPager, '.page' do
|
|
10
10
|
read_io = spy
|
11
11
|
write_io = spy
|
12
12
|
|
13
|
+
if !pager.respond_to?(:fork)
|
14
|
+
described_class.send :define_method, :fork, lambda { |*args|
|
15
|
+
yield if block_given?
|
16
|
+
}
|
17
|
+
end
|
18
|
+
|
13
19
|
allow(IO).to receive(:pipe).and_return([read_io, write_io])
|
14
20
|
|
15
|
-
allow(
|
21
|
+
allow(pager).to receive(:fork) do |&block|
|
16
22
|
allow(input).to receive(:reopen)
|
17
23
|
allow(IO).to receive(:select)
|
18
24
|
allow(pager).to receive(:pager_command).and_return('less')
|
data/tty-pager.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = [""]
|
11
11
|
spec.summary = %q{Terminal output paging in a cross-platform way supporting all major ruby interpreters.}
|
12
12
|
spec.description = %q{Terminal output paging in a cross-platform way supporting all major ruby interpreters.}
|
13
|
-
spec.homepage = "https://github.com/
|
13
|
+
spec.homepage = "https://github.com/piotrmurach/tty-pager"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0")
|
@@ -19,8 +19,8 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
21
|
spec.add_dependency 'tty-screen', '~> 0.5.0'
|
22
|
-
spec.add_dependency 'tty-which', '~> 0.
|
23
|
-
spec.add_dependency 'verse', '~> 0.
|
22
|
+
spec.add_dependency 'tty-which', '~> 0.2.0'
|
23
|
+
spec.add_dependency 'verse', '~> 0.5.0'
|
24
24
|
|
25
25
|
spec.add_development_dependency 'bundler', '>= 1.5.0', '< 2.0'
|
26
26
|
end
|
metadata
CHANGED
@@ -1,75 +1,75 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tty-pager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Murach
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tty-screen
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 0.5.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.5.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: tty-which
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.2.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.2.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: verse
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.5.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
54
|
+
version: 0.5.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: 1.5.0
|
62
|
-
- - <
|
62
|
+
- - "<"
|
63
63
|
- !ruby/object:Gem::Version
|
64
64
|
version: '2.0'
|
65
65
|
type: :development
|
66
66
|
prerelease: false
|
67
67
|
version_requirements: !ruby/object:Gem::Requirement
|
68
68
|
requirements:
|
69
|
-
- -
|
69
|
+
- - ">="
|
70
70
|
- !ruby/object:Gem::Version
|
71
71
|
version: 1.5.0
|
72
|
-
- - <
|
72
|
+
- - "<"
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '2.0'
|
75
75
|
description: Terminal output paging in a cross-platform way supporting all major ruby
|
@@ -80,14 +80,15 @@ executables: []
|
|
80
80
|
extensions: []
|
81
81
|
extra_rdoc_files: []
|
82
82
|
files:
|
83
|
-
- .gitignore
|
84
|
-
- .rspec
|
85
|
-
- .travis.yml
|
83
|
+
- ".gitignore"
|
84
|
+
- ".rspec"
|
85
|
+
- ".travis.yml"
|
86
86
|
- CHANGELOG.md
|
87
87
|
- Gemfile
|
88
88
|
- LICENSE.txt
|
89
89
|
- README.md
|
90
90
|
- Rakefile
|
91
|
+
- appveyor.yml
|
91
92
|
- examples/system_pager.rb
|
92
93
|
- examples/temp.txt
|
93
94
|
- lib/tty-pager.rb
|
@@ -107,7 +108,7 @@ files:
|
|
107
108
|
- tasks/coverage.rake
|
108
109
|
- tasks/spec.rake
|
109
110
|
- tty-pager.gemspec
|
110
|
-
homepage: https://github.com/
|
111
|
+
homepage: https://github.com/piotrmurach/tty-pager
|
111
112
|
licenses:
|
112
113
|
- MIT
|
113
114
|
metadata: {}
|
@@ -117,17 +118,17 @@ require_paths:
|
|
117
118
|
- lib
|
118
119
|
required_ruby_version: !ruby/object:Gem::Requirement
|
119
120
|
requirements:
|
120
|
-
- -
|
121
|
+
- - ">="
|
121
122
|
- !ruby/object:Gem::Version
|
122
123
|
version: '0'
|
123
124
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
124
125
|
requirements:
|
125
|
-
- -
|
126
|
+
- - ">="
|
126
127
|
- !ruby/object:Gem::Version
|
127
128
|
version: '0'
|
128
129
|
requirements: []
|
129
130
|
rubyforge_project:
|
130
|
-
rubygems_version: 2.
|
131
|
+
rubygems_version: 2.5.1
|
131
132
|
signing_key:
|
132
133
|
specification_version: 4
|
133
134
|
summary: Terminal output paging in a cross-platform way supporting all major ruby
|