pandoc-ruby 2.1.9 → 2.1.10
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/Gemfile.lock +9 -11
- data/lib/pandoc-ruby.rb +13 -11
- data/pandoc-ruby.gemspec +2 -2
- data/test/test_conversions.rb +16 -1
- data/test/test_pandoc_ruby.rb +8 -6
- 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: 8e8ca5b1e67ee24b1ce6da71e7d66b79c01de59784bca75862c37463c8b7c149
         | 
| 4 | 
            +
              data.tar.gz: f6beef0283cf065db5f496449230fbf70fee63e699ebc8b5e3002440c707df78
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: f5389c2016eee54a1fd8d4238b0579c10ffc7ee35ee97a362eb90a44e6798aa9196674af80cb9abc3228db19aadd4e93e1ecf02d6229fd4231bd9bc947755b78
         | 
| 7 | 
            +
              data.tar.gz: 2039942ca2d81756b3ce3077bcf1eb8c64347fe256d0c1ced34406f55028e84f788f289de484eb3c3350184a014c42c9b5ff54aed660ea74b0ef549398d8662b
         | 
    
        data/Gemfile.lock
    CHANGED
    
    | @@ -2,7 +2,6 @@ GEM | |
| 2 2 | 
             
              remote: http://rubygems.org/
         | 
| 3 3 | 
             
              specs:
         | 
| 4 4 | 
             
                ast (2.4.2)
         | 
| 5 | 
            -
                base64 (0.1.1)
         | 
| 6 5 | 
             
                json (2.6.3)
         | 
| 7 6 | 
             
                language_server-protocol (3.17.0.3)
         | 
| 8 7 | 
             
                minitest (5.20.0)
         | 
| @@ -12,32 +11,31 @@ GEM | |
| 12 11 | 
             
                parser (3.2.2.4)
         | 
| 13 12 | 
             
                  ast (~> 2.4.1)
         | 
| 14 13 | 
             
                  racc
         | 
| 15 | 
            -
                psych (5.1. | 
| 14 | 
            +
                psych (5.1.1.1)
         | 
| 16 15 | 
             
                  stringio
         | 
| 17 | 
            -
                racc (1.7. | 
| 16 | 
            +
                racc (1.7.3)
         | 
| 18 17 | 
             
                rainbow (3.1.1)
         | 
| 19 | 
            -
                rake (13.0 | 
| 20 | 
            -
                rdoc (6. | 
| 18 | 
            +
                rake (13.1.0)
         | 
| 19 | 
            +
                rdoc (6.6.0)
         | 
| 21 20 | 
             
                  psych (>= 4.0.0)
         | 
| 22 | 
            -
                regexp_parser (2.8. | 
| 21 | 
            +
                regexp_parser (2.8.2)
         | 
| 23 22 | 
             
                rexml (3.2.6)
         | 
| 24 | 
            -
                rubocop (1. | 
| 25 | 
            -
                  base64 (~> 0.1.1)
         | 
| 23 | 
            +
                rubocop (1.57.2)
         | 
| 26 24 | 
             
                  json (~> 2.3)
         | 
| 27 25 | 
             
                  language_server-protocol (>= 3.17.0)
         | 
| 28 26 | 
             
                  parallel (~> 1.10)
         | 
| 29 | 
            -
                  parser (>= 3.2.2. | 
| 27 | 
            +
                  parser (>= 3.2.2.4)
         | 
| 30 28 | 
             
                  rainbow (>= 2.2.2, < 4.0)
         | 
| 31 29 | 
             
                  regexp_parser (>= 1.8, < 3.0)
         | 
| 32 30 | 
             
                  rexml (>= 3.2.5, < 4.0)
         | 
| 33 31 | 
             
                  rubocop-ast (>= 1.28.1, < 2.0)
         | 
| 34 32 | 
             
                  ruby-progressbar (~> 1.7)
         | 
| 35 33 | 
             
                  unicode-display_width (>= 2.4.0, < 3.0)
         | 
| 36 | 
            -
                rubocop-ast (1. | 
| 34 | 
            +
                rubocop-ast (1.30.0)
         | 
| 37 35 | 
             
                  parser (>= 3.2.1.0)
         | 
| 38 36 | 
             
                ruby-progressbar (1.13.0)
         | 
| 39 37 | 
             
                ruby2_keywords (0.0.5)
         | 
| 40 | 
            -
                stringio (3.0. | 
| 38 | 
            +
                stringio (3.0.9)
         | 
| 41 39 | 
             
                unicode-display_width (2.5.0)
         | 
| 42 40 |  | 
| 43 41 | 
             
            PLATFORMS
         | 
    
        data/lib/pandoc-ruby.rb
    CHANGED
    
    | @@ -286,20 +286,22 @@ class PandocRuby | |
| 286 286 | 
             
                  @timeout ||= 31_557_600
         | 
| 287 287 |  | 
| 288 288 | 
             
                  Open3.popen3(command) do |stdin, stdout, stderr, wait_thr|
         | 
| 289 | 
            -
                     | 
| 290 | 
            -
                       | 
| 289 | 
            +
                    begin
         | 
| 290 | 
            +
                      Timeout.timeout(@timeout) do
         | 
| 291 | 
            +
                        stdin.puts self.input_string
         | 
| 291 292 |  | 
| 292 | 
            -
             | 
| 293 | 
            +
                        stdin.close
         | 
| 293 294 |  | 
| 294 | 
            -
             | 
| 295 | 
            -
             | 
| 296 | 
            -
             | 
| 297 | 
            -
             | 
| 298 | 
            -
             | 
| 299 | 
            -
             | 
| 295 | 
            +
                        output      = stdout.read
         | 
| 296 | 
            +
                        error       = stderr.read
         | 
| 297 | 
            +
                        exit_status = wait_thr.value
         | 
| 298 | 
            +
                      end
         | 
| 299 | 
            +
                    rescue Timeout::Error => ex
         | 
| 300 | 
            +
                      Process.kill 9, wait_thr.pid
         | 
| 300 301 |  | 
| 301 | 
            -
             | 
| 302 | 
            -
             | 
| 302 | 
            +
                      maybe_ex  = "\n#{ex}" if ex
         | 
| 303 | 
            +
                      error     = "Pandoc timed out after #{@timeout} seconds.#{maybe_ex}"
         | 
| 304 | 
            +
                    end
         | 
| 303 305 | 
             
                  end
         | 
| 304 306 |  | 
| 305 307 | 
             
                  raise error unless exit_status && exit_status.success?
         | 
    
        data/pandoc-ruby.gemspec
    CHANGED
    
    | @@ -5,9 +5,9 @@ | |
| 5 5 |  | 
| 6 6 | 
             
            Gem::Specification.new do |s|
         | 
| 7 7 | 
             
              s.name = 'pandoc-ruby'
         | 
| 8 | 
            -
              s.version = '2.1. | 
| 8 | 
            +
              s.version = '2.1.10'
         | 
| 9 9 | 
             
              s.authors = ['William Melody']
         | 
| 10 | 
            -
              s.date = '2023- | 
| 10 | 
            +
              s.date = '2023-11-24'
         | 
| 11 11 | 
             
              s.description = 'Ruby wrapper for Pandoc'
         | 
| 12 12 | 
             
              s.email = 'hi@williammelody.com'
         | 
| 13 13 | 
             
              s.extra_rdoc_files = [
         | 
    
        data/test/test_conversions.rb
    CHANGED
    
    | @@ -24,7 +24,22 @@ describe 'Conversions' do | |
| 24 24 | 
             
                      :to   => to
         | 
| 25 25 | 
             
                    )
         | 
| 26 26 |  | 
| 27 | 
            -
                    assert_equal( | 
| 27 | 
            +
                    assert_equal(
         | 
| 28 | 
            +
                      to_content.strip,
         | 
| 29 | 
            +
                      converted_content.strip,
         | 
| 30 | 
            +
                      <<-HEREDOC
         | 
| 31 | 
            +
            ---------
         | 
| 32 | 
            +
            EXPECTED:
         | 
| 33 | 
            +
            ---------
         | 
| 34 | 
            +
            #{to_content.strip}
         | 
| 35 | 
            +
            ---------
         | 
| 36 | 
            +
            -------
         | 
| 37 | 
            +
            ACTUAL:
         | 
| 38 | 
            +
            -------
         | 
| 39 | 
            +
            #{converted_content.strip}
         | 
| 40 | 
            +
            -------
         | 
| 41 | 
            +
                      HEREDOC
         | 
| 42 | 
            +
                    )
         | 
| 28 43 | 
             
                  end
         | 
| 29 44 | 
             
                end
         | 
| 30 45 | 
             
              end
         | 
    
        data/test/test_pandoc_ruby.rb
    CHANGED
    
    | @@ -318,13 +318,15 @@ describe PandocRuby do | |
| 318 318 | 
             
              end
         | 
| 319 319 |  | 
| 320 320 | 
             
              it 'runs more than 400 times without error' do
         | 
| 321 | 
            -
                 | 
| 322 | 
            -
                   | 
| 321 | 
            +
                begin
         | 
| 322 | 
            +
                  400.times do
         | 
| 323 | 
            +
                    PandocRuby.convert(@string)
         | 
| 324 | 
            +
                  end
         | 
| 325 | 
            +
             | 
| 326 | 
            +
                  assert true
         | 
| 327 | 
            +
                rescue Errno::EMFILE, Errno::EAGAIN => e
         | 
| 328 | 
            +
                  flunk e
         | 
| 323 329 | 
             
                end
         | 
| 324 | 
            -
             | 
| 325 | 
            -
                assert true
         | 
| 326 | 
            -
              rescue Errno::EMFILE, Errno::EAGAIN => e
         | 
| 327 | 
            -
                flunk e
         | 
| 328 330 | 
             
              end
         | 
| 329 331 |  | 
| 330 332 | 
             
              it 'gracefully times out when pandoc hangs due to malformed input' do
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: pandoc-ruby
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 2.1. | 
| 4 | 
            +
              version: 2.1.10
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - William Melody
         | 
| 8 8 | 
             
            autorequire:
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2023- | 
| 11 | 
            +
            date: 2023-11-24 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies: []
         | 
| 13 13 | 
             
            description: Ruby wrapper for Pandoc
         | 
| 14 14 | 
             
            email: hi@williammelody.com
         |