rundoc 4.1.0 → 4.1.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 +4 -0
 - data/README.md +1 -1
 - data/lib/rundoc/code_command/pre/erb.rb +1 -1
 - data/lib/rundoc/version.rb +1 -1
 - data/test/integration/pre_erb_test.rb +44 -0
 - metadata +2 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 406f197901506713b700c1ff8511fb05904400f806c7dc9d1a134e2b04ab13ab
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 5b09bdd1560879915be2b52f1f36a13626fe2edfd696a14e66f90d5849b999fc
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: '089c0ed9bb56187b8d18ff8eb55662ddf88f592329c028ff24478723bf044e87e75fbc6c84e903bb34bb3e111134a48a6b54861d6af1eb0e2cb9dc533a812da4'
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: f616697430af9d1948d64a9a97a7902ccc3dfa8a61cc4bc4a5b7d3e109944ec50e1475b6889c1168fceba5a733b4d34adc5dd0d068ddff85fcfbff40ee2e8438
         
     | 
    
        data/CHANGELOG.md
    CHANGED
    
    | 
         @@ -1,5 +1,9 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ## HEAD
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
      
 3 
     | 
    
         
            +
            ## 4.1.1
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            - Fix: Visibility forwarding for `pre.erb` was accidentally reversed, this is now fixed. (https://github.com/zombocom/rundoc/pull/93)
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
       3 
7 
     | 
    
         
             
            ## 4.1.0
         
     | 
| 
       4 
8 
     | 
    
         | 
| 
       5 
9 
     | 
    
         
             
            - Add: Rundoc command `pre.erb` command used for dynamically templating any command using ERB syntax. (https://github.com/zombocom/rundoc/pull/90)
         
     | 
    
        data/README.md
    CHANGED
    
    | 
         @@ -74,7 +74,7 @@ This will generate a project folder with your project in it, and a markdown `REA 
     | 
|
| 
       74 
74 
     | 
    
         
             
              - [$](#shell-commands)
         
     | 
| 
       75 
75 
     | 
    
         
             
              - [fail.$](#shell-commands)
         
     | 
| 
       76 
76 
     | 
    
         
             
            - Dynamic command templating
         
     | 
| 
       77 
     | 
    
         
            -
              - [pre.erb](# 
     | 
| 
      
 77 
     | 
    
         
            +
              - [pre.erb](#preerb)
         
     | 
| 
       78 
78 
     | 
    
         
             
            - Printing
         
     | 
| 
       79 
79 
     | 
    
         
             
              - [print.text](#print)
         
     | 
| 
       80 
80 
     | 
    
         
             
              - [print.erb](#print)
         
     | 
| 
         @@ -27,8 +27,8 @@ class Rundoc::CodeCommand 
     | 
|
| 
       27 
27 
     | 
    
         
             
                def code
         
     | 
| 
       28 
28 
     | 
    
         
             
                  @code ||= begin
         
     | 
| 
       29 
29 
     | 
    
         
             
                    vis = +""
         
     | 
| 
       30 
     | 
    
         
            -
                    vis += @render_delegate_result ? ">" : "-"
         
     | 
| 
       31 
30 
     | 
    
         
             
                    vis += @render_delegate_command ? ">" : "-"
         
     | 
| 
      
 31 
     | 
    
         
            +
                    vis += @render_delegate_result ? ">" : "-"
         
     | 
| 
       32 
32 
     | 
    
         
             
                    code = [@line, @contents]
         
     | 
| 
       33 
33 
     | 
    
         
             
                      .compact
         
     | 
| 
       34 
34 
     | 
    
         
             
                      .reject(&:empty?)
         
     | 
    
        data/lib/rundoc/version.rb
    CHANGED
    
    
| 
         @@ -1,6 +1,50 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            require "test_helper"
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            class IntegrationPreErb < Minitest::Test
         
     | 
| 
      
 4 
     | 
    
         
            +
              def test_result_visibility_forwarding
         
     | 
| 
      
 5 
     | 
    
         
            +
                contents = <<~RUBY
         
     | 
| 
      
 6 
     | 
    
         
            +
                  ```
         
     | 
| 
      
 7 
     | 
    
         
            +
                  :::-> pre.erb $ echo <%= 1 + 1 %>
         
     | 
| 
      
 8 
     | 
    
         
            +
                  ```
         
     | 
| 
      
 9 
     | 
    
         
            +
                RUBY
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
                Dir.mktmpdir do |dir|
         
     | 
| 
      
 12 
     | 
    
         
            +
                  Dir.chdir(dir) do
         
     | 
| 
      
 13 
     | 
    
         
            +
                    expected = <<~EOF
         
     | 
| 
      
 14 
     | 
    
         
            +
                      ```
         
     | 
| 
      
 15 
     | 
    
         
            +
                      2
         
     | 
| 
      
 16 
     | 
    
         
            +
                      ```
         
     | 
| 
      
 17 
     | 
    
         
            +
                    EOF
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
                    parsed = parse_contents(contents)
         
     | 
| 
      
 20 
     | 
    
         
            +
                    actual = parsed.to_md.gsub(Rundoc::FencedCodeBlock::AUTOGEN_WARNING, "").strip
         
     | 
| 
      
 21 
     | 
    
         
            +
                    assert_equal expected.strip, actual.strip
         
     | 
| 
      
 22 
     | 
    
         
            +
                  end
         
     | 
| 
      
 23 
     | 
    
         
            +
                end
         
     | 
| 
      
 24 
     | 
    
         
            +
              end
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
              def test_command_visibility_forwarding
         
     | 
| 
      
 27 
     | 
    
         
            +
                contents = <<~RUBY
         
     | 
| 
      
 28 
     | 
    
         
            +
                  ```
         
     | 
| 
      
 29 
     | 
    
         
            +
                  :::>- pre.erb $ echo <%= 1 + 1 %>
         
     | 
| 
      
 30 
     | 
    
         
            +
                  ```
         
     | 
| 
      
 31 
     | 
    
         
            +
                RUBY
         
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
      
 33 
     | 
    
         
            +
                Dir.mktmpdir do |dir|
         
     | 
| 
      
 34 
     | 
    
         
            +
                  Dir.chdir(dir) do
         
     | 
| 
      
 35 
     | 
    
         
            +
                    expected = <<~EOF
         
     | 
| 
      
 36 
     | 
    
         
            +
                      ```
         
     | 
| 
      
 37 
     | 
    
         
            +
                      $ echo 2
         
     | 
| 
      
 38 
     | 
    
         
            +
                      ```
         
     | 
| 
      
 39 
     | 
    
         
            +
                    EOF
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
                    parsed = parse_contents(contents)
         
     | 
| 
      
 42 
     | 
    
         
            +
                    actual = parsed.to_md.gsub(Rundoc::FencedCodeBlock::AUTOGEN_WARNING, "").strip
         
     | 
| 
      
 43 
     | 
    
         
            +
                    assert_equal expected.strip, actual.strip
         
     | 
| 
      
 44 
     | 
    
         
            +
                  end
         
     | 
| 
      
 45 
     | 
    
         
            +
                end
         
     | 
| 
      
 46 
     | 
    
         
            +
              end
         
     | 
| 
      
 47 
     | 
    
         
            +
             
     | 
| 
       4 
48 
     | 
    
         
             
              def test_file_write
         
     | 
| 
       5 
49 
     | 
    
         
             
                key = SecureRandom.hex
         
     | 
| 
       6 
50 
     | 
    
         
             
                contents = <<~RUBY
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: rundoc
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 4.1. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 4.1.1
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Richard Schneeman
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire:
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2024-12- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2024-12-13 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: thor
         
     |