markdown_exec 1.3.0 → 1.3.1

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
  SHA256:
3
- metadata.gz: 6f3c0e2ecc6da4fa81adc0876e9f37180204935fd1b666abccd7584145922d98
4
- data.tar.gz: 74534fa3b85c76447dbca1affea96bb31c566826edb6484acfeb14af9ce24de7
3
+ metadata.gz: e0c996cc59c02f9cfff6948467f4714bfb7e010ec61f886b9508b4af1a80dbc6
4
+ data.tar.gz: 9cd5bbe3d4b59c5d272ae42bd58ef228132a4af6471ee7d31867a69742c8b9ea
5
5
  SHA512:
6
- metadata.gz: 48c7a83d8bb1c00f947c87fc9de2c316371e538f7fb4637df0f0a58cb2385cb682e0ba65cdfd9e32f04ba5942022b50baa91dd20db17baa68162c8b531c35ab4
7
- data.tar.gz: 1b343974fb86e0ff9a9775d50663ae37ccd3919d047cb9efa4291fd2d7b7fbd7b3f72325965949a11c4c999f2fba1167098452a4a52d1cd0dfd707fdabced800
6
+ metadata.gz: d2a005d3d3d4550644d470ea734902fb3ba796de73d115a041dccbcdee85a675956427ee20e8a6fb68df91c8a5b96cc820458f61120e71ab64f568563145689a
7
+ data.tar.gz: 3eadd9f350b5138f808b7ce986f2b6a5b8f747c650788c36b7d46b1ed17eccde6b018862c1334e1277fe29a27f617fe08d44b45e2bed6f182888713df813c04f
data/.reek CHANGED
@@ -24,3 +24,6 @@ detectors:
24
24
  enabled: true
25
25
  TooManyStatements:
26
26
  enabled: false # too strict
27
+
28
+ exclude_paths:
29
+ - vendor/
data/.rubocop.yml CHANGED
@@ -6,6 +6,9 @@ AllCops:
6
6
  NewCops: enable
7
7
  TargetRubyVersion: 2.6
8
8
 
9
+ Layout/LeadingCommentSpace:
10
+ Enabled: false
11
+
9
12
  Lint/SafeNavigationChain:
10
13
  Enabled: false
11
14
 
data/CHANGELOG.md CHANGED
@@ -7,8 +7,6 @@
7
7
  - hidden w , w/o () in names
8
8
  - fix regexp in pathnames
9
9
 
10
- - [ ] read file once to allow for tempdoc stream
11
-
12
10
  - tree display
13
11
 
14
12
  - [ ] mde options, user prompt, in md file or included file
@@ -48,25 +46,50 @@
48
46
 
49
47
  - [ ] tab completion example ascii demo
50
48
 
51
- - [ ] reorder help list
52
-
53
49
  - [ ] parameters or (env vars) in menu
54
50
  - [ ] config menu or read env vars
55
51
  - [ ] enable/disable script, output saving per file
56
52
  - [ ] keep values between runs so same env vars are not prompted
57
- - [ ] move menu data to required file
58
-
59
- - [ ] tab complation for short option names
60
53
 
61
54
  - [ ] option to list full menu
62
55
 
63
56
  - [ ] task confirmation block option or bash template, env names
64
- - [ ] decoration for menu heading items, template?
57
+
65
58
  - [ ] configuration block `mde_config` anywhere in file
66
59
  - [ ] configuration block `mde_config` anywhere in folder config file
67
60
  ```yaml :(mde_config)```
68
61
  - [x] fix execution stdin, stdout to allow for ask function
69
62
  - [ ] fix execution stdin, stdout to allow for tty-prompt
63
+ - [ ] accept stdin as filename `-`
64
+ - [ ] fix
65
+ $ bin/mde
66
+ Choose a file: * Exit
67
+ No blocks found.
68
+ Choose a block: * Exit
69
+
70
+ - [ ] accept `!` shell execute command at prompt
71
+ - [ ] menu response: re-exec last saved script (like mde --select-recent-script)
72
+
73
+ - [ ] process shebang in markdown
74
+ - [ ] ignore shebang in markdown in rest of processing
75
+ - [! ] search for document in path
76
+ - [! ] search for document in custom path
77
+ - [ ] doc use of `#!/usr/bin/env mde`
78
+ - [ ] command to export each command to file, menu for list
79
+ - [ ] list of fenced code blocks to ignore, eg ```expect or ```mermaid
80
+
81
+ ## [1.3.1] - 2022-10-29
82
+
83
+ ### Added
84
+
85
+ - Delay to allow all command output to be received
86
+ - Display an error message when the specified document file is missing
87
+ - Options to display, format and colorize menu dividers and demarcations
88
+ - Tab completion for short option names
89
+
90
+ ### Changed
91
+
92
+ - Fix handling of document supplied by process substitution
70
93
 
71
94
  ## [1.3.0] - 2022-07-16
72
95
 
@@ -241,7 +264,7 @@ e.g. `MDE_OUTPUT_VIEWER_OPTIONS="-a '/Applications/Sublime Text.app'" mde --sele
241
264
 
242
265
  | YAML Name | Environment Variable | Default |
243
266
  | :--- | :--- | :--- |
244
- | block_name_excluded_match | MDE_BLOCK_NAME_EXCLUDED_MATCH | `^\(.+\)$` |
267
+ | block_name_hidden_match | MDE_BLOCK_NAME_HIDDEN_MATCH | `^\(.+\)$` |
245
268
  | block_name_match | MDE_BLOCK_NAME_MATCH | `:(?<title>\S+)( \|$)` |
246
269
  | block_required_scan | MDE_BLOCK_REQUIRED_SCAN | `\+\S+` |
247
270
  | fenced_start_and_end_match | MDE_FENCED_START_AND_END_MATCH | ``^`{3,}`` |
data/Gemfile CHANGED
@@ -1,5 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # echo "gem: --no-document" >> ~/.gemrc
4
+ # bundle install --path vendor/bundle
5
+
3
6
  source 'https://rubygems.org'
4
7
 
5
8
  gemspec
@@ -8,9 +11,11 @@ gem 'erb'
8
11
  gem 'minitest', '~> 5.0'
9
12
  gem 'rake', '~> 13.0'
10
13
  gem 'reek'
14
+ # gem 'rspec'
11
15
  gem 'rubocop', '~> 1.21'
12
16
  gem 'rubocop-minitest', require: false
13
17
  gem 'rubocop-rake', require: false
18
+ # gem 'rubocop-rspec', require: false
14
19
  gem 'shellwords'
15
20
  gem 'uri'
16
21
  gem 'yaml'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- markdown_exec (1.3.0)
4
+ markdown_exec (1.3.1)
5
5
  clipboard (~> 1.3.6)
6
6
  open3 (~> 0.1.1)
7
7
  optparse (~> 0.1.1)
@@ -12,16 +12,17 @@ GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
14
  ast (2.4.2)
15
- cgi (0.3.2)
15
+ cgi (0.3.3)
16
16
  clipboard (1.3.6)
17
17
  erb (2.2.3)
18
18
  cgi
19
+ json (2.6.2)
19
20
  kwalify (0.7.2)
20
- minitest (5.15.0)
21
+ minitest (5.16.3)
21
22
  open3 (0.1.1)
22
23
  optparse (0.1.1)
23
- parallel (1.21.0)
24
- parser (3.1.1.0)
24
+ parallel (1.22.1)
25
+ parser (3.1.2.1)
25
26
  ast (~> 2.4.1)
26
27
  pastel (0.8.0)
27
28
  tty-color (~> 0.5)
@@ -31,20 +32,21 @@ GEM
31
32
  kwalify (~> 0.7.0)
32
33
  parser (~> 3.1.0)
33
34
  rainbow (>= 2.0, < 4.0)
34
- regexp_parser (2.2.1)
35
+ regexp_parser (2.6.0)
35
36
  rexml (3.2.5)
36
- rubocop (1.26.0)
37
+ rubocop (1.37.1)
38
+ json (~> 2.3)
37
39
  parallel (~> 1.10)
38
- parser (>= 3.1.0.0)
40
+ parser (>= 3.1.2.1)
39
41
  rainbow (>= 2.2.2, < 4.0)
40
42
  regexp_parser (>= 1.8, < 3.0)
41
- rexml
42
- rubocop-ast (>= 1.16.0, < 2.0)
43
+ rexml (>= 3.2.5, < 4.0)
44
+ rubocop-ast (>= 1.23.0, < 2.0)
43
45
  ruby-progressbar (~> 1.7)
44
46
  unicode-display_width (>= 1.4.0, < 3.0)
45
- rubocop-ast (1.16.0)
47
+ rubocop-ast (1.23.0)
46
48
  parser (>= 3.1.1.0)
47
- rubocop-minitest (0.18.0)
49
+ rubocop-minitest (0.22.2)
48
50
  rubocop (>= 0.90, < 2.0)
49
51
  rubocop-rake (0.6.0)
50
52
  rubocop (~> 1.0)
@@ -60,7 +62,7 @@ GEM
60
62
  tty-screen (~> 0.8)
61
63
  wisper (~> 2.0)
62
64
  tty-screen (0.8.1)
63
- unicode-display_width (2.1.0)
65
+ unicode-display_width (2.3.0)
64
66
  uri (0.11.0)
65
67
  wisper (2.0.1)
66
68
  yaml (0.2.0)
data/README.md CHANGED
@@ -235,3 +235,59 @@ vars1=$(
235
235
  ``` :(echo_vars)
236
236
  echo "vars1: ${vars1:-missing}"
237
237
  ```
238
+
239
+ ```bash :test_quick
240
+ cat README.md
241
+ ```
242
+
243
+ - `echo "gem: --no-document" >> ~/.gemrc`
244
+
245
+ - `bundle install --path vendor/bundle`
246
+
247
+ ```
248
+ bundle exec rake test
249
+ bundle exec rake rubocopminitest
250
+ # bundle exec rake reek
251
+ reek --config .reek .
252
+ ```
253
+
254
+ ```
255
+ bundle exec rake build
256
+ ```
257
+ includes Rake::Task['update_menu_yml'].execute
258
+ Rake::Task['update_tab_completion'].execute
259
+
260
+ ```
261
+ bundle exec rake uninstall
262
+ ```
263
+
264
+ ```
265
+ bundle exec rake install
266
+ ```
267
+
268
+ ```
269
+ bundle exec rake publish
270
+ ```
271
+
272
+ ```
273
+ bundle exec rake --tasks
274
+ ```
275
+ ```expect
276
+ rake build # Build markdown_exec-1.3.0.9.gem into the pkg directory / gem build
277
+ rake clean # Remove any temporary products / gem build clean
278
+ rake clobber # Remove any generated files
279
+ rake install # Build and install markdown_exec-1.3.0.9.gem into system gems / gem install
280
+ rake install:local # Build and install markdown_exec-1.3.0.9.gem into system gems without network access
281
+ rake publish # gem publish
282
+ rake reek # reek
283
+ rake release[remote] # Create tag v1.3.0.9 and build and push markdown_exec-1.3.0.9.gem to rubygems.org
284
+ rake rubocop # Run RuboCop
285
+ rake rubocop:autocorrect # Autocorrect RuboCop offenses (only when it's safe)
286
+ rake rubocop:autocorrect_all # Autocorrect RuboCop offenses (safe and unsafe)
287
+ rake rubocopminitest # named task because minitest not included in rubocop tests
288
+ rake test # Run tests
289
+ rake uninstall # gem uninstall
290
+ rake update_installed_tab_completion # update installed tab_completion.sh
291
+ rake update_menu_yml # update menu.yml
292
+ rake update_tab_completion # update tab_completion.sh
293
+ ```