markdown_exec 1.3.2 → 1.3.3.2

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: 4350ee3346d6295cea603ec3602ce13c3cff3ebe83ff766c873141bebd28dca6
4
- data.tar.gz: 57f150a38020be6404bdf140755c7328f70417f1fd98286c2974492d085707c0
3
+ metadata.gz: 619b072db7931d7e8b436cc092e2cf3d51763ba987a82daef5d46c3696b298ab
4
+ data.tar.gz: 7069d0c01b7b01117eea7c751fd21b67d0cb131ec4a7b43568936d5622d2b581
5
5
  SHA512:
6
- metadata.gz: 4a412d4bf068a09371989336b50e82822e142fa27ee45c2d578a0d40834e74a618fbe968a26e10640a127c0c1078ecb1a65798bb19c7b171cfc07f11b08e03f3
7
- data.tar.gz: e6df4504a02de72dcf40b07acc39cb24752916511217354d485502183469ac061ab841d7fdfbe30e63ffa93cd87c403ec619678998b17adce7e7b68bef87eb2d
6
+ metadata.gz: 2fd596fd7ad1ab4c02a72ce0d8de9f9070233db57ca6b56508dfbfa981b216f86690ab2ff69964137542d8f904a8886aba8772ebc2bf221706c1dcb3a670cb14
7
+ data.tar.gz: 3060d83ff09051f9d1a6972c27058772f33d85a079590a0a5d5acfa294322d278a11fa8af04d3b2b9a0732d0fb5128b2bb621654f39f4dd86daf6daf6899002c
data/.rubocop.yml CHANGED
@@ -1,6 +1,7 @@
1
1
  require:
2
2
  - rubocop-minitest
3
3
  - rubocop-rake
4
+ - rubocop-rspec
4
5
 
5
6
  AllCops:
6
7
  NewCops: enable
@@ -12,6 +13,13 @@ Layout/LeadingCommentSpace:
12
13
  Layout/LineContinuationLeadingSpace:
13
14
  Enabled: false
14
15
 
16
+ Layout/LineLength:
17
+ Max: 96
18
+ # Max: 120
19
+
20
+ Lint/Debugger:
21
+ Enabled: false
22
+
15
23
  Lint/SafeNavigationChain:
16
24
  Enabled: false
17
25
 
@@ -42,14 +50,8 @@ Metrics/PerceivedComplexity:
42
50
  Minitest/MultipleAssertions:
43
51
  Enabled: false
44
52
 
45
- # RSpec/AnyInstance:
46
- # Enabled: false
47
-
48
- # RSpec/MultipleExpectations:
49
- # Enabled: true
50
-
51
- # RSpec/StubbedMock:
52
- # Enabled: false
53
+ Naming/RescuedExceptionsVariableName:
54
+ PreferredName: err
53
55
 
54
56
  Security/YAMLLoad:
55
57
  Enabled: false
@@ -60,6 +62,9 @@ Style/CommentedKeyword:
60
62
  Style/DoubleNegation:
61
63
  Enabled: false
62
64
 
65
+ Style/EmptyElse:
66
+ Enabled: false
67
+
63
68
  Style/GlobalVars:
64
69
  Enabled: false
65
70
 
@@ -79,6 +84,3 @@ Style/StringLiterals:
79
84
  Style/StringLiteralsInInterpolation:
80
85
  Enabled: true
81
86
  EnforcedStyle: single_quotes
82
-
83
- Layout/LineLength:
84
- Max: 120
data/CHANGELOG.md CHANGED
@@ -76,14 +76,51 @@
76
76
  - [! ] search for document in custom path
77
77
  - [ ] doc use of `#!/usr/bin/env mde`
78
78
  - [ ] command to export each command to file, menu for list
79
- - [ ] list of fenced code blocks to ignore, eg ```expect or ```mermaid
79
+
80
+ - [ ] option blocks to exclude by shell
81
+
82
+ - #+BEGIN_SRC sh :results silent
83
+ #+END_SRC
84
+
85
+ - [ ] requires extra CRs after ctrl-C of earlier script?
86
+
87
+ - [! ] silent for `mde file block -q 0`
88
+ - [! ] define for block: env var name, prompt if missing, default value
89
+ - [! ] display env vars in menu
90
+ - [! ] mde md -- --arg1 --arg2
91
+
92
+ - [! ] display tasks (regex) similar to current `:::`
93
+ diff done, tbd, important, progress, note, timestamp
94
+
95
+ - [! ] redo block selection logic in
96
+ def self.fcb_select?(options, fcb)
97
+ used for selecting for 1) menu, 2) script composition, 3) list?
98
+ layers 1) block name in cli, 2) required blocks, 3) hidden, 4) selected, 5) excluded, 6) also per shell name
99
+ - [ ] opt to add block name as comment in bash script
100
+ - [ ] marker in file separating VARS from CODE in bash script
101
+ [ ] VARS, CODE section separately sourceable/executable
102
+ - [ ] config to hide unnamed bash blocks
103
+ - [ ] default to No after Save of script
104
+
105
+ - [ ] block into file; template
106
+
107
+ - [! ] option to use most recent named block if dupiclate, currently appends same-name blocks but lists twice in menu
108
+
109
+ ## [1.3.3] - 2023-10-03
110
+
111
+ ### Added
112
+
113
+ - Nest scripts by using an `import` directive.
114
+
115
+ ### Changed
116
+
117
+ - Convert constants for block selection into options.
80
118
 
81
119
  ## [1.3.2] - 2022-11-12
82
120
 
83
121
  ### Added
84
122
 
85
- - Add EnvOpts class
86
- - RSpec for internal classes
123
+ - Add RSpec tests for internal classes
87
124
 
88
125
  ## [1.3.1] - 2022-10-29
89
126
 
data/Gemfile CHANGED
@@ -8,14 +8,17 @@ source 'https://rubygems.org'
8
8
  gemspec
9
9
  gem 'clipboard'
10
10
  gem 'erb'
11
- gem 'minitest', '~> 5.0'
12
- gem 'rake', '~> 13.0'
11
+ gem 'minitest', require: false
12
+ gem 'pry-nav'
13
+ gem 'pry-stack_explorer'
14
+ gem 'railties'
15
+ gem 'rake'
13
16
  gem 'reek'
14
17
  gem 'rspec'
15
- gem 'rubocop', '~> 1.21'
18
+ gem 'rubocop'
16
19
  gem 'rubocop-minitest', require: false
17
20
  gem 'rubocop-rake', require: false
18
21
  gem 'rubocop-rspec', require: false
19
22
  gem 'shellwords'
20
23
  gem 'uri'
21
- gem 'yaml'
24
+ gem 'yaml', '~> 0.2.1'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- markdown_exec (1.3.2)
4
+ markdown_exec (1.3.3.2)
5
5
  clipboard (~> 1.3.6)
6
6
  open3 (~> 0.1.1)
7
7
  optparse (~> 0.1.1)
@@ -11,63 +11,135 @@ PATH
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
+ actionpack (7.0.8)
15
+ actionview (= 7.0.8)
16
+ activesupport (= 7.0.8)
17
+ rack (~> 2.0, >= 2.2.4)
18
+ rack-test (>= 0.6.3)
19
+ rails-dom-testing (~> 2.0)
20
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
21
+ actionview (7.0.8)
22
+ activesupport (= 7.0.8)
23
+ builder (~> 3.1)
24
+ erubi (~> 1.4)
25
+ rails-dom-testing (~> 2.0)
26
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
27
+ activesupport (7.0.8)
28
+ concurrent-ruby (~> 1.0, >= 1.0.2)
29
+ i18n (>= 1.6, < 2)
30
+ minitest (>= 5.1)
31
+ tzinfo (~> 2.0)
14
32
  ast (2.4.2)
15
- cgi (0.3.3)
33
+ base64 (0.1.1)
34
+ binding_of_caller (1.0.0)
35
+ debug_inspector (>= 0.0.1)
36
+ builder (3.2.4)
37
+ cgi (0.3.6)
16
38
  clipboard (1.3.6)
39
+ coderay (1.1.3)
40
+ concurrent-ruby (1.2.2)
41
+ crass (1.0.6)
42
+ debug_inspector (1.1.0)
17
43
  diff-lcs (1.5.0)
18
- erb (2.2.3)
19
- cgi
20
- json (2.6.2)
44
+ erb (4.0.3)
45
+ cgi (>= 0.3.3)
46
+ erubi (1.12.0)
47
+ i18n (1.14.1)
48
+ concurrent-ruby (~> 1.0)
49
+ json (2.6.3)
21
50
  kwalify (0.7.2)
22
- minitest (5.16.3)
23
- open3 (0.1.1)
51
+ language_server-protocol (3.17.0.3)
52
+ loofah (2.21.3)
53
+ crass (~> 1.0.2)
54
+ nokogiri (>= 1.12.0)
55
+ method_source (1.0.0)
56
+ minitest (5.20.0)
57
+ nokogiri (1.15.4-arm64-darwin)
58
+ racc (~> 1.4)
59
+ open3 (0.1.2)
24
60
  optparse (0.1.1)
25
- parallel (1.22.1)
26
- parser (3.1.2.1)
61
+ parallel (1.23.0)
62
+ parser (3.2.2.3)
27
63
  ast (~> 2.4.1)
64
+ racc
28
65
  pastel (0.8.0)
29
66
  tty-color (~> 0.5)
67
+ pry (0.14.2)
68
+ coderay (~> 1.1)
69
+ method_source (~> 1.0)
70
+ pry-nav (1.0.0)
71
+ pry (>= 0.9.10, < 0.15)
72
+ pry-stack_explorer (0.6.1)
73
+ binding_of_caller (~> 1.0)
74
+ pry (~> 0.13)
75
+ racc (1.7.1)
76
+ rack (2.2.8)
77
+ rack-test (2.1.0)
78
+ rack (>= 1.3)
79
+ rails-dom-testing (2.2.0)
80
+ activesupport (>= 5.0.0)
81
+ minitest
82
+ nokogiri (>= 1.6)
83
+ rails-html-sanitizer (1.6.0)
84
+ loofah (~> 2.21)
85
+ nokogiri (~> 1.14)
86
+ railties (7.0.8)
87
+ actionpack (= 7.0.8)
88
+ activesupport (= 7.0.8)
89
+ method_source
90
+ rake (>= 12.2)
91
+ thor (~> 1.0)
92
+ zeitwerk (~> 2.5)
30
93
  rainbow (3.1.1)
31
94
  rake (13.0.6)
32
- reek (6.1.1)
95
+ reek (6.1.4)
33
96
  kwalify (~> 0.7.0)
34
- parser (~> 3.1.0)
97
+ parser (~> 3.2.0)
35
98
  rainbow (>= 2.0, < 4.0)
36
- regexp_parser (2.6.0)
37
- rexml (3.2.5)
99
+ regexp_parser (2.8.1)
100
+ rexml (3.2.6)
38
101
  rspec (3.12.0)
39
102
  rspec-core (~> 3.12.0)
40
103
  rspec-expectations (~> 3.12.0)
41
104
  rspec-mocks (~> 3.12.0)
42
- rspec-core (3.12.0)
105
+ rspec-core (3.12.2)
43
106
  rspec-support (~> 3.12.0)
44
- rspec-expectations (3.12.0)
107
+ rspec-expectations (3.12.3)
45
108
  diff-lcs (>= 1.2.0, < 2.0)
46
109
  rspec-support (~> 3.12.0)
47
- rspec-mocks (3.12.0)
110
+ rspec-mocks (3.12.6)
48
111
  diff-lcs (>= 1.2.0, < 2.0)
49
112
  rspec-support (~> 3.12.0)
50
- rspec-support (3.12.0)
51
- rubocop (1.37.1)
113
+ rspec-support (3.12.1)
114
+ rubocop (1.56.4)
115
+ base64 (~> 0.1.1)
52
116
  json (~> 2.3)
117
+ language_server-protocol (>= 3.17.0)
53
118
  parallel (~> 1.10)
54
- parser (>= 3.1.2.1)
119
+ parser (>= 3.2.2.3)
55
120
  rainbow (>= 2.2.2, < 4.0)
56
121
  regexp_parser (>= 1.8, < 3.0)
57
122
  rexml (>= 3.2.5, < 4.0)
58
- rubocop-ast (>= 1.23.0, < 2.0)
123
+ rubocop-ast (>= 1.28.1, < 2.0)
59
124
  ruby-progressbar (~> 1.7)
60
- unicode-display_width (>= 1.4.0, < 3.0)
61
- rubocop-ast (1.23.0)
62
- parser (>= 3.1.1.0)
63
- rubocop-minitest (0.22.2)
64
- rubocop (>= 0.90, < 2.0)
125
+ unicode-display_width (>= 2.4.0, < 3.0)
126
+ rubocop-ast (1.29.0)
127
+ parser (>= 3.2.1.0)
128
+ rubocop-capybara (2.19.0)
129
+ rubocop (~> 1.41)
130
+ rubocop-factory_bot (2.24.0)
131
+ rubocop (~> 1.33)
132
+ rubocop-minitest (0.32.2)
133
+ rubocop (>= 1.39, < 2.0)
65
134
  rubocop-rake (0.6.0)
66
135
  rubocop (~> 1.0)
67
- rubocop-rspec (2.14.2)
136
+ rubocop-rspec (2.24.1)
68
137
  rubocop (~> 1.33)
69
- ruby-progressbar (1.11.0)
138
+ rubocop-capybara (~> 2.17)
139
+ rubocop-factory_bot (~> 2.22)
140
+ ruby-progressbar (1.13.0)
70
141
  shellwords (0.1.0)
142
+ thor (1.2.2)
71
143
  tty-color (0.6.0)
72
144
  tty-cursor (0.7.1)
73
145
  tty-prompt (0.23.1)
@@ -78,10 +150,13 @@ GEM
78
150
  tty-screen (~> 0.8)
79
151
  wisper (~> 2.0)
80
152
  tty-screen (0.8.1)
81
- unicode-display_width (2.3.0)
82
- uri (0.11.0)
153
+ tzinfo (2.0.6)
154
+ concurrent-ruby (~> 1.0)
155
+ unicode-display_width (2.5.0)
156
+ uri (0.12.2)
83
157
  wisper (2.0.1)
84
- yaml (0.2.0)
158
+ yaml (0.2.1)
159
+ zeitwerk (2.6.12)
85
160
 
86
161
  PLATFORMS
87
162
  arm64-darwin-21
@@ -90,17 +165,20 @@ DEPENDENCIES
90
165
  clipboard
91
166
  erb
92
167
  markdown_exec!
93
- minitest (~> 5.0)
94
- rake (~> 13.0)
168
+ minitest
169
+ pry-nav
170
+ pry-stack_explorer
171
+ railties
172
+ rake
95
173
  reek
96
174
  rspec
97
- rubocop (~> 1.21)
175
+ rubocop
98
176
  rubocop-minitest
99
177
  rubocop-rake
100
178
  rubocop-rspec
101
179
  shellwords
102
180
  uri
103
- yaml
181
+ yaml (~> 0.2.1)
104
182
 
105
183
  BUNDLED WITH
106
- 2.2.32
184
+ 2.4.13
data/README.md CHANGED
@@ -203,9 +203,11 @@ export ACTIVITY=asleep
203
203
  echo "$TIME -> $ACTIVITY"
204
204
  ```
205
205
 
206
- ``` :sleep
207
- sleep 10
208
- ```
206
+ # Testing
207
+
208
+ Execute tests for individual libraries.
209
+
210
+ `bundle exec rake minitest`
209
211
 
210
212
  # License
211
213
 
@@ -214,84 +216,3 @@ The gem is available as open source under the terms of the [MIT License](https:/
214
216
  # Code of Conduct
215
217
 
216
218
  Everyone interacting in the MarkdownExec project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/fareedst/markdown_exec/blob/master/CODE_OF_CONDUCT.md).
217
-
218
-
219
- ``` :test_vars +(echo_vars)
220
- vars1=$(
221
- echo '1'
222
- whoami
223
- echo '2'
224
- pwd
225
- echo '3'
226
- stat README.md
227
- echo '4'
228
- /bin/ls
229
- echo '5'
230
- whoami
231
- echo '6'
232
- )
233
- ```
234
-
235
- ``` :(echo_vars)
236
- echo "vars1: ${vars1:-missing}"
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
- ```