tty-cursor 0.5.0 → 0.6.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 +5 -5
- data/.travis.yml +5 -8
- data/CHANGELOG.md +10 -0
- data/Gemfile +0 -2
- data/README.md +4 -4
- data/appveyor.yml +4 -4
- data/lib/tty-cursor.rb +0 -3
- data/lib/tty/cursor.rb +4 -3
- data/lib/tty/{version.rb → cursor/version.rb} +2 -2
- data/spec/unit/clear_lines_spec.rb +2 -2
- data/tty-cursor.gemspec +2 -3
- metadata +14 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 961939b5f85e33e484986352a87106166e0e09d2e885a6dc5b4c2544069a0a00
|
4
|
+
data.tar.gz: 5a5a06e9a2224e4749f92022c20c32f771b7f3a395f57bf883adf4623e4e1d01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: faeda15b5d14114884321ecb85163000d638d543ca3d60fcecbe1d5966a58e61ef7013cfc661db3c16cb2671b6237ee767568f64217cc9455cf369ca3959ae95
|
7
|
+
data.tar.gz: bddac1063b4d98d3a30c7ca5ec6bca650823eef378dc311c43e59fcd1ea68bc2f9dbf9df0d87af21806e1d3759f86d83637b348324f870c9b3cb5463d7b27ca7
|
data/.travis.yml
CHANGED
@@ -5,22 +5,19 @@ cache: bundler
|
|
5
5
|
bundler_args: --without yard benchmarks
|
6
6
|
script: "bundle exec rake ci"
|
7
7
|
rvm:
|
8
|
-
- 1.9.3
|
9
8
|
- 2.0.0
|
10
9
|
- 2.1.10
|
11
|
-
- 2.2.
|
12
|
-
- 2.3.
|
13
|
-
- 2.4.
|
10
|
+
- 2.2.9
|
11
|
+
- 2.3.6
|
12
|
+
- 2.4.4
|
13
|
+
- 2.5.1
|
14
14
|
- ruby-head
|
15
|
-
- jruby-
|
15
|
+
- jruby-9.1.5.0
|
16
16
|
- jruby-head
|
17
|
-
- rbx-3
|
18
17
|
matrix:
|
19
18
|
allow_failures:
|
20
|
-
- rvm: 2.4.0
|
21
19
|
- rvm: ruby-head
|
22
20
|
- rvm: jruby-head
|
23
|
-
- rvm: rbx-3
|
24
21
|
fast_finish: true
|
25
22
|
branches:
|
26
23
|
only: master
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# Change log
|
2
2
|
|
3
|
+
## [v0.6.0] - 2018-07-13
|
4
|
+
|
5
|
+
### Changed
|
6
|
+
* Remove encoding magic comments
|
7
|
+
|
8
|
+
### Fixed
|
9
|
+
* Fix #clear_line_before/after to use correct control symbols by Xinyue Lu(@msg7086)
|
10
|
+
* Fix gem vendoring by moving version file to its own folder
|
11
|
+
|
3
12
|
## [v0.5.0] - 2017-08-01
|
4
13
|
|
5
14
|
### Changed
|
@@ -37,6 +46,7 @@
|
|
37
46
|
|
38
47
|
* Initial implementation and release
|
39
48
|
|
49
|
+
[v0.6.0]: https://github.com/peter-murach/tty-cursor/compare/v0.5.0...v0.6.0
|
40
50
|
[v0.5.0]: https://github.com/peter-murach/tty-cursor/compare/v0.4.0...v0.5.0
|
41
51
|
[v0.4.0]: https://github.com/peter-murach/tty-cursor/compare/v0.3.0...v0.4.0
|
42
52
|
[v0.3.0]: https://github.com/peter-murach/tty-cursor/compare/v0.2.0...v0.3.0
|
data/Gemfile
CHANGED
@@ -3,7 +3,6 @@ source 'https://rubygems.org'
|
|
3
3
|
gemspec
|
4
4
|
|
5
5
|
group :development do
|
6
|
-
gem 'yard', '~> 0.8.7'
|
7
6
|
gem 'benchmark-ips', '~> 2.0.0'
|
8
7
|
end
|
9
8
|
|
@@ -11,5 +10,4 @@ group :metrics do
|
|
11
10
|
gem 'coveralls', '~> 0.8.9'
|
12
11
|
gem 'simplecov', '~> 0.10.0'
|
13
12
|
gem 'yardstick', '~> 0.9.9'
|
14
|
-
gem 'term-ansicolor', '=1.3.2'
|
15
13
|
end
|
data/README.md
CHANGED
@@ -61,8 +61,8 @@ Or install it yourself as:
|
|
61
61
|
* [2.3 Text Modification](#23-text-modification)
|
62
62
|
* [2.3.1 clear_char(n)](#231-clear_charn)
|
63
63
|
* [2.3.2 clear_line](#232-clear_line)
|
64
|
-
* [2.3.3 clear_line_before](#233-
|
65
|
-
* [2.3.4 clear_line_after](#234-
|
64
|
+
* [2.3.3 clear_line_before](#233-clear_line_before)
|
65
|
+
* [2.3.4 clear_line_after](#234-clear_line_after)
|
66
66
|
* [2.3.5 clear_lines(n, direction)](#235-clear_linesn-direction)
|
67
67
|
* [2.3.6 clear_screen_down](#236-clear_screen_down)
|
68
68
|
* [2.3.7 clear_screen_up](#237-clear_screen_up)
|
@@ -104,7 +104,7 @@ Cursor movement will be bounded by the current viewport into the buffer. Scrolli
|
|
104
104
|
|
105
105
|
#### 2.1.1 move_to(x, y)
|
106
106
|
|
107
|
-
Set the cursor absolute position where
|
107
|
+
Set the cursor absolute position to `x` and `y` coordinate, where `x` is the column of the `y` line.
|
108
108
|
|
109
109
|
If no row/column parameters are provided, the cursor will move to the home position, at the upper left of the screen:
|
110
110
|
|
@@ -238,4 +238,4 @@ This project is intended to be a safe, welcoming space for collaboration, and co
|
|
238
238
|
|
239
239
|
## Copyright
|
240
240
|
|
241
|
-
Copyright (c) 2015-
|
241
|
+
Copyright (c) 2015-2018 Piotr Murach. See LICENSE for further details.
|
data/appveyor.yml
CHANGED
@@ -9,7 +9,6 @@ test_script:
|
|
9
9
|
- bundle exec rake ci
|
10
10
|
environment:
|
11
11
|
matrix:
|
12
|
-
- ruby_version: "193"
|
13
12
|
- ruby_version: "200"
|
14
13
|
- ruby_version: "200-x64"
|
15
14
|
- ruby_version: "21"
|
@@ -18,6 +17,7 @@ environment:
|
|
18
17
|
- ruby_version: "22-x64"
|
19
18
|
- ruby_version: "23"
|
20
19
|
- ruby_version: "23-x64"
|
21
|
-
|
22
|
-
|
23
|
-
- ruby_version: "
|
20
|
+
- ruby_version: "24"
|
21
|
+
- ruby_version: "24-x64"
|
22
|
+
- ruby_version: "25"
|
23
|
+
- ruby_version: "25-x64"
|
data/lib/tty-cursor.rb
CHANGED
data/lib/tty/cursor.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
|
-
# encoding: utf-8
|
2
1
|
# frozen_string_literal: true
|
3
2
|
|
3
|
+
require_relative 'cursor/version'
|
4
|
+
|
4
5
|
module TTY
|
5
6
|
# Terminal cursor movement ANSI codes
|
6
7
|
module Cursor
|
@@ -147,14 +148,14 @@ module TTY
|
|
147
148
|
# the current cursor position.
|
148
149
|
# @api public
|
149
150
|
def clear_line_before
|
150
|
-
CSI + '
|
151
|
+
CSI + '1K'
|
151
152
|
end
|
152
153
|
|
153
154
|
# Erase from the current position (inclusive) to
|
154
155
|
# the end of the line
|
155
156
|
# @api public
|
156
157
|
def clear_line_after
|
157
|
-
CSI + '
|
158
|
+
CSI + '0K'
|
158
159
|
end
|
159
160
|
|
160
161
|
# Clear a number of lines
|
@@ -16,11 +16,11 @@ RSpec.describe TTY::Cursor, '#clear_lines' do
|
|
16
16
|
end
|
17
17
|
|
18
18
|
it "clears the line before the cursor" do
|
19
|
-
expect(cursor.clear_line_before).to eq("\e[
|
19
|
+
expect(cursor.clear_line_before).to eq("\e[1K")
|
20
20
|
end
|
21
21
|
|
22
22
|
it "clears the line after the cursor" do
|
23
|
-
expect(cursor.clear_line_after).to eq("\e[
|
23
|
+
expect(cursor.clear_line_after).to eq("\e[0K")
|
24
24
|
end
|
25
25
|
|
26
26
|
it "clears 5 lines up" do
|
data/tty-cursor.gemspec
CHANGED
@@ -1,7 +1,6 @@
|
|
1
|
-
# coding: utf-8
|
2
1
|
lib = File.expand_path('../lib', __FILE__)
|
3
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'tty/version'
|
3
|
+
require 'tty/cursor/version'
|
5
4
|
|
6
5
|
Gem::Specification.new do |spec|
|
7
6
|
spec.name = 'tty-cursor'
|
@@ -19,6 +18,6 @@ Gem::Specification.new do |spec|
|
|
19
18
|
spec.require_paths = ["lib"]
|
20
19
|
|
21
20
|
spec.add_development_dependency 'bundler', '~> 1.6'
|
21
|
+
spec.add_development_dependency 'rspec', '~> 3.1'
|
22
22
|
spec.add_development_dependency 'rake'
|
23
|
-
spec.add_development_dependency 'rspec', '~> 3.5.0'
|
24
23
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tty-cursor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.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:
|
11
|
+
date: 2018-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -25,33 +25,33 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.6'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '3.1'
|
34
34
|
type: :development
|
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: '
|
40
|
+
version: '3.1'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: '0'
|
48
48
|
type: :development
|
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:
|
54
|
+
version: '0'
|
55
55
|
description: The purpose of this library is to help move the terminal cursor around
|
56
56
|
and manipulate text by using intuitive method calls.
|
57
57
|
email:
|
@@ -72,7 +72,7 @@ files:
|
|
72
72
|
- appveyor.yml
|
73
73
|
- lib/tty-cursor.rb
|
74
74
|
- lib/tty/cursor.rb
|
75
|
-
- lib/tty/version.rb
|
75
|
+
- lib/tty/cursor/version.rb
|
76
76
|
- spec/spec_helper.rb
|
77
77
|
- spec/unit/clear_lines_spec.rb
|
78
78
|
- spec/unit/cursor_spec.rb
|
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
102
|
version: '0'
|
103
103
|
requirements: []
|
104
104
|
rubyforge_project:
|
105
|
-
rubygems_version: 2.
|
105
|
+
rubygems_version: 2.7.3
|
106
106
|
signing_key:
|
107
107
|
specification_version: 4
|
108
108
|
summary: Terminal cursor positioning, visibility and text manipulation.
|
@@ -112,4 +112,3 @@ test_files:
|
|
112
112
|
- spec/unit/cursor_spec.rb
|
113
113
|
- spec/unit/move_spec.rb
|
114
114
|
- spec/unit/move_to_spec.rb
|
115
|
-
has_rdoc:
|