markdown_exec 3.5.0 → 3.5.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 +11 -0
- data/Dockerfile.test +42 -0
- data/Gemfile.lock +4 -1
- data/README.md +24 -31
- data/Rakefile +34 -26
- data/bats/block-type-ux-echo.bats +1 -1
- data/bin/bmde +1 -1
- data/docs/dev/block-type-ux-echo.md +2 -1
- data/docs/docker-testing.md +115 -0
- data/docs/tab-completion.md +33 -0
- data/lib/collapser.rb +1 -1
- data/lib/evaluate_shell_expressions.rb +1 -1
- data/lib/find_files.rb +1 -2
- data/lib/input_sequencer.rb +1 -1
- data/lib/instance_method_wrapper.rb +1 -1
- data/lib/markdown_exec/version.rb +1 -1
- data/lib/markdown_exec.rb +1 -1
- data/lib/parameter_expansion.rb +1 -1
- data/lib/resize_terminal.rb +2 -16
- metadata +5 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6becba5a0ff94fb60399da0fc99248fff83905def9c65e4a8e1ae9c597652036
|
|
4
|
+
data.tar.gz: 98f0d4ad3764fec26b4ed8f1bce1904af1f350853b3e2678847f0557b381e8bf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b2d1d60bcf1fe258a8be76893b070ab418563e27923c9e8a4370cd04fa5e0d421732c3c51e76e596a5d492885170270437916035530f64ba2e99a98d215bd908
|
|
7
|
+
data.tar.gz: 306d802cfcfc5bfa9460e2d58a69ac4f9ac0c058a28859243a237682d2622549277ff6f8515f84c51b2a2ede229c3f95eaa9a0ce5b9dbde98bfc2ad862c9aa8f
|
data/CHANGELOG.md
CHANGED
data/Dockerfile.test
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
FROM ruby:3.3-bookworm
|
|
2
|
+
|
|
3
|
+
ENV LANG C.UTF-8
|
|
4
|
+
|
|
5
|
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
6
|
+
build-essential \
|
|
7
|
+
bsdmainutils \
|
|
8
|
+
gawk \
|
|
9
|
+
git \
|
|
10
|
+
tree \
|
|
11
|
+
vim
|
|
12
|
+
|
|
13
|
+
# `markdown_exec` is the name expected by some BATS tests
|
|
14
|
+
WORKDIR /markdown_exec
|
|
15
|
+
|
|
16
|
+
# Clone the repository (shallow clone for faster builds)
|
|
17
|
+
ARG GIT_BRANCH=main
|
|
18
|
+
RUN git clone --depth 1 --branch ${GIT_BRANCH} https://github.com/fareedst/markdown_exec.git .
|
|
19
|
+
|
|
20
|
+
# Initialize and update git submodules
|
|
21
|
+
RUN git submodule update --init --recursive
|
|
22
|
+
|
|
23
|
+
# Install dependencies
|
|
24
|
+
RUN bundle install
|
|
25
|
+
|
|
26
|
+
# Add aliases
|
|
27
|
+
RUN echo 'alias batsv="bats --verbose-run --show-output-of-passing-tests"' >> ~/.bashrc && \
|
|
28
|
+
echo 'alias be="bundle exec"' >> ~/.bashrc && \
|
|
29
|
+
echo 'alias bmde="bin/bmde"' >> ~/.bashrc && \
|
|
30
|
+
echo 'alias ll="ls -FGlAhp"' >> ~/.bashrc
|
|
31
|
+
|
|
32
|
+
RUN git submodule add https://github.com/bats-core/bats-core.git test/bats && \
|
|
33
|
+
git submodule add https://github.com/bats-core/bats-support.git test/test_helper/bats-support && \
|
|
34
|
+
git submodule add https://github.com/bats-core/bats-assert.git test/test_helper/bats-assert
|
|
35
|
+
|
|
36
|
+
# make dirs, file for BATS tests
|
|
37
|
+
RUN mkdir -p logs
|
|
38
|
+
RUN mkdir -p docs/research
|
|
39
|
+
RUN echo '04:31 e' > logs/mde_site.local_2024-07-31-20-04-01___examples_save_md_~_test_.out.txt
|
|
40
|
+
RUN ln -s /markdown_exec/test/bats/bin/bats /usr/local/bin/
|
|
41
|
+
|
|
42
|
+
CMD ["bash"]
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
markdown_exec (3.5.
|
|
4
|
+
markdown_exec (3.5.1)
|
|
5
5
|
clipboard (~> 1.3.6)
|
|
6
6
|
open3 (~> 0.1.1)
|
|
7
7
|
optparse (~> 0.1.1)
|
|
@@ -107,6 +107,8 @@ GEM
|
|
|
107
107
|
mocha (2.4.5)
|
|
108
108
|
ruby2_keywords (>= 0.0.5)
|
|
109
109
|
mutex_m (0.2.0)
|
|
110
|
+
nokogiri (1.16.6-aarch64-linux)
|
|
111
|
+
racc (~> 1.4)
|
|
110
112
|
nokogiri (1.16.6-arm64-darwin)
|
|
111
113
|
racc (~> 1.4)
|
|
112
114
|
open3 (0.1.2)
|
|
@@ -224,6 +226,7 @@ GEM
|
|
|
224
226
|
zeitwerk (2.6.16)
|
|
225
227
|
|
|
226
228
|
PLATFORMS
|
|
229
|
+
aarch64-linux
|
|
227
230
|
arm64-darwin-21
|
|
228
231
|
|
|
229
232
|
DEPENDENCIES
|
data/README.md
CHANGED
|
@@ -269,36 +269,7 @@ mde --save-executed-script 1 --user-must-approve 1 --config my-config.yml
|
|
|
269
269
|
|
|
270
270
|
## Tab Completion
|
|
271
271
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
Append a command to load the completion script to your shell configuration file. `mde` must be executable for the command to be composed correctly.
|
|
275
|
-
|
|
276
|
-
```bash
|
|
277
|
-
echo "source $(mde --pwd)/bin/tab_completion.sh" >> ~/.bash_profile
|
|
278
|
-
```
|
|
279
|
-
|
|
280
|
-
### Behavior
|
|
281
|
-
|
|
282
|
-
Press tab for completions appropriate to the current input.
|
|
283
|
-
`mde <...> <prior word> <current word><TAB>`
|
|
284
|
-
|
|
285
|
-
Completions are calculated based on the current word and the prior word.
|
|
286
|
-
1. If the current word starts with `-`, present matching options, eg `--version` for the current word `--v`.
|
|
287
|
-
2. Else, if the current word is empty and the prior word is an option that takes an argument, present the type of the argument, eg `.BOOL.` for the option `--user-must-approve`.
|
|
288
|
-
3. Else, if the current word is the type of argument, from the rule above, present the default value for the option. e.g. `1` for the type `.BOOL.` for the option `--user-must-approve`.
|
|
289
|
-
4. Else, if the current word is non-empty, list matching files and folders.
|
|
290
|
-
|
|
291
|
-
### Example Completions
|
|
292
|
-
|
|
293
|
-
In the table below, tab is indicated by `!`
|
|
294
|
-
| Input | Completions |
|
|
295
|
-
| :--- | :--- |
|
|
296
|
-
| `mde !` | local files and folders |
|
|
297
|
-
| `mde -!` | all options |
|
|
298
|
-
| `mde --!` | all options |
|
|
299
|
-
| `mde --v!` | `mde --version` |
|
|
300
|
-
| `mde --user-must-approve !` | `mde --user-must-approve .BOOL.`|
|
|
301
|
-
| `mde --user-must-approve .BOOL.!` | `mde --user-must-approve 1` |
|
|
272
|
+
See [Tab Completion Documentation](docs/tab-completion.md) for installation and usage instructions.
|
|
302
273
|
|
|
303
274
|
## Example: Interactive Workflow
|
|
304
275
|
|
|
@@ -351,7 +322,29 @@ vars:
|
|
|
351
322
|
|
|
352
323
|
# Testing
|
|
353
324
|
|
|
354
|
-
|
|
325
|
+
## Docker Testing Environment
|
|
326
|
+
|
|
327
|
+
For a complete testing environment with all dependencies, use the Docker testing container:
|
|
328
|
+
|
|
329
|
+
```bash
|
|
330
|
+
# Build the test environment
|
|
331
|
+
docker build -f Dockerfile.test -t markdown-exec-test .
|
|
332
|
+
|
|
333
|
+
# Run all tests (RSpec, Minitest, and BATS)
|
|
334
|
+
docker run -it markdown-exec-test bash -c 'bundle exec rake test'
|
|
335
|
+
|
|
336
|
+
# Run individual test suites
|
|
337
|
+
docker run -it markdown-exec-test bash -c 'bundle exec rspec' # RSpec only
|
|
338
|
+
docker run -it markdown-exec-test bash -c 'bundle exec rake minitest' # Minitest only
|
|
339
|
+
docker run -it markdown-exec-test bash -c 'bundle exec rake bats' # BATS tests only
|
|
340
|
+
|
|
341
|
+
# Enter the container interactively
|
|
342
|
+
docker run --rm -it markdown-exec-test bash
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
## Local Testing
|
|
346
|
+
|
|
347
|
+
Execute tests for individual libraries locally:
|
|
355
348
|
|
|
356
349
|
`bundle exec rake minitest`
|
|
357
350
|
|
data/Rakefile
CHANGED
|
@@ -77,25 +77,25 @@ end
|
|
|
77
77
|
def execute_with_error_handling(iterator)
|
|
78
78
|
all_error_level = 0
|
|
79
79
|
all_failed_files = []
|
|
80
|
-
|
|
80
|
+
|
|
81
81
|
iterator.each do |item|
|
|
82
82
|
command = yield(item)
|
|
83
83
|
next unless command # Skip if command is nil
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
|
|
85
|
+
system(command)
|
|
86
86
|
error_level = $?.exitstatus
|
|
87
87
|
|
|
88
|
-
|
|
89
|
-
puts "Error: Command '#{command}' failed with exit status #{error_level}."
|
|
90
|
-
all_error_level = error_level
|
|
91
|
-
all_failed_files << command
|
|
92
|
-
end
|
|
93
|
-
end
|
|
88
|
+
next unless error_level != 0
|
|
94
89
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
90
|
+
puts "Error: Command '#{command}' failed with exit status #{error_level}."
|
|
91
|
+
all_error_level = error_level
|
|
92
|
+
all_failed_files << command
|
|
98
93
|
end
|
|
94
|
+
|
|
95
|
+
return unless all_error_level != 0
|
|
96
|
+
|
|
97
|
+
puts "Error: #{all_failed_files.join(', ')} failed."
|
|
98
|
+
exit all_error_level
|
|
99
99
|
end
|
|
100
100
|
|
|
101
101
|
desc 'bats'
|
|
@@ -114,20 +114,28 @@ task :listtests do
|
|
|
114
114
|
puts `find lib -name '*.rb' -type f | xargs grep '< Minitest::Test' -l | sort`
|
|
115
115
|
end
|
|
116
116
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
'./lib/cached_nested_file_reader.rb --verbose',
|
|
123
|
-
'./lib/collapser.rb --verbose',
|
|
117
|
+
def dev_test_commands
|
|
118
|
+
dev_dir = File.join(__dir__, 'lib', 'dev')
|
|
119
|
+
return [] unless Dir.exist?(dev_dir)
|
|
120
|
+
|
|
121
|
+
[
|
|
124
122
|
'./lib/dev/ansi_codes.rb --verbose',
|
|
125
123
|
'./lib/dev/append_to_bash_history.rb --verbose',
|
|
126
124
|
'./lib/dev/generate_transition_codes.rb --verbose',
|
|
127
125
|
'./lib/dev/hierarchy.rb --verbose',
|
|
128
126
|
'./lib/dev/process_command.rb --verbose',
|
|
129
127
|
'./lib/dev/process_template.rb --test --verbose',
|
|
130
|
-
'./lib/dev/visibility-controller.rb --verbose'
|
|
128
|
+
'./lib/dev/visibility-controller.rb --verbose'
|
|
129
|
+
]
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
desc 'minitest'
|
|
133
|
+
task :minitest do
|
|
134
|
+
commands = dev_test_commands + [
|
|
135
|
+
'./lib/argument_processor.rb --verbose',
|
|
136
|
+
'./lib/block_label.rb --verbose',
|
|
137
|
+
'./lib/cached_nested_file_reader.rb --verbose',
|
|
138
|
+
'./lib/collapser.rb --verbose',
|
|
131
139
|
'./lib/directory_searcher.rb --verbose',
|
|
132
140
|
'./lib/evaluate_shell_expressions.rb --verbose',
|
|
133
141
|
'./lib/fcb.rb --verbose',
|
|
@@ -164,26 +172,26 @@ end
|
|
|
164
172
|
desc 'test'
|
|
165
173
|
task :test do
|
|
166
174
|
success = true
|
|
167
|
-
|
|
175
|
+
|
|
168
176
|
# Run all tests and track failures
|
|
169
177
|
rspec_success = system('bundle exec rspec')
|
|
170
178
|
success = false unless rspec_success
|
|
171
|
-
|
|
179
|
+
|
|
172
180
|
Rake::Task['minitest'].invoke
|
|
173
181
|
minitest_success = $?.success?
|
|
174
182
|
success = false unless minitest_success
|
|
175
|
-
|
|
183
|
+
|
|
176
184
|
Rake::Task['bats'].invoke
|
|
177
185
|
bats_success = $?.success?
|
|
178
186
|
success = false unless bats_success
|
|
179
|
-
|
|
187
|
+
|
|
180
188
|
# Report failures and exit with non-zero status if any test failed
|
|
181
189
|
unless success
|
|
182
190
|
failed_tests = []
|
|
183
191
|
failed_tests << 'RSpec' unless rspec_success
|
|
184
192
|
failed_tests << 'Minitest' unless minitest_success
|
|
185
193
|
failed_tests << 'Bats' unless bats_success
|
|
186
|
-
|
|
194
|
+
|
|
187
195
|
puts "\nThe following test suites failed: #{failed_tests.join(', ')}"
|
|
188
196
|
exit 1
|
|
189
197
|
end
|
|
@@ -213,7 +221,7 @@ task :update_menu_yml do
|
|
|
213
221
|
File.write(MENU_YML, menu_options.to_yaml)
|
|
214
222
|
puts `stat #{MENU_YML}`
|
|
215
223
|
end
|
|
216
|
-
task :
|
|
224
|
+
task menu: 'update_menu_yml'
|
|
217
225
|
|
|
218
226
|
# write tab_completion.sh with erb
|
|
219
227
|
#
|
|
@@ -16,5 +16,5 @@ load 'test_helper'
|
|
|
16
16
|
@test 'selected block - output of wc includes whitespace' {
|
|
17
17
|
spec_mde_xansi_dname_doc_blocks_expect docs/dev/block-type-ux-echo.md \
|
|
18
18
|
'(VAR_has_count)' '[IAB_has_count]' \
|
|
19
|
-
'VAR=
|
|
19
|
+
'VAR=mmaarrkkddoowwnn__eexxeecc_IAB=mmaarrkkddoowwnn__eexxeeccmmaarrkkddoowwnn__eexxeecc'
|
|
20
20
|
}
|
data/bin/bmde
CHANGED
|
@@ -10,7 +10,8 @@ menu_with_inherited_lines: true
|
|
|
10
10
|
/ This block is not visible. Execute to set a new value, displayed by the block above.
|
|
11
11
|
```ux :(VAR_has_count)
|
|
12
12
|
init: false
|
|
13
|
-
echo:
|
|
13
|
+
echo: >-
|
|
14
|
+
$(basename `pwd` | sed 's/./&&/g')
|
|
14
15
|
force: false
|
|
15
16
|
name: VAR
|
|
16
17
|
```
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# Docker Testing Environment
|
|
2
|
+
|
|
3
|
+
This document describes how to use the Docker testing environment for `markdown_exec`.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
The `Dockerfile.ruby-3.3-spec` provides a complete testing environment with:
|
|
8
|
+
- Ruby 3.3 on Debian Bookworm
|
|
9
|
+
- All build dependencies
|
|
10
|
+
- Git submodules initialized (BATS testing framework)
|
|
11
|
+
- Development tools and aliases
|
|
12
|
+
- Pre-configured BATS test setup
|
|
13
|
+
|
|
14
|
+
## Building the Image
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
docker build -f Dockerfile.test -t markdown-exec-test .
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
You can specify a different Git branch to test:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
docker build -f Dockerfile.test --build-arg GIT_BRANCH=develop -t markdown-exec-test .
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Running Tests
|
|
27
|
+
|
|
28
|
+
### Run all BATS tests
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
docker run --rm markdown-exec-test bats test/
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Run specific test file
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
docker run --rm markdown-exec-test bats test/options.bats
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Run with verbose output
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
docker run --rm markdown-exec-test batsv test/
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The container includes the `batsv` alias for verbose BATS output.
|
|
47
|
+
|
|
48
|
+
## Interactive Development
|
|
49
|
+
|
|
50
|
+
### Enter the container interactively
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
docker run --rm -it markdown-exec-test bash
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Once inside, you have access to:
|
|
57
|
+
- `bats` - BATS test runner (available in PATH)
|
|
58
|
+
- `batsv` - Verbose BATS runner (alias)
|
|
59
|
+
- `be` - Bundle exec alias
|
|
60
|
+
- `bmde` - Bin/bmde alias
|
|
61
|
+
- `ll` - Enhanced ls alias
|
|
62
|
+
|
|
63
|
+
### Mount local directory for development
|
|
64
|
+
|
|
65
|
+
To work with your local code changes:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
docker run --rm -it -v "$(pwd)":/markdown_exec markdown-exec-test bash
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**Note:** The container clones the repo by default. When mounting your local directory, you may need to adjust paths or rebuild dependencies.
|
|
72
|
+
|
|
73
|
+
## Running Minitest
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
docker run --rm markdown-exec-test bundle exec rake minitest
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Container Details
|
|
80
|
+
|
|
81
|
+
- **Working Directory**: `/markdown_exec`
|
|
82
|
+
- **Base Image**: `ruby:3.3-bookworm`
|
|
83
|
+
- **BATS Location**: `/markdown_exec/test/bats/bin/bats` (symlinked to `/usr/local/bin/bats`)
|
|
84
|
+
- **Test Helpers**: Located in `/markdown_exec/test/test_helper/`
|
|
85
|
+
|
|
86
|
+
## Troubleshooting
|
|
87
|
+
|
|
88
|
+
### Submodules not initialized
|
|
89
|
+
|
|
90
|
+
If you encounter issues with BATS submodules, the Dockerfile should handle this automatically. If problems persist:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
docker run --rm -it markdown-exec-test bash
|
|
94
|
+
cd /markdown_exec
|
|
95
|
+
git submodule update --init --recursive
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Missing test files
|
|
99
|
+
|
|
100
|
+
The container creates required directories and test files. If tests fail due to missing files, check that the Dockerfile build completed successfully.
|
|
101
|
+
|
|
102
|
+
### Running tests with local changes
|
|
103
|
+
|
|
104
|
+
For testing local changes without rebuilding:
|
|
105
|
+
|
|
106
|
+
1. Build the base image once
|
|
107
|
+
2. Use volume mounting to overlay your local code
|
|
108
|
+
3. Re-run bundle install if dependencies changed:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
docker run --rm -it -v "$(pwd)":/markdown_exec markdown-exec-test bash
|
|
112
|
+
bundle install
|
|
113
|
+
bats test/
|
|
114
|
+
```
|
|
115
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Tab Completion
|
|
2
|
+
|
|
3
|
+
## Install tab completion
|
|
4
|
+
|
|
5
|
+
Append a command to load the completion script to your shell configuration file. `mde` must be executable for the command to be composed correctly.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
echo "source $(mde --pwd)/bin/tab_completion.sh" >> ~/.bash_profile
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Behavior
|
|
12
|
+
|
|
13
|
+
Press tab for completions appropriate to the current input.
|
|
14
|
+
`mde <...> <prior word> <current word><TAB>`
|
|
15
|
+
|
|
16
|
+
Completions are calculated based on the current word and the prior word.
|
|
17
|
+
1. If the current word starts with `-`, present matching options, eg `--version` for the current word `--v`.
|
|
18
|
+
2. Else, if the current word is empty and the prior word is an option that takes an argument, present the type of the argument, eg `.BOOL.` for the option `--user-must-approve`.
|
|
19
|
+
3. Else, if the current word is the type of argument, from the rule above, present the default value for the option. e.g. `1` for the type `.BOOL.` for the option `--user-must-approve`.
|
|
20
|
+
4. Else, if the current word is non-empty, list matching files and folders.
|
|
21
|
+
|
|
22
|
+
## Example Completions
|
|
23
|
+
|
|
24
|
+
In the table below, tab is indicated by `!`
|
|
25
|
+
| Input | Completions |
|
|
26
|
+
| :--- | :--- |
|
|
27
|
+
| `mde !` | local files and folders |
|
|
28
|
+
| `mde -!` | all options |
|
|
29
|
+
| `mde --!` | all options |
|
|
30
|
+
| `mde --v!` | `mde --version` |
|
|
31
|
+
| `mde --user-must-approve !` | `mde --user-must-approve .BOOL.`|
|
|
32
|
+
| `mde --user-must-approve .BOOL.!` | `mde --user-must-approve 1` |
|
|
33
|
+
|
data/lib/collapser.rb
CHANGED
data/lib/find_files.rb
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#!/usr/bin/env bundle exec ruby
|
|
1
|
+
#!/usr/bin/env -S bundle exec ruby
|
|
2
2
|
# frozen_string_literal: true
|
|
3
3
|
|
|
4
4
|
# encoding=utf-8
|
|
@@ -84,7 +84,6 @@ class TestFindFiles < Minitest::Test
|
|
|
84
84
|
expected_files = [
|
|
85
85
|
'lib/cli.rb',
|
|
86
86
|
'lib/colorize.rb',
|
|
87
|
-
'lib/dev/watchfile.sh',
|
|
88
87
|
'lib/markdown_exec.rb',
|
|
89
88
|
'lib/markdown_exec/version.rb'
|
|
90
89
|
]
|
data/lib/input_sequencer.rb
CHANGED
data/lib/markdown_exec.rb
CHANGED
|
@@ -1104,7 +1104,7 @@ module MarkdownExec
|
|
|
1104
1104
|
class TestMarkdownTableFormatter < Minitest::Test
|
|
1105
1105
|
def test_select_document_if_multiple
|
|
1106
1106
|
find_path = "#{`pwd`.chomp}/fixtures"
|
|
1107
|
-
value = '
|
|
1107
|
+
value = 'fix'
|
|
1108
1108
|
searcher = SearchResultsReport.new(value, [find_path])
|
|
1109
1109
|
options = {
|
|
1110
1110
|
ansi_formatter_color: false,
|
data/lib/parameter_expansion.rb
CHANGED
data/lib/resize_terminal.rb
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#!/usr/bin/env bundle exec ruby
|
|
1
|
+
#!/usr/bin/env -S bundle exec ruby
|
|
2
2
|
# frozen_string_literal: true
|
|
3
3
|
|
|
4
4
|
# encoding=utf-8
|
|
@@ -107,20 +107,6 @@ class ResizeTerminalTest < Minitest::Test
|
|
|
107
107
|
EnvInterface.set('LINES', @original_lines)
|
|
108
108
|
end
|
|
109
109
|
|
|
110
|
-
# def test_resize_terminal_successful
|
|
111
|
-
# # Simulate interactive terminal
|
|
112
|
-
# $stdin.stub(:tty?, true) do
|
|
113
|
-
# ARGV.replace([])
|
|
114
|
-
# ENV['COLUMNS'] = '80'
|
|
115
|
-
# ENV['LINES'] = '24'
|
|
116
|
-
# response = "\e[999;999H\e[6n\e[24;80R"
|
|
117
|
-
# $stdin.stub(:getch, -> { response.slice!(0) || '' }) do
|
|
118
|
-
# assert_output(nil, /24x80/) do
|
|
119
|
-
# resize_terminal
|
|
120
|
-
# end
|
|
121
|
-
# end
|
|
122
|
-
# end
|
|
123
|
-
# end
|
|
124
110
|
def test_resize_terminal_successful
|
|
125
111
|
# Simulate interactive terminal
|
|
126
112
|
$stdin.stub(:tty?, true) do
|
|
@@ -130,7 +116,7 @@ class ResizeTerminalTest < Minitest::Test
|
|
|
130
116
|
EnvInterface.set('LINES', '24')
|
|
131
117
|
response = "\e[999;999H\e[6n\e[24;#{columns}R".dup
|
|
132
118
|
$stdin.stub(:getch, -> { response.slice!(0) || '' }) do
|
|
133
|
-
assert_output(/xterm-256color #{columns}x24$/) do
|
|
119
|
+
assert_output(/xterm(-256color)? #{columns}x24$/) do
|
|
134
120
|
resize_terminal(require_stdout: false)
|
|
135
121
|
end
|
|
136
122
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: markdown_exec
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.5.
|
|
4
|
+
version: 3.5.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Fareed Stevenson
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-11-
|
|
11
|
+
date: 2025-11-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: clipboard
|
|
@@ -96,6 +96,7 @@ files:
|
|
|
96
96
|
- ".rubocop.yml"
|
|
97
97
|
- CHANGELOG.md
|
|
98
98
|
- CODE_OF_CONDUCT.md
|
|
99
|
+
- Dockerfile.test
|
|
99
100
|
- Gemfile
|
|
100
101
|
- Gemfile.lock
|
|
101
102
|
- LICENSE.txt
|
|
@@ -267,6 +268,8 @@ files:
|
|
|
267
268
|
- docs/dev/text-decoration.md
|
|
268
269
|
- docs/dev/variable-expansion-multiline.md
|
|
269
270
|
- docs/dev/variable-expansion.md
|
|
271
|
+
- docs/docker-testing.md
|
|
272
|
+
- docs/tab-completion.md
|
|
270
273
|
- docs/ux-blocks-examples.md
|
|
271
274
|
- docs/ux-blocks-init-act.md
|
|
272
275
|
- examples/bash-blocks.md
|