tui-td 0.2.0 → 0.2.1
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/CHANGELOG.md +4 -0
- data/README.md +10 -0
- data/lib/tui_td/driver.rb +7 -0
- data/lib/tui_td/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2434731fd0c15251a24a4e29168f4b9c7b5332d83eb9d50143225f5e13102404
|
|
4
|
+
data.tar.gz: c2827f1bbeef39368e675960b896f93e0369ee64e167094108c1ca8a0838afde
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 50f1ade06d2f2c921a77c4af6a4ff5a770754de165bf4e619c0d8ba21b73365d6172ea55f1863345e874ff32f5c5b997b0cae9cdb25ea844190a10d2f67cb324
|
|
7
|
+
data.tar.gz: e7c60585ec015b1b86d1b9f9a2546297f7eb4605f3af1ecf1048182fbfb09f4916a0c590d4ee4c955174b555f736b2b11fd2255df07bca3d4ae0fa53c44475f5
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -142,6 +142,16 @@ Global options:
|
|
|
142
142
|
`tui-td --help` serves as the full CLI reference. `tui-td help test` shows all JSON test
|
|
143
143
|
step types and `tui-td help rspec` shows all RSpec matchers — no need to consult the docs.
|
|
144
144
|
|
|
145
|
+
## Demo
|
|
146
|
+
|
|
147
|
+
Step-by-step live view of a vim test — type "Hello World", copy the line, replace "World" with "Sun":
|
|
148
|
+
|
|
149
|
+

|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
tui-td -vls test examples/vim_hello_world.json
|
|
153
|
+
```
|
|
154
|
+
|
|
145
155
|
## Ruby API
|
|
146
156
|
|
|
147
157
|
### Driver — Start, send, capture
|
data/lib/tui_td/driver.rb
CHANGED
|
@@ -123,6 +123,13 @@ module TUITD
|
|
|
123
123
|
@output_mutex.synchronize { @output_buffer.dup }
|
|
124
124
|
end
|
|
125
125
|
|
|
126
|
+
# Refresh the terminal state by re-parsing the output buffer.
|
|
127
|
+
# Call this if the terminal content has changed and you need an up-to-date state.
|
|
128
|
+
def refresh
|
|
129
|
+
refresh_state!
|
|
130
|
+
@state
|
|
131
|
+
end
|
|
132
|
+
|
|
126
133
|
# Get structured terminal state as a Hash
|
|
127
134
|
def state_data
|
|
128
135
|
refresh_state! if @state.nil?
|
data/lib/tui_td/version.rb
CHANGED