tty-cursor 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 23195e489d60c01aae24ad6398374fe4c3dffe42
4
- data.tar.gz: 5b16b43ca2729ab6c01f73cdcc1a6e0ed8a6dc68
3
+ metadata.gz: 1a327e575afda2187a43bf90385fae901872320f
4
+ data.tar.gz: bb8ad05a2a7740c63fb0532cd96f295b040f2258
5
5
  SHA512:
6
- metadata.gz: cee8876c8723e1ae9d166ad0c1a7592a63ff0b07bf39ca494887cc9c72678a4c63531db589cd2422bd6f44fd3820231320bebcd82c2222e21095bd8156673b04
7
- data.tar.gz: a058245a4c1aab1b257c3d2a585de7c587e90369d2ac7cb36c3241f1278a0419c4aedc1b36bfe313a54e26d12f74cbe2d382f37e755c651cd2f04b799508f459
6
+ metadata.gz: b9190c8bfe4ccb4987a3880492a6c939e1ca2e2668e3d2d578212dc2fc083bb6c53254dc330baa78d856e16035d2a532a40066e2608ed035551be9e6681bc31e
7
+ data.tar.gz: ea66792a3c695eeded5733cac0968ad1f8b85ba0687b02c4e46e64fb25ca50e4ff373caa34c5fcefdef069322a8184adbee7438b24888bfe402f8dc297b85333
data/.travis.yml CHANGED
@@ -9,6 +9,7 @@ rvm:
9
9
  - 2.0
10
10
  - 2.1
11
11
  - 2.2
12
+ - 2.3.0
12
13
  - ruby-head
13
14
  matrix:
14
15
  include:
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Change log
2
2
 
3
+ ## [v0.3.0] - 2016-05-21
4
+
5
+ ### Fixed
6
+ * Fix prev_line to work in iTerm2 and Putty by @m-o-e
7
+
3
8
  ## [v0.2.0] - 2015-12-28
4
9
 
5
10
  ### Changed
@@ -9,5 +14,6 @@
9
14
 
10
15
  * Initial implementation and release
11
16
 
17
+ [v0.3.0]: https://github.com/peter-murach/tty-cursor/compare/v0.2.0...v0.3.0
12
18
  [v0.2.0]: https://github.com/peter-murach/tty-cursor/compare/v0.1.0...v0.2.0
13
19
  [v0.1.0]: https://github.com/peter-murach/tty-cursor/compare/v0.1.0
data/README.md CHANGED
@@ -1,21 +1,22 @@
1
- # TTY::Cursor
1
+ # TTY::Cursor [![Gitter](https://badges.gitter.im/Join%20Chat.svg)][gitter]
2
2
  [![Gem Version](https://badge.fury.io/rb/tty-cursor.svg)][gem]
3
- [![Build Status](https://secure.travis-ci.org/peter-murach/tty-cursor.svg?branch=master)][travis]
4
- [![Code Climate](https://codeclimate.com/github/peter-murach/tty-cursor/badges/gpa.svg)][codeclimate]
5
- [![Coverage Status](https://coveralls.io/repos/peter-murach/tty-cursor/badge.svg)][coverage]
6
- [![Inline docs](http://inch-ci.org/github/peter-murach/tty-cursor.svg?branch=master)][inchpages]
3
+ [![Build Status](https://secure.travis-ci.org/piotrmurach/tty-cursor.svg?branch=master)][travis]
4
+ [![Code Climate](https://codeclimate.com/github/piotrmurach/tty-cursor/badges/gpa.svg)][codeclimate]
5
+ [![Coverage Status](https://coveralls.io/repos/piotrmurach/tty-cursor/badge.svg)][coverage]
6
+ [![Inline docs](http://inch-ci.org/github/piotrmurach/tty-cursor.svg?branch=master)][inchpages]
7
7
 
8
+ [gitter]: https://gitter.im/piotrmurach/tty
8
9
  [gem]: http://badge.fury.io/rb/tty-cursor
9
- [travis]: http://travis-ci.org/peter-murach/tty-cursor
10
- [codeclimate]: https://codeclimate.com/github/peter-murach/tty-cursor
11
- [coverage]: https://coveralls.io/r/peter-murach/tty-cursor
12
- [inchpages]: http://inch-ci.org/github/peter-murach/tty-cursor
10
+ [travis]: http://travis-ci.org/piotrmurach/tty-cursor
11
+ [codeclimate]: https://codeclimate.com/github/piotrmurach/tty-cursor
12
+ [coverage]: https://coveralls.io/r/piotrmurach/tty-cursor
13
+ [inchpages]: http://inch-ci.org/github/piotrmurach/tty-cursor
13
14
 
14
15
  > Terminal cursor movement and manipulation of cursor properties such as visibility.
15
16
 
16
17
  The purpose of this library is to help move terminal cursor around using intuitive commands and help in clearing terminal screen.
17
18
 
18
- **TTY::Cursor** provides independent cursor movement component for [TTY](https://github.com/peter-murach/tty) toolkit.
19
+ **TTY::Cursor** provides independent cursor movement component for [TTY](https://github.com/piotrmurach/tty) toolkit.
19
20
 
20
21
  ## Installation
21
22
 
@@ -183,7 +184,7 @@ Erase the screen with the background colour and moves the cursor to home.
183
184
 
184
185
  ## Contributing
185
186
 
186
- 1. Fork it ( https://github.com/peter-murach/tty-cursor/fork )
187
+ 1. Fork it ( https://github.com/piotrmurach/tty-cursor/fork )
187
188
  2. Create your feature branch (`git checkout -b my-new-feature`)
188
189
  3. Commit your changes (`git commit -am 'Add some feature'`)
189
190
  4. Push to the branch (`git push origin my-new-feature`)
@@ -191,4 +192,4 @@ Erase the screen with the background colour and moves the cursor to home.
191
192
 
192
193
  ## Copyright
193
194
 
194
- Copyright (c) 2015 Piotr Murach. See LICENSE for further details.
195
+ Copyright (c) 2015-2016 Piotr Murach. See LICENSE for further details.
data/lib/tty/cursor.rb CHANGED
@@ -118,7 +118,7 @@ module TTY
118
118
 
119
119
  # @api public
120
120
  def prev_line
121
- ECMA_CSI + 'F'
121
+ ECMA_CSI + 'A' + ECMA_CSI + '1G'
122
122
  end
123
123
 
124
124
  # Clear current line
data/lib/tty/version.rb CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
  module TTY
4
4
  module Cursor
5
- VERSION = '0.2.0'
5
+ VERSION = '0.3.0'
6
6
  end # Cursor
7
7
  end # TTY
@@ -19,7 +19,7 @@ RSpec.describe TTY::Cursor do
19
19
  expect(cursor.restore).to eq("\e[u")
20
20
  end
21
21
 
22
- it "gets current cursor positoin" do
22
+ it "gets current cursor position" do
23
23
  expect(cursor.current).to eq("\e[6n")
24
24
  end
25
25
 
@@ -64,7 +64,7 @@ RSpec.describe TTY::Cursor do
64
64
  end
65
65
 
66
66
  it "moves cursor to previous line" do
67
- expect(cursor.prev_line).to eq("\e[F")
67
+ expect(cursor.prev_line).to eq("\e[A\e[1G")
68
68
  end
69
69
 
70
70
  it "hides cursor for the duration of block call" do
data/tty-cursor.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = [""]
11
11
  spec.summary = %q{Terminal cursor movement and manipulation of cursor properties such as visibility.}
12
12
  spec.description = %q{The purpose of this library is to help move terminal cursor around using intuitive commands and help in clearing terminal screen.}
13
- spec.homepage = 'http://peter-murach.github.io/tty/'
13
+ spec.homepage = 'http://piotrmurach.github.io/tty/'
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0")
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.2.0
4
+ version: 0.3.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: 2015-12-28 00:00:00.000000000 Z
11
+ date: 2016-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -53,7 +53,7 @@ files:
53
53
  - tasks/coverage.rake
54
54
  - tasks/spec.rake
55
55
  - tty-cursor.gemspec
56
- homepage: http://peter-murach.github.io/tty/
56
+ homepage: http://piotrmurach.github.io/tty/
57
57
  licenses:
58
58
  - MIT
59
59
  metadata: {}