rundoc 4.1.4 → 6.0.0

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.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +3 -1
  3. data/.standard.yml +1 -1
  4. data/CHANGELOG.md +12 -0
  5. data/README.md +98 -10
  6. data/lib/rundoc/cli.rb +18 -2
  7. data/lib/rundoc/code_command/background/log/clear.rb +12 -2
  8. data/lib/rundoc/code_command/background/log/read.rb +12 -2
  9. data/lib/rundoc/code_command/background/process_spawn.rb +3 -1
  10. data/lib/rundoc/code_command/background/start.rb +25 -6
  11. data/lib/rundoc/code_command/background/stdin_write.rb +21 -8
  12. data/lib/rundoc/code_command/background/stop.rb +12 -2
  13. data/lib/rundoc/code_command/background/wait.rb +15 -3
  14. data/lib/rundoc/code_command/background.rb +2 -0
  15. data/lib/rundoc/code_command/bash/cd.rb +12 -18
  16. data/lib/rundoc/code_command/bash.rb +43 -19
  17. data/lib/rundoc/code_command/comment.rb +33 -0
  18. data/lib/rundoc/code_command/deferred.rb +66 -0
  19. data/lib/rundoc/code_command/empty_binding.rb +18 -0
  20. data/lib/rundoc/code_command/file_command/append.rb +29 -8
  21. data/lib/rundoc/code_command/file_command/remove.rb +27 -5
  22. data/lib/rundoc/code_command/no_such_command.rb +8 -3
  23. data/lib/rundoc/code_command/pipe.rb +36 -16
  24. data/lib/rundoc/code_command/pre/erb.rb +28 -18
  25. data/lib/rundoc/code_command/print/erb.rb +27 -16
  26. data/lib/rundoc/code_command/print/text.rb +27 -8
  27. data/lib/rundoc/code_command/raw.rb +17 -5
  28. data/lib/rundoc/code_command/rundoc/ensure_later.rb +59 -0
  29. data/lib/rundoc/code_command/rundoc/require.rb +25 -17
  30. data/lib/rundoc/code_command/rundoc_command.rb +26 -9
  31. data/lib/rundoc/code_command/website/driver.rb +2 -0
  32. data/lib/rundoc/code_command/website/navigate.rb +18 -12
  33. data/lib/rundoc/code_command/website/screenshot.rb +17 -11
  34. data/lib/rundoc/code_command/website/visit.rb +23 -12
  35. data/lib/rundoc/code_command/website.rb +2 -0
  36. data/lib/rundoc/code_command/write.rb +37 -9
  37. data/lib/rundoc/code_command.rb +6 -48
  38. data/lib/rundoc/context/after_build.rb +2 -0
  39. data/lib/rundoc/context/execution.rb +2 -0
  40. data/lib/rundoc/document.rb +6 -2
  41. data/lib/rundoc/fenced_code_block.rb +10 -7
  42. data/lib/rundoc/peg_parser.rb +25 -9
  43. data/lib/rundoc/version.rb +3 -1
  44. data/lib/rundoc.rb +89 -17
  45. data/rundoc.gemspec +3 -0
  46. data/test/integration/ensure_later_test.rb +335 -0
  47. data/test/integration/print_test.rb +51 -0
  48. data/test/rundoc/code_commands/append_file_test.rb +35 -10
  49. data/test/rundoc/code_commands/background_test.rb +24 -22
  50. data/test/rundoc/code_commands/bash_test.rb +10 -5
  51. data/test/rundoc/code_commands/comment_test.rb +116 -0
  52. data/test/rundoc/code_commands/pipe_test.rb +2 -2
  53. data/test/rundoc/code_commands/print_test.rb +13 -25
  54. data/test/rundoc/code_commands/remove_contents_test.rb +8 -3
  55. data/test/rundoc/code_section_test.rb +28 -21
  56. data/test/rundoc/peg_parser_test.rb +42 -1
  57. data/test/test_helper.rb +4 -2
  58. metadata +23 -6
  59. data/lib/rundoc/code_command/rundoc/depend_on.rb +0 -13
  60. data/test/fixtures/depend_on/dependency/rundoc.md +0 -5
  61. data/test/fixtures/depend_on/main/rundoc.md +0 -10
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rundoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.4
4
+ version: 6.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Schneeman
@@ -107,6 +107,20 @@ dependencies:
107
107
  - - ">="
108
108
  - !ruby/object:Gem::Version
109
109
  version: '0'
110
+ - !ruby/object:Gem::Dependency
111
+ name: cgi
112
+ requirement: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ version: 0.3.6
117
+ type: :runtime
118
+ prerelease: false
119
+ version_requirements: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: 0.3.6
110
124
  - !ruby/object:Gem::Dependency
111
125
  name: rake
112
126
  requirement: !ruby/object:Gem::Requirement
@@ -210,6 +224,9 @@ files:
210
224
  - lib/rundoc/code_command/background/wait.rb
211
225
  - lib/rundoc/code_command/bash.rb
212
226
  - lib/rundoc/code_command/bash/cd.rb
227
+ - lib/rundoc/code_command/comment.rb
228
+ - lib/rundoc/code_command/deferred.rb
229
+ - lib/rundoc/code_command/empty_binding.rb
213
230
  - lib/rundoc/code_command/file_command/append.rb
214
231
  - lib/rundoc/code_command/file_command/remove.rb
215
232
  - lib/rundoc/code_command/no_such_command.rb
@@ -218,7 +235,7 @@ files:
218
235
  - lib/rundoc/code_command/print/erb.rb
219
236
  - lib/rundoc/code_command/print/text.rb
220
237
  - lib/rundoc/code_command/raw.rb
221
- - lib/rundoc/code_command/rundoc/depend_on.rb
238
+ - lib/rundoc/code_command/rundoc/ensure_later.rb
222
239
  - lib/rundoc/code_command/rundoc/require.rb
223
240
  - lib/rundoc/code_command/rundoc_command.rb
224
241
  - lib/rundoc/code_command/website.rb
@@ -248,8 +265,6 @@ files:
248
265
  - test/fixtures/cnb/shared/procfile.md
249
266
  - test/fixtures/cnb/shared/use_the_image.md
250
267
  - test/fixtures/cnb/shared/what_is_a_builder.md
251
- - test/fixtures/depend_on/dependency/rundoc.md
252
- - test/fixtures/depend_on/main/rundoc.md
253
268
  - test/fixtures/java/rundoc.md
254
269
  - test/fixtures/play/source.md
255
270
  - test/fixtures/rails_4/rundoc.md
@@ -263,6 +278,7 @@ files:
263
278
  - test/fixtures/simple_git/rundoc.md
264
279
  - test/integration/after_build_test.rb
265
280
  - test/integration/background_stdin_test.rb
281
+ - test/integration/ensure_later_test.rb
266
282
  - test/integration/failure_test.rb
267
283
  - test/integration/pre_erb_test.rb
268
284
  - test/integration/print_test.rb
@@ -273,6 +289,7 @@ files:
273
289
  - test/rundoc/code_commands/append_file_test.rb
274
290
  - test/rundoc/code_commands/background_test.rb
275
291
  - test/rundoc/code_commands/bash_test.rb
292
+ - test/rundoc/code_commands/comment_test.rb
276
293
  - test/rundoc/code_commands/pipe_test.rb
277
294
  - test/rundoc/code_commands/print_test.rb
278
295
  - test/rundoc/code_commands/remove_contents_test.rb
@@ -294,14 +311,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
294
311
  requirements:
295
312
  - - ">="
296
313
  - !ruby/object:Gem::Version
297
- version: '0'
314
+ version: '3.2'
298
315
  required_rubygems_version: !ruby/object:Gem::Requirement
299
316
  requirements:
300
317
  - - ">="
301
318
  - !ruby/object:Gem::Version
302
319
  version: '0'
303
320
  requirements: []
304
- rubygems_version: 3.6.7
321
+ rubygems_version: 4.0.10
305
322
  specification_version: 4
306
323
  summary: RunDOC generates runable code from docs
307
324
  test_files: []
@@ -1,13 +0,0 @@
1
- class ::Rundoc::CodeCommand
2
- class RundocCommand
3
- class DependOn < ::Rundoc::CodeCommand
4
- # Pass in the relative path of another rundoc document in order to
5
- # run all of it's commands (but not to )
6
- def initialize(path)
7
- raise "rundoc.depend_on has been removed, use `:::-- rundoc.require` instead"
8
- end
9
- end
10
- end
11
- end
12
-
13
- Rundoc.register_code_command(:"rundoc.depend_on", ::Rundoc::CodeCommand::RundocCommand::DependOn)
@@ -1,5 +0,0 @@
1
- ```
2
- :::>> $ mkdir foo
3
- :::>> $ cd foo
4
- :::>> $ echo "hello" >> hello.txt
5
- ```
@@ -1,10 +0,0 @@
1
- # Hello
2
-
3
- ```
4
- :::-- rundoc.depend_on "../dependency/rundoc.md"
5
- ```
6
-
7
- ```
8
- :::>> $ ruby -e "raise 'nope' unless File.read('hello.txt').chomp == 'hello'"
9
- ```
10
-