markdown_exec 1.3.0 → 1.3.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6f3c0e2ecc6da4fa81adc0876e9f37180204935fd1b666abccd7584145922d98
4
- data.tar.gz: 74534fa3b85c76447dbca1affea96bb31c566826edb6484acfeb14af9ce24de7
3
+ metadata.gz: 4350ee3346d6295cea603ec3602ce13c3cff3ebe83ff766c873141bebd28dca6
4
+ data.tar.gz: 57f150a38020be6404bdf140755c7328f70417f1fd98286c2974492d085707c0
5
5
  SHA512:
6
- metadata.gz: 48c7a83d8bb1c00f947c87fc9de2c316371e538f7fb4637df0f0a58cb2385cb682e0ba65cdfd9e32f04ba5942022b50baa91dd20db17baa68162c8b531c35ab4
7
- data.tar.gz: 1b343974fb86e0ff9a9775d50663ae37ccd3919d047cb9efa4291fd2d7b7fbd7b3f72325965949a11c4c999f2fba1167098452a4a52d1cd0dfd707fdabced800
6
+ metadata.gz: 4a412d4bf068a09371989336b50e82822e142fa27ee45c2d578a0d40834e74a618fbe968a26e10640a127c0c1078ecb1a65798bb19c7b171cfc07f11b08e03f3
7
+ data.tar.gz: e6df4504a02de72dcf40b07acc39cb24752916511217354d485502183469ac061ab841d7fdfbe30e63ffa93cd87c403ec619678998b17adce7e7b68bef87eb2d
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,12 @@ AllCops:
6
6
  NewCops: enable
7
7
  TargetRubyVersion: 2.6
8
8
 
9
+ Layout/LeadingCommentSpace:
10
+ Enabled: false
11
+
12
+ Layout/LineContinuationLeadingSpace:
13
+ Enabled: false
14
+
9
15
  Lint/SafeNavigationChain:
10
16
  Enabled: false
11
17
 
@@ -35,7 +41,16 @@ Metrics/PerceivedComplexity:
35
41
 
36
42
  Minitest/MultipleAssertions:
37
43
  Enabled: false
38
-
44
+
45
+ # RSpec/AnyInstance:
46
+ # Enabled: false
47
+
48
+ # RSpec/MultipleExpectations:
49
+ # Enabled: true
50
+
51
+ # RSpec/StubbedMock:
52
+ # Enabled: false
53
+
39
54
  Security/YAMLLoad:
40
55
  Enabled: false
41
56
 
@@ -54,6 +69,9 @@ Style/MixinUsage:
54
69
  Style/MultilineBlockChain:
55
70
  Enabled: false
56
71
 
72
+ Style/SlicingWithRange:
73
+ Enabled: false
74
+
57
75
  Style/StringLiterals:
58
76
  Enabled: true
59
77
  EnforcedStyle: single_quotes
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,57 @@
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.2] - 2022-11-12
82
+
83
+ ### Added
84
+
85
+ - Add EnvOpts class
86
+ - RSpec for internal classes
87
+
88
+ ## [1.3.1] - 2022-10-29
89
+
90
+ ### Added
91
+
92
+ - Delay to allow all command output to be received
93
+ - Display an error message when the specified document file is missing
94
+ - Options to display, format and colorize menu dividers and demarcations
95
+ - Tab completion for short option names
96
+
97
+ ### Changed
98
+
99
+ - Fix handling of document supplied by process substitution
70
100
 
71
101
  ## [1.3.0] - 2022-07-16
72
102
 
@@ -241,7 +271,7 @@ e.g. `MDE_OUTPUT_VIEWER_OPTIONS="-a '/Applications/Sublime Text.app'" mde --sele
241
271
 
242
272
  | YAML Name | Environment Variable | Default |
243
273
  | :--- | :--- | :--- |
244
- | block_name_excluded_match | MDE_BLOCK_NAME_EXCLUDED_MATCH | `^\(.+\)$` |
274
+ | block_name_hidden_match | MDE_BLOCK_NAME_HIDDEN_MATCH | `^\(.+\)$` |
245
275
  | block_name_match | MDE_BLOCK_NAME_MATCH | `:(?<title>\S+)( \|$)` |
246
276
  | block_required_scan | MDE_BLOCK_REQUIRED_SCAN | `\+\S+` |
247
277
  | 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.2)
5
5
  clipboard (~> 1.3.6)
6
6
  open3 (~> 0.1.1)
7
7
  optparse (~> 0.1.1)
@@ -12,16 +12,18 @@ 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
+ diff-lcs (1.5.0)
17
18
  erb (2.2.3)
18
19
  cgi
20
+ json (2.6.2)
19
21
  kwalify (0.7.2)
20
- minitest (5.15.0)
22
+ minitest (5.16.3)
21
23
  open3 (0.1.1)
22
24
  optparse (0.1.1)
23
- parallel (1.21.0)
24
- parser (3.1.1.0)
25
+ parallel (1.22.1)
26
+ parser (3.1.2.1)
25
27
  ast (~> 2.4.1)
26
28
  pastel (0.8.0)
27
29
  tty-color (~> 0.5)
@@ -31,23 +33,39 @@ GEM
31
33
  kwalify (~> 0.7.0)
32
34
  parser (~> 3.1.0)
33
35
  rainbow (>= 2.0, < 4.0)
34
- regexp_parser (2.2.1)
36
+ regexp_parser (2.6.0)
35
37
  rexml (3.2.5)
36
- rubocop (1.26.0)
38
+ rspec (3.12.0)
39
+ rspec-core (~> 3.12.0)
40
+ rspec-expectations (~> 3.12.0)
41
+ rspec-mocks (~> 3.12.0)
42
+ rspec-core (3.12.0)
43
+ rspec-support (~> 3.12.0)
44
+ rspec-expectations (3.12.0)
45
+ diff-lcs (>= 1.2.0, < 2.0)
46
+ rspec-support (~> 3.12.0)
47
+ rspec-mocks (3.12.0)
48
+ diff-lcs (>= 1.2.0, < 2.0)
49
+ rspec-support (~> 3.12.0)
50
+ rspec-support (3.12.0)
51
+ rubocop (1.37.1)
52
+ json (~> 2.3)
37
53
  parallel (~> 1.10)
38
- parser (>= 3.1.0.0)
54
+ parser (>= 3.1.2.1)
39
55
  rainbow (>= 2.2.2, < 4.0)
40
56
  regexp_parser (>= 1.8, < 3.0)
41
- rexml
42
- rubocop-ast (>= 1.16.0, < 2.0)
57
+ rexml (>= 3.2.5, < 4.0)
58
+ rubocop-ast (>= 1.23.0, < 2.0)
43
59
  ruby-progressbar (~> 1.7)
44
60
  unicode-display_width (>= 1.4.0, < 3.0)
45
- rubocop-ast (1.16.0)
61
+ rubocop-ast (1.23.0)
46
62
  parser (>= 3.1.1.0)
47
- rubocop-minitest (0.18.0)
63
+ rubocop-minitest (0.22.2)
48
64
  rubocop (>= 0.90, < 2.0)
49
65
  rubocop-rake (0.6.0)
50
66
  rubocop (~> 1.0)
67
+ rubocop-rspec (2.14.2)
68
+ rubocop (~> 1.33)
51
69
  ruby-progressbar (1.11.0)
52
70
  shellwords (0.1.0)
53
71
  tty-color (0.6.0)
@@ -60,7 +78,7 @@ GEM
60
78
  tty-screen (~> 0.8)
61
79
  wisper (~> 2.0)
62
80
  tty-screen (0.8.1)
63
- unicode-display_width (2.1.0)
81
+ unicode-display_width (2.3.0)
64
82
  uri (0.11.0)
65
83
  wisper (2.0.1)
66
84
  yaml (0.2.0)
@@ -75,9 +93,11 @@ DEPENDENCIES
75
93
  minitest (~> 5.0)
76
94
  rake (~> 13.0)
77
95
  reek
96
+ rspec
78
97
  rubocop (~> 1.21)
79
98
  rubocop-minitest
80
99
  rubocop-rake
100
+ rubocop-rspec
81
101
  shellwords
82
102
  uri
83
103
  yaml
data/README.md CHANGED
@@ -235,3 +235,63 @@ 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
+ - add git version tag
269
+
270
+ - push to remote origin
271
+
272
+ ```
273
+ bundle exec rake publish
274
+ ```
275
+
276
+ ```
277
+ bundle exec rake --tasks
278
+ ```
279
+ ```expect
280
+ rake build # Build markdown_exec-1.3.0.9.gem into the pkg directory / gem build
281
+ rake clean # Remove any temporary products / gem build clean
282
+ rake clobber # Remove any generated files
283
+ rake install # Build and install markdown_exec-1.3.0.9.gem into system gems / gem install
284
+ rake install:local # Build and install markdown_exec-1.3.0.9.gem into system gems without network access
285
+ rake publish # gem publish
286
+ rake reek # reek
287
+ rake release[remote] # Create tag v1.3.0.9 and build and push markdown_exec-1.3.0.9.gem to rubygems.org
288
+ rake rubocop # Run RuboCop
289
+ rake rubocop:autocorrect # Autocorrect RuboCop offenses (only when it's safe)
290
+ rake rubocop:autocorrect_all # Autocorrect RuboCop offenses (safe and unsafe)
291
+ rake rubocopminitest # named task because minitest not included in rubocop tests
292
+ rake test # Run tests
293
+ rake uninstall # gem uninstall
294
+ rake update_installed_tab_completion # update installed tab_completion.sh
295
+ rake update_menu_yml # update menu.yml
296
+ rake update_tab_completion # update tab_completion.sh
297
+ ```