ttytest2 0.9.5 → 0.9.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -4
- data/lib/ttytest/constants.rb +1 -1
- data/lib/ttytest/terminal.rb +4 -3
- data/lib/ttytest/tmux/session.rb +5 -0
- data/lib/ttytest/version.rb +1 -1
- data/notes.txt +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 196acc1f485c7ad416fbdbe07c94f0829bfb53a57c852a85bf79d72655f4debb
|
4
|
+
data.tar.gz: a2afc1f836dff32a2e2aa53a90137ce9bd768a20907855defae05da66af821e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 762f9246cadb92d30ef2d8535b135cb9d72270d8e24bc100c8d18e18ecdd949e35560a7ff6fdc3b413a7dffbacbef56cf712c0b459b4cc3f8f7797dbfeca61d3
|
7
|
+
data.tar.gz: 2e099fda420602c981073d9cb39d9be307e261086ac8682ec4b213b6a061eded99a9ccff73df9e6c16a9157676fc4dea03a33d834d643fcfdf63631090807156
|
data/README.md
CHANGED
@@ -137,17 +137,20 @@ Helper functions to make sending output easier! They use the methods above under
|
|
137
137
|
* `send_down_arrows(number_of_times)`
|
138
138
|
* `send_home` # simulate pressing the Home key
|
139
139
|
* `send_end` # simulate pressing the End key
|
140
|
+
* `send_clear` # clear the screen by sending clear ascii code
|
140
141
|
|
141
142
|
### Troubleshooting
|
142
143
|
|
143
144
|
You can use the method rows to get all rows of the terminal as an array, of use the method capture to get the contents of the terminal window. This can be useful when troubleshooting.
|
144
145
|
|
145
146
|
``` ruby
|
146
|
-
|
147
|
-
@tty.
|
147
|
+
# you can use @tty.rows to access the entire pane, split by line into an array.
|
148
|
+
p @tty.rows # prints out the contents of the terminal as a array.
|
149
|
+
@tty.print_rows # equivalent to above, just for ease of use.
|
148
150
|
|
149
|
-
|
150
|
-
@tty.
|
151
|
+
# you can use @tty.capture to access the entire pane.
|
152
|
+
p "\n#{@tty.capture}" # prints out the contents of the terminal
|
153
|
+
@tty.print # equivalent to above, just for ease of use.
|
151
154
|
```
|
152
155
|
|
153
156
|
### Constants
|
data/lib/ttytest/constants.rb
CHANGED
data/lib/ttytest/terminal.rb
CHANGED
@@ -75,8 +75,8 @@ module TTYtest
|
|
75
75
|
:send_backspace, :send_backspaces,
|
76
76
|
:send_left_arrow, :send_left_arrows, :send_right_arrow, :send_right_arrows,
|
77
77
|
:send_down_arrow, :send_down_arrows, :send_up_arrow, :send_up_arrows,
|
78
|
-
:send_keys_exact, :send_home, :send_end,
|
79
|
-
:capture
|
78
|
+
:send_keys_exact, :send_home, :send_end, :send_clear,
|
79
|
+
:capture
|
80
80
|
|
81
81
|
# @!method rows
|
82
82
|
# @return [Array<String>]
|
@@ -102,7 +102,8 @@ module TTYtest
|
|
102
102
|
# @!method cursor_hidden?
|
103
103
|
# @see Capture#cursor_hidden?
|
104
104
|
# @return [true,false]
|
105
|
-
def_delegators :capture, :
|
105
|
+
def_delegators :capture, :print, :print_rows,
|
106
|
+
:rows, :row,
|
106
107
|
:width, :height,
|
107
108
|
:cursor_x, :cursor_y,
|
108
109
|
:cursor_visible?, :cursor_hidden?
|
data/lib/ttytest/tmux/session.rb
CHANGED
data/lib/ttytest/version.rb
CHANGED
data/notes.txt
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ttytest2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Eski
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|