tty-pager 0.11.0 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +30 -12
- data/README.md +20 -9
- data/examples/markdown.rb +7 -0
- data/lib/tty/pager.rb +7 -4
- data/lib/tty/pager/basic.rb +1 -1
- data/lib/tty/pager/system.rb +37 -9
- data/lib/tty/pager/version.rb +3 -1
- data/spec/spec_helper.rb +3 -1
- data/spec/unit/null/page_spec.rb +2 -0
- data/spec/unit/page_spec.rb +2 -0
- data/spec/unit/system/command_exists_spec.rb +2 -0
- data/spec/unit/system/executables_spec.rb +1 -1
- data/spec/unit/system/find_executable_spec.rb +2 -0
- data/spec/unit/system/new_spec.rb +14 -1
- data/spec/unit/system/page_spec.rb +2 -0
- data/tty-pager.gemspec +8 -7
- metadata +11 -17
- data/.gitignore +0 -22
- data/.rspec +0 -3
- data/.travis.yml +0 -24
- data/CODE_OF_CONDUCT.md +0 -49
- data/Gemfile +0 -13
- data/appveyor.yml +0 -21
- data/examples/temp.txt +0 -49
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 495bd1c807d9cd24125421d0d0710e1f7b922f425e8323c0e2018f3533249f16
|
4
|
+
data.tar.gz: c26118d1d10b8f7234afeffc4d1f538bfd4856f2cf64c652d2eef47c6f5e8ca3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a601c85804e03622fbafe76dd5f29f8025b9463ef6e5529b4e739c35e87e31ad2038a507c1bafca3d2b06c8423566b9b9d1b9b61544342c6fd376491a9f35b11
|
7
|
+
data.tar.gz: 7a3446bcbcc659fb1b20c580183c1932e6dbae5c1b937562d15d1d06c4079df32134c41484479f1e1e66f0b137c2066cdeacdb08fe9071d03572eacfb1c1bf14
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# Change log
|
2
2
|
|
3
|
+
## [v0.12.0] - 2018-12-09
|
4
|
+
|
5
|
+
### Added
|
6
|
+
* Add SystemPager#run_command for running pager command silently and capturing output
|
7
|
+
|
8
|
+
### Changed
|
9
|
+
* Change SystemPager#new to allow specifying more than one custom command
|
10
|
+
* Change SystemPager#page to check if pager command can be run with flags before paging content
|
11
|
+
* Change to update tty-screen and tty-which dependencies
|
12
|
+
|
13
|
+
### Fixed
|
14
|
+
* Fix SystemPager to page content with ANSI codes
|
15
|
+
|
3
16
|
## [v0.11.0] - 2018-01-11
|
4
17
|
|
5
18
|
### Added
|
@@ -84,15 +97,20 @@
|
|
84
97
|
### Changed
|
85
98
|
* Change SystemPager to correctly paginate inside a process.
|
86
99
|
|
87
|
-
[v0.
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
[v0.
|
92
|
-
[v0.
|
93
|
-
[v0.
|
94
|
-
[v0.
|
95
|
-
[v0.
|
96
|
-
[v0.
|
97
|
-
[v0.
|
98
|
-
[v0.
|
100
|
+
### [v0.1.0] - 2015-05-31
|
101
|
+
|
102
|
+
* Initial release
|
103
|
+
|
104
|
+
[v0.12.0]: https://github.com/piotrmurach/tty-pager/compare/v0.11.0...v0.12.0
|
105
|
+
[v0.11.0]: https://github.com/piotrmurach/tty-pager/compare/v0.10.0...v0.11.0
|
106
|
+
[v0.10.0]: https://github.com/piotrmurach/tty-pager/compare/v0.9.0...v0.10.0
|
107
|
+
[v0.9.0]: https://github.com/piotrmurach/tty-pager/compare/v0.8.0...v0.9.0
|
108
|
+
[v0.8.0]: https://github.com/piotrmurach/tty-pager/compare/v0.7.1...v0.8.0
|
109
|
+
[v0.7.1]: https://github.com/piotrmurach/tty-pager/compare/v0.7.0...v0.7.1
|
110
|
+
[v0.7.0]: https://github.com/piotrmurach/tty-pager/compare/v0.6.0...v0.7.0
|
111
|
+
[v0.6.0]: https://github.com/piotrmurach/tty-pager/compare/v0.5.0...v0.6.0
|
112
|
+
[v0.5.0]: https://github.com/piotrmurach/tty-pager/compare/v0.4.0...v0.5.0
|
113
|
+
[v0.4.0]: https://github.com/piotrmurach/tty-pager/compare/v0.3.0...v0.4.0
|
114
|
+
[v0.3.0]: https://github.com/piotrmurach/tty-pager/compare/v0.2.0...v0.3.0
|
115
|
+
[v0.2.0]: https://github.com/piotrmurach/tty-pager/compare/v0.1.0...v0.2.0
|
116
|
+
[v0.1.0]: https://github.com/piotrmurach/tty-pager/compare/v0.1.0
|
data/README.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
<div align="center">
|
2
|
+
<a href="https://piotrmurach.github.io/tty" target="_blank"><img width="130" src="https://cdn.rawgit.com/piotrmurach/tty/master/images/tty.png" alt="tty logo" /></a>
|
3
|
+
</div>
|
4
|
+
|
1
5
|
# TTY::Pager [![Gitter](https://badges.gitter.im/Join%20Chat.svg)][gitter]
|
2
6
|
|
3
7
|
[![Gem Version](https://badge.fury.io/rb/tty-pager.svg)][gem]
|
@@ -52,7 +56,7 @@ Then to perform actual content pagination invoke `page` method with the content
|
|
52
56
|
pager.page("Very long text...")
|
53
57
|
```
|
54
58
|
|
55
|
-
If you want to use specific pager you can do so by invoking it directly
|
59
|
+
If you want to use specific pager you can do so by invoking it directly:
|
56
60
|
|
57
61
|
```ruby
|
58
62
|
pager = TTY::Pager::BasicPager.new
|
@@ -65,7 +69,7 @@ pager = TTY::Pager::BasicPager.new
|
|
65
69
|
If you want to disable the pager pass the `:enabled` option set to `false`:
|
66
70
|
|
67
71
|
```ruby
|
68
|
-
pager = TTY::Pager.new
|
72
|
+
pager = TTY::Pager.new(enabled: false)
|
69
73
|
```
|
70
74
|
|
71
75
|
### :width
|
@@ -73,7 +77,8 @@ pager = TTY::Pager.new enabled: false
|
|
73
77
|
The `BasicPager` allows to wrap content at given width:
|
74
78
|
|
75
79
|
```ruby
|
76
|
-
pager = TTY::Pager
|
80
|
+
pager = TTY::Pager.new(width: 80)
|
81
|
+
pager = TTY::Pager::BasicPager.new(width: 80)
|
77
82
|
```
|
78
83
|
|
79
84
|
### :prompt
|
@@ -82,21 +87,27 @@ For the `BasicPager` you can pass a `:prompt` option to change the page break te
|
|
82
87
|
|
83
88
|
```ruby
|
84
89
|
prompt = -> (page_num) { output.puts "Page -#{page_num}- Press enter to continue" }
|
85
|
-
pager = TTY::Pager::BasicPager.new
|
90
|
+
pager = TTY::Pager::BasicPager.new(prompt: prompt)
|
86
91
|
```
|
87
92
|
|
88
93
|
### :command
|
89
94
|
|
90
|
-
You can force `SystemPager` to always use a specific paging tool by passing the `:command` option:
|
95
|
+
You can force `SystemPager` to always use a specific paging tool(s) by passing the `:command` option:
|
96
|
+
|
97
|
+
```ruby
|
98
|
+
TTY::Pager.new(command: 'less -R')
|
99
|
+
TTY::Pager::SystemPager.new(command: 'less -R')
|
100
|
+
```
|
101
|
+
|
102
|
+
You also specify an array of pagers to use:
|
91
103
|
|
92
104
|
```ruby
|
93
|
-
TTY::Pager.new
|
94
|
-
TTY::Pager::SystemPager.new command: 'less -R'
|
105
|
+
pager = TTY::Pager.new(command: ['less -r', 'more -r'])
|
95
106
|
```
|
96
107
|
|
97
108
|
### PAGER
|
98
109
|
|
99
|
-
By default the `SystemPager` will check the `PAGER` environment variable, if not set it will try one of the `less`, `more`, `cat`, `pager`. Therefore, if you wish to set your
|
110
|
+
By default the `SystemPager` will check the `PAGER` environment variable, if not set it will try one of the `less`, `more`, `cat`, `pager`. Therefore, if you wish to set your preferred pager you can either set up your shell like so:
|
100
111
|
|
101
112
|
```bash
|
102
113
|
PAGER=less
|
@@ -121,4 +132,4 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/piotrm
|
|
121
132
|
|
122
133
|
## Copyright
|
123
134
|
|
124
|
-
Copyright (c) 2015
|
135
|
+
Copyright (c) 2015 Piotr Murach. See LICENSE for further details.
|
data/lib/tty/pager.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'tty-screen'
|
2
4
|
|
3
5
|
require_relative 'pager/basic'
|
@@ -18,10 +20,10 @@ module TTY
|
|
18
20
|
# is a pure Ruby implementation known to work on any platform.
|
19
21
|
#
|
20
22
|
# @api private
|
21
|
-
def self.select_pager(enabled)
|
23
|
+
def self.select_pager(enabled, commands)
|
22
24
|
if !enabled
|
23
25
|
NullPager
|
24
|
-
elsif SystemPager.exec_available?
|
26
|
+
elsif SystemPager.exec_available?(*commands)
|
25
27
|
SystemPager
|
26
28
|
else
|
27
29
|
BasicPager
|
@@ -41,13 +43,14 @@ module TTY
|
|
41
43
|
# disable/enable text paging
|
42
44
|
#
|
43
45
|
# @api public
|
44
|
-
def initialize(options
|
46
|
+
def initialize(**options)
|
45
47
|
@input = options.fetch(:input) { $stdin }
|
46
48
|
@output = options.fetch(:output) { $stdout }
|
47
49
|
@enabled = options.fetch(:enabled) { true }
|
50
|
+
commands = Array(options[:command])
|
48
51
|
|
49
52
|
if self.class == TTY::Pager
|
50
|
-
@pager = self.class.select_pager(@enabled).new(options)
|
53
|
+
@pager = self.class.select_pager(@enabled, commands).new(options)
|
51
54
|
end
|
52
55
|
end
|
53
56
|
|
data/lib/tty/pager/basic.rb
CHANGED
data/lib/tty/pager/system.rb
CHANGED
@@ -24,6 +24,24 @@ module TTY
|
|
24
24
|
TTY::Which.exist?(command)
|
25
25
|
end
|
26
26
|
|
27
|
+
# Run pager command silently with no input and capture output
|
28
|
+
#
|
29
|
+
# @return [nil, String]
|
30
|
+
# command output or nil if command fails to run
|
31
|
+
#
|
32
|
+
# @api private
|
33
|
+
def self.run_command(*args)
|
34
|
+
require 'tempfile'
|
35
|
+
out = Tempfile.new('tty-pager')
|
36
|
+
result = system(*args, out: out.path, err: out.path, in: File::NULL)
|
37
|
+
return if result.nil?
|
38
|
+
out.rewind
|
39
|
+
out.read
|
40
|
+
ensure
|
41
|
+
out.close
|
42
|
+
out.unlink
|
43
|
+
end
|
44
|
+
|
27
45
|
# List possible executables for output paging
|
28
46
|
#
|
29
47
|
# @return [Array[String]]
|
@@ -32,7 +50,7 @@ module TTY
|
|
32
50
|
def self.executables
|
33
51
|
[ENV['GIT_PAGER'], ENV['PAGER'],
|
34
52
|
command_exists?('git') ? `git config --get-all core.pager` : nil,
|
35
|
-
'less', 'more', '
|
53
|
+
'less -r', 'more -r', 'most', 'cat', 'pager', 'pg'].compact
|
36
54
|
end
|
37
55
|
|
38
56
|
# Find first available termainal pager program executable
|
@@ -78,10 +96,13 @@ module TTY
|
|
78
96
|
# the command to use for paging
|
79
97
|
#
|
80
98
|
# @api public
|
81
|
-
def initialize(options
|
99
|
+
def initialize(**options)
|
82
100
|
super
|
83
|
-
@pager_command =
|
84
|
-
|
101
|
+
@pager_command = nil
|
102
|
+
commands = Array(options[:command])
|
103
|
+
pager_command(*commands)
|
104
|
+
|
105
|
+
if @pager_command.nil?
|
85
106
|
raise TTY::Pager::Error, "#{self.class.name} cannot be used on your" \
|
86
107
|
" system due to lack of appropriate pager" \
|
87
108
|
" executable. Install `less` like pager or" \
|
@@ -101,14 +122,21 @@ module TTY
|
|
101
122
|
# the success status of launching a process
|
102
123
|
#
|
103
124
|
# @api public
|
104
|
-
def page(text, &
|
125
|
+
def page(text, &_callback)
|
105
126
|
return text unless output.tty?
|
106
127
|
|
107
|
-
|
108
|
-
|
128
|
+
command = pager_command
|
129
|
+
out = self.class.run_command(command)
|
130
|
+
# Issue running command, e.g. unsupported flag, fallback to just command
|
131
|
+
if !out.empty?
|
132
|
+
command = pager_command.split.first
|
133
|
+
end
|
134
|
+
|
135
|
+
pager_io = open("|#{command}", 'w')
|
136
|
+
pid = pager_io.pid
|
109
137
|
|
110
|
-
|
111
|
-
|
138
|
+
pager_io.write(text)
|
139
|
+
pager_io.close
|
112
140
|
|
113
141
|
_, status = Process.waitpid2(pid, Process::WNOHANG)
|
114
142
|
status.success?
|
data/lib/tty/pager/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
data/spec/unit/null/page_spec.rb
CHANGED
data/spec/unit/page_spec.rb
CHANGED
@@ -6,6 +6,6 @@ RSpec.describe TTY::Pager::SystemPager do
|
|
6
6
|
allow(ENV).to receive(:[]).with('PAGER').and_return(nil)
|
7
7
|
allow(described_class).to receive(:command_exists?).with('git').and_return(false)
|
8
8
|
|
9
|
-
expect(described_class.executables).to eq(['less', 'more', '
|
9
|
+
expect(described_class.executables).to eq(['less -r', 'more -r', 'most', 'cat', 'pager', 'pg'])
|
10
10
|
end
|
11
11
|
end
|
@@ -1,8 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
RSpec.describe TTY::Pager::SystemPager, '#new' do
|
2
4
|
it "raises error if system paging is not supported" do
|
3
|
-
allow(TTY::Pager::SystemPager).to receive(:
|
5
|
+
allow(TTY::Pager::SystemPager).to receive(:find_executable).and_return(nil)
|
6
|
+
|
4
7
|
expect {
|
5
8
|
TTY::Pager::SystemPager.new
|
6
9
|
}.to raise_error(TTY::Pager::Error, "TTY::Pager::SystemPager cannot be used on your system due to lack of appropriate pager executable. Install `less` like pager or try using `BasicPager` instead.")
|
7
10
|
end
|
11
|
+
|
12
|
+
it "accepts multiple commands" do
|
13
|
+
allow(TTY::Pager::SystemPager)
|
14
|
+
.to receive(:find_executable).and_return('more -r')
|
15
|
+
|
16
|
+
TTY::Pager::SystemPager.new(command: ['less -r', 'more -r'])
|
17
|
+
|
18
|
+
expect(TTY::Pager::SystemPager)
|
19
|
+
.to have_received(:find_executable).with('less -r', 'more -r')
|
20
|
+
end
|
8
21
|
end
|
data/tty-pager.gemspec
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
# coding: utf-8
|
2
1
|
lib = File.expand_path('../lib', __FILE__)
|
3
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
3
|
require 'tty/pager/version'
|
@@ -10,19 +9,21 @@ Gem::Specification.new do |spec|
|
|
10
9
|
spec.email = [""]
|
11
10
|
spec.summary = %q{Terminal output paging in a cross-platform way supporting all major ruby interpreters.}
|
12
11
|
spec.description = %q{Terminal output paging in a cross-platform way supporting all major ruby interpreters.}
|
13
|
-
spec.homepage = "https://github.
|
12
|
+
spec.homepage = "https://piotrmurach.github.io/tty"
|
14
13
|
spec.license = "MIT"
|
15
14
|
|
16
|
-
spec.files =
|
15
|
+
spec.files = Dir['{lib,spec,examples}/**/*.rb']
|
16
|
+
spec.files += Dir['tasks/*', 'tty-pager.gemspec']
|
17
|
+
spec.files += Dir['README.md', 'CHANGELOG.md', 'LICENSE.txt', 'Rakefile']
|
17
18
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
-
spec.test_files = spec.files.grep(%r{^
|
19
|
+
spec.test_files = spec.files.grep(%r{^spec/})
|
19
20
|
spec.require_paths = ["lib"]
|
20
21
|
|
21
22
|
spec.required_ruby_version = '>= 2.0.0'
|
22
23
|
|
23
|
-
spec.add_dependency 'tty-screen', '~> 0.6
|
24
|
-
spec.add_dependency 'tty-which', '~> 0.
|
25
|
-
spec.add_dependency 'strings', '~> 0.1.
|
24
|
+
spec.add_dependency 'tty-screen', '~> 0.6'
|
25
|
+
spec.add_dependency 'tty-which', '~> 0.4'
|
26
|
+
spec.add_dependency 'strings', '~> 0.1.4'
|
26
27
|
|
27
28
|
spec.add_development_dependency 'bundler', '>= 1.5.0', '< 2.0'
|
28
29
|
spec.add_development_dependency 'rake'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tty-pager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.12.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: 2018-
|
11
|
+
date: 2018-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tty-screen
|
@@ -16,42 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.6
|
19
|
+
version: '0.6'
|
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
|
-
version: 0.6
|
26
|
+
version: '0.6'
|
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.4'
|
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.4'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: strings
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.1.
|
47
|
+
version: 0.1.4
|
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.1.
|
54
|
+
version: 0.1.4
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,20 +108,14 @@ executables: []
|
|
108
108
|
extensions: []
|
109
109
|
extra_rdoc_files: []
|
110
110
|
files:
|
111
|
-
- ".gitignore"
|
112
|
-
- ".rspec"
|
113
|
-
- ".travis.yml"
|
114
111
|
- CHANGELOG.md
|
115
|
-
- CODE_OF_CONDUCT.md
|
116
|
-
- Gemfile
|
117
112
|
- LICENSE.txt
|
118
113
|
- README.md
|
119
114
|
- Rakefile
|
120
|
-
- appveyor.yml
|
121
115
|
- examples/basic_pager.rb
|
116
|
+
- examples/markdown.rb
|
122
117
|
- examples/pager.rb
|
123
118
|
- examples/system_pager.rb
|
124
|
-
- examples/temp.txt
|
125
119
|
- lib/tty-pager.rb
|
126
120
|
- lib/tty/pager.rb
|
127
121
|
- lib/tty/pager/basic.rb
|
@@ -141,7 +135,7 @@ files:
|
|
141
135
|
- tasks/coverage.rake
|
142
136
|
- tasks/spec.rake
|
143
137
|
- tty-pager.gemspec
|
144
|
-
homepage: https://github.
|
138
|
+
homepage: https://piotrmurach.github.io/tty
|
145
139
|
licenses:
|
146
140
|
- MIT
|
147
141
|
metadata: {}
|
@@ -161,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
161
155
|
version: '0'
|
162
156
|
requirements: []
|
163
157
|
rubyforge_project:
|
164
|
-
rubygems_version: 2.
|
158
|
+
rubygems_version: 2.7.3
|
165
159
|
signing_key:
|
166
160
|
specification_version: 4
|
167
161
|
summary: Terminal output paging in a cross-platform way supporting all major ruby
|
data/.gitignore
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
*.gem
|
2
|
-
*.rbc
|
3
|
-
.bundle
|
4
|
-
.config
|
5
|
-
.yardoc
|
6
|
-
Gemfile.lock
|
7
|
-
InstalledFiles
|
8
|
-
_yardoc
|
9
|
-
coverage
|
10
|
-
doc/
|
11
|
-
lib/bundler/man
|
12
|
-
pkg
|
13
|
-
rdoc
|
14
|
-
spec/reports
|
15
|
-
test/tmp
|
16
|
-
test/version_tmp
|
17
|
-
tmp
|
18
|
-
*.bundle
|
19
|
-
*.so
|
20
|
-
*.o
|
21
|
-
*.a
|
22
|
-
mkmf.log
|
data/.rspec
DELETED
data/.travis.yml
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
---
|
2
|
-
language: ruby
|
3
|
-
sudo: false
|
4
|
-
cache: bundler
|
5
|
-
bundler_args: --without yard benchmarks
|
6
|
-
script: "bundle exec rake ci"
|
7
|
-
rvm:
|
8
|
-
- 2.0.0
|
9
|
-
- 2.1.10
|
10
|
-
- 2.2.8
|
11
|
-
- 2.3.6
|
12
|
-
- 2.4.3
|
13
|
-
- ruby-head
|
14
|
-
- jruby-9.1.5.0
|
15
|
-
- jruby-head
|
16
|
-
matrix:
|
17
|
-
allow_failures:
|
18
|
-
- rvm: ruby-head
|
19
|
-
- rvm: jruby-head
|
20
|
-
fast_finish: true
|
21
|
-
branches:
|
22
|
-
only: master
|
23
|
-
notifications:
|
24
|
-
email: false
|
data/CODE_OF_CONDUCT.md
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
# Contributor Code of Conduct
|
2
|
-
|
3
|
-
As contributors and maintainers of this project, and in the interest of
|
4
|
-
fostering an open and welcoming community, we pledge to respect all people who
|
5
|
-
contribute through reporting issues, posting feature requests, updating
|
6
|
-
documentation, submitting pull requests or patches, and other activities.
|
7
|
-
|
8
|
-
We are committed to making participation in this project a harassment-free
|
9
|
-
experience for everyone, regardless of level of experience, gender, gender
|
10
|
-
identity and expression, sexual orientation, disability, personal appearance,
|
11
|
-
body size, race, ethnicity, age, religion, or nationality.
|
12
|
-
|
13
|
-
Examples of unacceptable behavior by participants include:
|
14
|
-
|
15
|
-
* The use of sexualized language or imagery
|
16
|
-
* Personal attacks
|
17
|
-
* Trolling or insulting/derogatory comments
|
18
|
-
* Public or private harassment
|
19
|
-
* Publishing other's private information, such as physical or electronic
|
20
|
-
addresses, without explicit permission
|
21
|
-
* Other unethical or unprofessional conduct
|
22
|
-
|
23
|
-
Project maintainers have the right and responsibility to remove, edit, or
|
24
|
-
reject comments, commits, code, wiki edits, issues, and other contributions
|
25
|
-
that are not aligned to this Code of Conduct, or to ban temporarily or
|
26
|
-
permanently any contributor for other behaviors that they deem inappropriate,
|
27
|
-
threatening, offensive, or harmful.
|
28
|
-
|
29
|
-
By adopting this Code of Conduct, project maintainers commit themselves to
|
30
|
-
fairly and consistently applying these principles to every aspect of managing
|
31
|
-
this project. Project maintainers who do not follow or enforce the Code of
|
32
|
-
Conduct may be permanently removed from the project team.
|
33
|
-
|
34
|
-
This code of conduct applies both within project spaces and in public spaces
|
35
|
-
when an individual is representing the project or its community.
|
36
|
-
|
37
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
38
|
-
reported by contacting a project maintainer at [email]. All
|
39
|
-
complaints will be reviewed and investigated and will result in a response that
|
40
|
-
is deemed necessary and appropriate to the circumstances. Maintainers are
|
41
|
-
obligated to maintain confidentiality with regard to the reporter of an
|
42
|
-
incident.
|
43
|
-
|
44
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
45
|
-
version 1.3.0, available at
|
46
|
-
[http://contributor-covenant.org/version/1/3/0/][version]
|
47
|
-
|
48
|
-
[homepage]: http://contributor-covenant.org
|
49
|
-
[version]: http://contributor-covenant.org/version/1/3/0/
|
data/Gemfile
DELETED
data/appveyor.yml
DELETED
@@ -1,21 +0,0 @@
|
|
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: "200"
|
13
|
-
- ruby_version: "200-x64"
|
14
|
-
- ruby_version: "21"
|
15
|
-
- ruby_version: "21-x64"
|
16
|
-
- ruby_version: "22"
|
17
|
-
- ruby_version: "22-x64"
|
18
|
-
- ruby_version: "23"
|
19
|
-
- ruby_version: "23-x64"
|
20
|
-
- ruby_version: "24"
|
21
|
-
- ruby_version: "24-x64"
|
data/examples/temp.txt
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
Consider the subtleness of the sea; how its most dreaded creatures glide under water, unapparent for the most part, and treacherously hidden beneath the loveliest tints of azure. Consider also the devilish brilliance and beauty of many of its most remorseless tribes, as the dainty embellished shape of many species of sharks. Consider, once more, the universal cannibalism of the sea; all whose creatures prey upon each other, carrying on eternal war since the world began.
|
2
|
-
|
3
|
-
Consider all this; and then turn to the green, gentle, and most docile earth; consider them both, the sea and the land; and do you not find a strange analogy to something in yourself? For as this appalling ocean surrounds the verdant land, so in the soul of man there lies one insular Tahiti, full of peace and joy, but encompassed by all the horrors of the half-known life. God keep thee! Push not off from that isle, thou canst never return!
|
4
|
-
|
5
|
-
Consider the subtleness of the sea; how its most dreaded creatures glide under water, unapparent for the most part, and treacherously hidden beneath the loveliest tints of azure. Consider also the devilish brilliance and beauty of many of its most remorseless tribes, as the dainty embellished shape of many species of sharks. Consider, once more, the universal cannibalism of the sea; all whose creatures prey upon each other, carrying on eternal war since the world began.
|
6
|
-
|
7
|
-
Consider all this; and then turn to the green, gentle, and most docile earth; consider them both, the sea and the land; and do you not find a strange analogy to something in yourself? For as this appalling ocean surrounds the verdant land, so in the soul of man there lies one insular Tahiti, full of peace and joy, but encompassed by all the horrors of the half-known life. God keep thee! Push not off from that isle, thou canst never return!
|
8
|
-
|
9
|
-
Consider the subtleness of the sea; how its most dreaded creatures glide under water, unapparent for the most part, and treacherously hidden beneath the loveliest tints of azure. Consider also the devilish brilliance and beauty of many of its most remorseless tribes, as the dainty embellished shape of many species of sharks. Consider, once more, the universal cannibalism of the sea; all whose creatures prey upon each other, carrying on eternal war since the world began.
|
10
|
-
|
11
|
-
Consider all this; and then turn to the green, gentle, and most docile earth; consider them both, the sea and the land; and do you not find a strange analogy to something in yourself? For as this appalling ocean surrounds the verdant land, so in the soul of man there lies one insular Tahiti, full of peace and joy, but encompassed by all the horrors of the half-known life. God keep thee! Push not off from that isle, thou canst never return!
|
12
|
-
|
13
|
-
Consider the subtleness of the sea; how its most dreaded creatures glide under water, unapparent for the most part, and treacherously hidden beneath the loveliest tints of azure. Consider also the devilish brilliance and beauty of many of its most remorseless tribes, as the dainty embellished shape of many species of sharks. Consider, once more, the universal cannibalism of the sea; all whose creatures prey upon each other, carrying on eternal war since the world began.
|
14
|
-
|
15
|
-
Consider all this; and then turn to the green, gentle, and most docile earth; consider them both, the sea and the land; and do you not find a strange analogy to something in yourself? For as this appalling ocean surrounds the verdant land, so in the soul of man there lies one insular Tahiti, full of peace and joy, but encompassed by all the horrors of the half-known life. God keep thee! Push not off from that isle, thou canst never return!
|
16
|
-
|
17
|
-
Consider the subtleness of the sea; how its most dreaded creatures glide under water, unapparent for the most part, and treacherously hidden beneath the loveliest tints of azure. Consider also the devilish brilliance and beauty of many of its most remorseless tribes, as the dainty embellished shape of many species of sharks. Consider, once more, the universal cannibalism of the sea; all whose creatures prey upon each other, carrying on eternal war since the world began.
|
18
|
-
|
19
|
-
Consider all this; and then turn to the green, gentle, and most docile earth; consider them both, the sea and the land; and do you not find a strange analogy to something in yourself? For as this appalling ocean surrounds the verdant land, so in the soul of man there lies one insular Tahiti, full of peace and joy, but encompassed by all the horrors of the half-known life. God keep thee! Push not off from that isle, thou canst never return!
|
20
|
-
|
21
|
-
Consider the subtleness of the sea; how its most dreaded creatures glide under water, unapparent for the most part, and treacherously hidden beneath the loveliest tints of azure. Consider also the devilish brilliance and beauty of many of its most remorseless tribes, as the dainty embellished shape of many species of sharks. Consider, once more, the universal cannibalism of the sea; all whose creatures prey upon each other, carrying on eternal war since the world began.
|
22
|
-
|
23
|
-
Consider all this; and then turn to the green, gentle, and most docile earth; consider them both, the sea and the land; and do you not find a strange analogy to something in yourself? For as this appalling ocean surrounds the verdant land, so in the soul of man there lies one insular Tahiti, full of peace and joy, but encompassed by all the horrors of the half-known life. God keep thee! Push not off from that isle, thou canst never return!
|
24
|
-
|
25
|
-
Consider the subtleness of the sea; how its most dreaded creatures glide under water, unapparent for the most part, and treacherously hidden beneath the loveliest tints of azure. Consider also the devilish brilliance and beauty of many of its most remorseless tribes, as the dainty embellished shape of many species of sharks. Consider, once more, the universal cannibalism of the sea; all whose creatures prey upon each other, carrying on eternal war since the world began.
|
26
|
-
|
27
|
-
Consider all this; and then turn to the green, gentle, and most docile earth; consider them both, the sea and the land; and do you not find a strange analogy to something in yourself? For as this appalling ocean surrounds the verdant land, so in the soul of man there lies one insular Tahiti, full of peace and joy, but encompassed by all the horrors of the half-known life. God keep thee! Push not off from that isle, thou canst never return!
|
28
|
-
|
29
|
-
Consider the subtleness of the sea; how its most dreaded creatures glide under water, unapparent for the most part, and treacherously hidden beneath the loveliest tints of azure. Consider also the devilish brilliance and beauty of many of its most remorseless tribes, as the dainty embellished shape of many species of sharks. Consider, once more, the universal cannibalism of the sea; all whose creatures prey upon each other, carrying on eternal war since the world began.
|
30
|
-
|
31
|
-
Consider all this; and then turn to the green, gentle, and most docile earth; consider them both, the sea and the land; and do you not find a strange analogy to something in yourself? For as this appalling ocean surrounds the verdant land, so in the soul of man there lies one insular Tahiti, full of peace and joy, but encompassed by all the horrors of the half-known life. God keep thee! Push not off from that isle, thou canst never return!
|
32
|
-
|
33
|
-
Consider the subtleness of the sea; how its most dreaded creatures glide under water, unapparent for the most part, and treacherously hidden beneath the loveliest tints of azure. Consider also the devilish brilliance and beauty of many of its most remorseless tribes, as the dainty embellished shape of many species of sharks. Consider, once more, the universal cannibalism of the sea; all whose creatures prey upon each other, carrying on eternal war since the world began.
|
34
|
-
|
35
|
-
Consider all this; and then turn to the green, gentle, and most docile earth; consider them both, the sea and the land; and do you not find a strange analogy to something in yourself? For as this appalling ocean surrounds the verdant land, so in the soul of man there lies one insular Tahiti, full of peace and joy, but encompassed by all the horrors of the half-known life. God keep thee! Push not off from that isle, thou canst never return!
|
36
|
-
|
37
|
-
Consider the subtleness of the sea; how its most dreaded creatures glide under water, unapparent for the most part, and treacherously hidden beneath the loveliest tints of azure. Consider also the devilish brilliance and beauty of many of its most remorseless tribes, as the dainty embellished shape of many species of sharks. Consider, once more, the universal cannibalism of the sea; all whose creatures prey upon each other, carrying on eternal war since the world began.
|
38
|
-
|
39
|
-
Consider all this; and then turn to the green, gentle, and most docile earth; consider them both, the sea and the land; and do you not find a strange analogy to something in yourself? For as this appalling ocean surrounds the verdant land, so in the soul of man there lies one insular Tahiti, full of peace and joy, but encompassed by all the horrors of the half-known life. God keep thee! Push not off from that isle, thou canst never return!
|
40
|
-
|
41
|
-
Consider the subtleness of the sea; how its most dreaded creatures glide under water, unapparent for the most part, and treacherously hidden beneath the loveliest tints of azure. Consider also the devilish brilliance and beauty of many of its most remorseless tribes, as the dainty embellished shape of many species of sharks. Consider, once more, the universal cannibalism of the sea; all whose creatures prey upon each other, carrying on eternal war since the world began.
|
42
|
-
|
43
|
-
Consider all this; and then turn to the green, gentle, and most docile earth; consider them both, the sea and the land; and do you not find a strange analogy to something in yourself? For as this appalling ocean surrounds the verdant land, so in the soul of man there lies one insular Tahiti, full of peace and joy, but encompassed by all the horrors of the half-known life. God keep thee! Push not off from that isle, thou canst never return!
|
44
|
-
|
45
|
-
Consider the subtleness of the sea; how its most dreaded creatures glide under water, unapparent for the most part, and treacherously hidden beneath the loveliest tints of azure. Consider also the devilish brilliance and beauty of many of its most remorseless tribes, as the dainty embellished shape of many species of sharks. Consider, once more, the universal cannibalism of the sea; all whose creatures prey upon each other, carrying on eternal war since the world began.
|
46
|
-
|
47
|
-
Consider all this; and then turn to the green, gentle, and most docile earth; consider them both, the sea and the land; and do you not find a strange analogy to something in yourself? For as this appalling ocean surrounds the verdant land, so in the soul of man there lies one insular Tahiti, full of peace and joy, but encompassed by all the horrors of the half-known life. God keep thee! Push not off from that isle, thou canst never return!
|
48
|
-
|
49
|
-
Consider all this; and then turn to the green, gentle, and most docile earth; consider them both, the sea and the land; and do you not find a strange analogy to something in yourself? For as this appalling ocean surrounds the verdant land, so in the soul of man there lies one insular Tahiti, full of peace and joy, but encompassed by all the horrors of the half-known life. God keep thee! Push not off from that isle, thou canst never return!
|