pandoc-ruby 2.1.5 → 2.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cae685a045d8dbe0031568787e914fc4a3a6ac2228abf9cb5447ee41cebddfe4
4
- data.tar.gz: e603e4caa7038e4b299457c8ad9e48464d6283ecaa02ac5dc383d27e7f768b2f
3
+ metadata.gz: 0fc72faf981a6e87e6ae3e6023dfd41111ee7fa8d72441a87eeb9c41ff0c0ed1
4
+ data.tar.gz: 1d8d925c3480800fee1701164081d96cdc8159b9dabb8008a6b19fdf678f4c05
5
5
  SHA512:
6
- metadata.gz: b066e046f9f55034567f483b037481c933b4c754cfe776133c002f15968999f27a924ebb2ce6d726637741e734893439b6f4ec3ae1157647641be274e11273c3
7
- data.tar.gz: ded6cbe85511048fc67b07aba3b6ed83610bfce88ac391e820c80ad341c3fe886e4109695dab660b6fe58dad6aaeb2460d6b882a324169d582d64c3c9ade7352
6
+ metadata.gz: ec5fd20766af6c1ba8beb17a885748850bf04c103bed37a1de9128e7b778f36553a7d93ef9d928a644830b33536247c6ea40f5af0c4f2301ef3531543d2fa8a9
7
+ data.tar.gz: 636bae03cfcf24bbb6404554917464c589856f3c2dd4f4dd5e44f5183c4396cf31a3459581bf42063bbcbc34a7dccfd2622e8a8984429f25d0a5dd82644b3373
data/lib/pandoc-ruby.rb CHANGED
@@ -272,20 +272,22 @@ class PandocRuby
272
272
  @timeout ||= 31_557_600
273
273
 
274
274
  Open3.popen3(command) do |stdin, stdout, stderr, wait_thr|
275
- Timeout.timeout(@timeout) do
276
- stdin.puts self.input_string
275
+ begin
276
+ Timeout.timeout(@timeout) do
277
+ stdin.puts self.input_string
277
278
 
278
- stdin.close
279
+ stdin.close
279
280
 
280
- output = stdout.read
281
- error = stderr.read
282
- exit_status = wait_thr.value
283
- end
284
- rescue Timeout::Error => ex
285
- Process.kill 9, wait_thr.pid
281
+ output = stdout.read
282
+ error = stderr.read
283
+ exit_status = wait_thr.value
284
+ end
285
+ rescue Timeout::Error => ex
286
+ Process.kill 9, wait_thr.pid
286
287
 
287
- maybe_ex = "\n#{ex}" if ex
288
- error = "Pandoc timed out after #{@timeout} seconds.#{maybe_ex}"
288
+ maybe_ex = "\n#{ex}" if ex
289
+ error = "Pandoc timed out after #{@timeout} seconds.#{maybe_ex}"
290
+ end
289
291
  end
290
292
 
291
293
  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.5'
8
+ s.version = '2.1.6'
9
9
  s.authors = ['William Melody']
10
- s.date = '2021-11-13'
10
+ s.date = '2021-11-22'
11
11
  s.description = 'Ruby wrapper for Pandoc'
12
12
  s.email = 'hi@williammelody.com'
13
13
  s.extra_rdoc_files = [
@@ -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.5
4
+ version: 2.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Melody
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-13 00:00:00.000000000 Z
11
+ date: 2021-11-22 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Ruby wrapper for Pandoc
14
14
  email: hi@williammelody.com