rundoc 1.1.2 → 1.1.3
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/lib/rundoc/code_command/bash.rb +3 -2
- data/lib/rundoc/version.rb +1 -1
- data/test/fixtures/rails_4/rundoc.md +7 -4
- data/test/fixtures/rails_5/rundoc.md +8 -4
- data/test/fixtures/rails_6/rundoc.md +6 -3
- data/test/rundoc/code_commands/bash_test.rb +7 -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: b6c32eddffc69778c7661f3c38ce6bc4c5f9a06dc18f46a737de2dfca2382fe8
         | 
| 4 | 
            +
              data.tar.gz: cb1d8d74338a9dc4b8b39a9d6d21a51d6d89728ae14147ab2b9e9aa71a335e4b
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 327b5690d7ac1ab8985e0d8d338d38e79af97bae4c683204594bdb8f7ed3c2461fb4cbbb90c058c77120de00b1af95ed3e6bd0573d92e39d248a32315938125d
         | 
| 7 | 
            +
              data.tar.gz: 1571964f78dd43e9b742729106e294813b970229d0424ee9af44f97be22d1c9293324605a3e85b92b7396cdc427955cd73f7958c9ac60ccb6cc9fa0aa14b583e
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    
| @@ -32,12 +32,13 @@ class Rundoc::CodeCommand::Bash < Rundoc::CodeCommand | |
| 32 32 | 
             
              end
         | 
| 33 33 |  | 
| 34 34 | 
             
              def shell(cmd, stdin = nil)
         | 
| 35 | 
            +
                cmd = "(#{cmd}) 2>&1"
         | 
| 35 36 | 
             
                msg  = "Running: $ '#{cmd}'"
         | 
| 36 37 | 
             
                msg  << " with stdin: '#{stdin.inspect}'" if stdin && !stdin.empty?
         | 
| 37 38 | 
             
                puts msg
         | 
| 38 39 |  | 
| 39 40 | 
             
                result = ""
         | 
| 40 | 
            -
                IO.popen( | 
| 41 | 
            +
                IO.popen(cmd, "w+") do |io|
         | 
| 41 42 | 
             
                  io << stdin if stdin
         | 
| 42 43 | 
             
                  io.close_write
         | 
| 43 44 | 
             
                  result = sanitize_escape_chars io.read
         | 
| @@ -54,4 +55,4 @@ Rundoc.register_code_command(:bash, Rundoc::CodeCommand::Bash) | |
| 54 55 | 
             
            Rundoc.register_code_command(:'$',  Rundoc::CodeCommand::Bash)
         | 
| 55 56 | 
             
            Rundoc.register_code_command(:'fail.$',  Rundoc::CodeCommand::Bash)
         | 
| 56 57 |  | 
| 57 | 
            -
            require 'rundoc/code_command/bash/cd'
         | 
| 58 | 
            +
            require 'rundoc/code_command/bash/cd'
         | 
    
        data/lib/rundoc/version.rb
    CHANGED
    
    
| @@ -9,7 +9,7 @@ end | |
| 9 9 | 
             
            ```
         | 
| 10 10 | 
             
            <!--
         | 
| 11 11 | 
             
              rundoc src:
         | 
| 12 | 
            -
              https://github.com/schneems/rundoc/blob/ | 
| 12 | 
            +
              https://github.com/schneems/rundoc/blob/main/test/fixtures/rails_4/rundoc.md
         | 
| 13 13 | 
             
            -->
         | 
| 14 14 |  | 
| 15 15 | 
             
            > warning
         | 
| @@ -224,15 +224,18 @@ Make sure you are in the directory that contains your Rails app, then create an | |
| 224 224 | 
             
            You can verify that the remote was added to your project by running
         | 
| 225 225 |  | 
| 226 226 | 
             
            ```term
         | 
| 227 | 
            -
            :::>> $ git config --list | grep heroku
         | 
| 227 | 
            +
            :::>> $ git config --list --local | grep heroku
         | 
| 228 228 | 
             
            ```
         | 
| 229 229 |  | 
| 230 230 | 
             
            If you see `fatal: not in a git directory` then you are likely not in the correct directory. Otherwise you may deploy your code. After you deploy your code, you will need to migrate your database, make sure it is properly scaled and use logs to debug any issues that come up.
         | 
| 231 231 |  | 
| 232 | 
            +
            >note
         | 
| 233 | 
            +
            >Following changes in the industry, Heroku has updated our default git branch name to `main`. If the project you’re deploying uses `master` as its default branch name, use `git push heroku master`.
         | 
| 234 | 
            +
             | 
| 232 235 | 
             
            Deploy your code:
         | 
| 233 236 |  | 
| 234 237 | 
             
            ```term
         | 
| 235 | 
            -
            :::>> $ git push heroku  | 
| 238 | 
            +
            :::>> $ git push heroku main
         | 
| 236 239 | 
             
            ```
         | 
| 237 240 |  | 
| 238 241 | 
             
            It is always a good idea to check to see if there are any warnings or errors in the output. If everything went well you can migrate your database.
         | 
| @@ -394,7 +397,7 @@ Looks good, so press Ctrl-C to exit and you can deploy your changes to Heroku: | |
| 394 397 | 
             
            ```term
         | 
| 395 398 | 
             
            :::> $ git add .
         | 
| 396 399 | 
             
            :::> $ git commit -m "use puma via procfile"
         | 
| 397 | 
            -
            :::> $ git push heroku  | 
| 400 | 
            +
            :::> $ git push heroku main
         | 
| 398 401 | 
             
            ```
         | 
| 399 402 |  | 
| 400 403 | 
             
            Check `ps`, you'll see the web process uses your new command specifying Puma as the web server
         | 
| @@ -9,7 +9,7 @@ end | |
| 9 9 | 
             
            ```
         | 
| 10 10 | 
             
            <!--
         | 
| 11 11 | 
             
              rundoc src:
         | 
| 12 | 
            -
              https://github.com/schneems/rundoc/blob/ | 
| 12 | 
            +
              https://github.com/schneems/rundoc/blob/main/test/fixtures/rails_5/rundoc.md
         | 
| 13 13 |  | 
| 14 14 | 
             
              Command:
         | 
| 15 15 | 
             
              $ bin/rundoc build --path test/fixtures/rails_5/rundoc.md
         | 
| @@ -215,15 +215,19 @@ Make sure you are in the directory that contains your Rails app, then create an | |
| 215 215 | 
             
            You can verify that the remote was added to your project by running:
         | 
| 216 216 |  | 
| 217 217 | 
             
            ```term
         | 
| 218 | 
            -
            :::>> $ git config --list | grep heroku
         | 
| 218 | 
            +
            :::>> $ git config --list --local | grep heroku
         | 
| 219 219 | 
             
            ```
         | 
| 220 220 |  | 
| 221 221 | 
             
            If you see `fatal: not in a git directory` then you are likely not in the correct directory. Otherwise you can deploy your code. After you deploy your code, you  need to migrate your database, make sure it is properly scaled, and use logs to debug any issues that come up.
         | 
| 222 222 |  | 
| 223 | 
            +
             | 
| 224 | 
            +
            >note
         | 
| 225 | 
            +
            >Following changes in the industry, Heroku has updated our default git branch name to `main`. If the project you’re deploying uses `master` as its default branch name, use `git push heroku master`.
         | 
| 226 | 
            +
             | 
| 223 227 | 
             
            Deploy your code:
         | 
| 224 228 |  | 
| 225 229 | 
             
            ```term
         | 
| 226 | 
            -
            :::>> $ git push heroku  | 
| 230 | 
            +
            :::>> $ git push heroku main
         | 
| 227 231 | 
             
            ```
         | 
| 228 232 |  | 
| 229 233 | 
             
            It is always a good idea to check to see if there are any warnings or errors in the output. If everything went well you can migrate your database.
         | 
| @@ -370,7 +374,7 @@ Looks good, so press `Ctrl+C` to exit and you can deploy your changes to Heroku: | |
| 370 374 | 
             
            ```term
         | 
| 371 375 | 
             
            :::>- $ git add .
         | 
| 372 376 | 
             
            :::>- $ git commit -m "use puma via procfile"
         | 
| 373 | 
            -
            :::>- $ git push heroku  | 
| 377 | 
            +
            :::>- $ git push heroku main
         | 
| 374 378 | 
             
            ```
         | 
| 375 379 |  | 
| 376 380 | 
             
            Check `ps`. You'll see that the web process uses your new command specifying Puma as the web server.
         | 
| @@ -10,7 +10,7 @@ end | |
| 10 10 |  | 
| 11 11 | 
             
            <!--
         | 
| 12 12 | 
             
              rundoc src:
         | 
| 13 | 
            -
              https://github.com/schneems/rundoc/blob/ | 
| 13 | 
            +
              https://github.com/schneems/rundoc/blob/main/test/fixtures/rails_6/rundoc.md
         | 
| 14 14 |  | 
| 15 15 | 
             
              Command:
         | 
| 16 16 | 
             
              $ bin/rundoc build --path test/fixtures/rails_6/rundoc.md
         | 
| @@ -214,15 +214,18 @@ Make sure you are in the directory that contains your Rails app, then create an | |
| 214 214 | 
             
            You can verify that the remote was added to your project by running:
         | 
| 215 215 |  | 
| 216 216 | 
             
            ```term
         | 
| 217 | 
            -
            :::>> $ git config --list | grep heroku
         | 
| 217 | 
            +
            :::>> $ git config --list --local | grep heroku
         | 
| 218 218 | 
             
            ```
         | 
| 219 219 |  | 
| 220 220 | 
             
            If you see `fatal: not in a git directory` then you are likely not in the correct directory. Otherwise, you can deploy your code. After you deploy your code, you need to migrate your database, make sure it is properly scaled, and use logs to debug any issues that come up.
         | 
| 221 221 |  | 
| 222 | 
            +
            >note
         | 
| 223 | 
            +
            >Following changes in the industry, Heroku has updated our default git branch name to `main`. If the project you’re deploying uses `master` as its default branch name, use `git push heroku master`.
         | 
| 224 | 
            +
             | 
| 222 225 | 
             
            Deploy your code:
         | 
| 223 226 |  | 
| 224 227 | 
             
            ```term
         | 
| 225 | 
            -
            :::>> $ git push heroku main | 
| 228 | 
            +
            :::>> $ git push heroku main
         | 
| 226 229 | 
             
            ```
         | 
| 227 230 |  | 
| 228 231 | 
             
            It is always a good idea to check to see if there are any warnings or errors in the output. If everything went well you can migrate your database.
         | 
| @@ -11,6 +11,13 @@ class BashTest < Minitest::Test | |
| 11 11 | 
             
                Dir.chdir(original_dir.strip)
         | 
| 12 12 | 
             
              end
         | 
| 13 13 |  | 
| 14 | 
            +
              def test_bash_stderr_with_or_is_capture
         | 
| 15 | 
            +
             | 
| 16 | 
            +
                command = "1>&2 echo 'msg to STDERR 1' || 1>&2 echo 'msg to STDERR 2'"
         | 
| 17 | 
            +
                bash = Rundoc::CodeCommand::Bash.new(command)
         | 
| 18 | 
            +
                assert_equal "$ #{command}", bash.to_md
         | 
| 19 | 
            +
                assert_equal "msg to STDERR 1\n",   bash.call
         | 
| 20 | 
            +
              end
         | 
| 14 21 |  | 
| 15 22 | 
             
              def test_bash_shells_and_shows_correctly
         | 
| 16 23 | 
             
                ["pwd", "ls"].each do |command|
         | 
    
        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: 1.1. | 
| 4 | 
            +
              version: 1.1.3
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Richard Schneeman
         | 
| 8 8 | 
             
            autorequire:
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2020- | 
| 11 | 
            +
            date: 2020-09-11 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: thor
         |