pandoc-ruby 2.1.8 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9d9359ca27925935afcdd5599c555064864b1e0d14e5c55f54baf95678ccfba0
4
- data.tar.gz: d9e80c8530cc6452d0b50b3a60b971bc5d3fed5cc43cb93a35132c30a0973f63
3
+ metadata.gz: 8e8ca5b1e67ee24b1ce6da71e7d66b79c01de59784bca75862c37463c8b7c149
4
+ data.tar.gz: f6beef0283cf065db5f496449230fbf70fee63e699ebc8b5e3002440c707df78
5
5
  SHA512:
6
- metadata.gz: 1de8d38e929bc12e5e3e93a22586cdc81740c69071b956dd01685e835f1007e350476851379220bf192a67444afe51bef4b7e19e4f8bb3a59c876360d4fdca95
7
- data.tar.gz: '0685c4b3c0286942be26232e4767a94f1194d7babbf5493a6ccdef4dfa45e783da51e63818f24e72fb00422d86cbd6b1947af9b56507680691660c9eff6c93b9'
6
+ metadata.gz: f5389c2016eee54a1fd8d4238b0579c10ffc7ee35ee97a362eb90a44e6798aa9196674af80cb9abc3228db19aadd4e93e1ecf02d6229fd4231bd9bc947755b78
7
+ data.tar.gz: 2039942ca2d81756b3ce3077bcf1eb8c64347fe256d0c1ced34406f55028e84f788f289de484eb3c3350184a014c42c9b5ff54aed660ea74b0ef549398d8662b
data/Gemfile CHANGED
@@ -10,4 +10,5 @@ group :development, :test do
10
10
  gem 'mocha'
11
11
  gem 'rake'
12
12
  gem 'rdoc'
13
+ gem 'rubocop'
13
14
  end
data/Gemfile.lock CHANGED
@@ -1,10 +1,42 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- minitest (5.14.4)
5
- mocha (1.13.0)
6
- rake (13.0.6)
7
- rdoc (6.3.3)
4
+ ast (2.4.2)
5
+ json (2.6.3)
6
+ language_server-protocol (3.17.0.3)
7
+ minitest (5.20.0)
8
+ mocha (2.1.0)
9
+ ruby2_keywords (>= 0.0.5)
10
+ parallel (1.23.0)
11
+ parser (3.2.2.4)
12
+ ast (~> 2.4.1)
13
+ racc
14
+ psych (5.1.1.1)
15
+ stringio
16
+ racc (1.7.3)
17
+ rainbow (3.1.1)
18
+ rake (13.1.0)
19
+ rdoc (6.6.0)
20
+ psych (>= 4.0.0)
21
+ regexp_parser (2.8.2)
22
+ rexml (3.2.6)
23
+ rubocop (1.57.2)
24
+ json (~> 2.3)
25
+ language_server-protocol (>= 3.17.0)
26
+ parallel (~> 1.10)
27
+ parser (>= 3.2.2.4)
28
+ rainbow (>= 2.2.2, < 4.0)
29
+ regexp_parser (>= 1.8, < 3.0)
30
+ rexml (>= 3.2.5, < 4.0)
31
+ rubocop-ast (>= 1.28.1, < 2.0)
32
+ ruby-progressbar (~> 1.7)
33
+ unicode-display_width (>= 2.4.0, < 3.0)
34
+ rubocop-ast (1.30.0)
35
+ parser (>= 3.2.1.0)
36
+ ruby-progressbar (1.13.0)
37
+ ruby2_keywords (0.0.5)
38
+ stringio (3.0.9)
39
+ unicode-display_width (2.5.0)
8
40
 
9
41
  PLATFORMS
10
42
  ruby
@@ -14,6 +46,7 @@ DEPENDENCIES
14
46
  mocha
15
47
  rake
16
48
  rdoc
49
+ rubocop
17
50
 
18
51
  BUNDLED WITH
19
52
  2.2.28
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
- Timeout.timeout(@timeout) do
290
- stdin.puts self.input_string
289
+ begin
290
+ Timeout.timeout(@timeout) do
291
+ stdin.puts self.input_string
291
292
 
292
- stdin.close
293
+ stdin.close
293
294
 
294
- output = stdout.read
295
- error = stderr.read
296
- exit_status = wait_thr.value
297
- end
298
- rescue Timeout::Error => ex
299
- Process.kill 9, wait_thr.pid
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
- maybe_ex = "\n#{ex}" if ex
302
- error = "Pandoc timed out after #{@timeout} seconds.#{maybe_ex}"
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'
8
+ s.version = '2.1.10'
9
9
  s.authors = ['William Melody']
10
- s.date = '2023-10-04'
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 = [
@@ -24,7 +24,22 @@ describe 'Conversions' do
24
24
  :to => to
25
25
  )
26
26
 
27
- assert_equal(to_content.strip, converted_content.strip)
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
@@ -318,13 +318,15 @@ describe PandocRuby do
318
318
  end
319
319
 
320
320
  it 'runs more than 400 times without error' do
321
- 400.times do
322
- PandocRuby.convert(@string)
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.8
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-10-04 00:00:00.000000000 Z
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