pandoc-ruby 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -46,6 +46,8 @@ For more information on Pandoc, see the [Pandoc documentation](http://johnmacfar
46
46
 
47
47
  Pretty much everything in the gem was derived directly from [Albino](http://github.com/github/albino).
48
48
 
49
+ If you'd prefer a pure-Ruby extended markdown interpreter that can output a few different formats, take a look at [Maruku](http://maruku.rubyforge.org/).
50
+
49
51
  ## Caveats
50
52
 
51
53
  * This has only been tested on *nix systems.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.5
1
+ 0.0.6
@@ -37,10 +37,13 @@ class PandocRuby
37
37
  private
38
38
 
39
39
  def execute(command)
40
- pid, stdin, stdout, stderr = Open4.popen4(command)
41
- stdin.puts @target
42
- stdin.close
43
- stdout.read.strip
40
+ output = ''
41
+ Open4::popen4(command) do |pid, stdin, stdout, stderr|
42
+ stdin.puts @target
43
+ stdin.close
44
+ output = stdout.read.strip
45
+ end
46
+ output
44
47
  end
45
48
 
46
49
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{pandoc-ruby}
8
- s.version = "0.0.5"
8
+ s.version = "0.0.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["William Melody"]
@@ -67,4 +67,15 @@ class PandocRubyTest < Test::Unit::TestCase
67
67
  should "have convert class method" do
68
68
  assert_equal @converter.convert, PandocRuby.convert(@file, :t => :rst)
69
69
  end
70
+
71
+ should "run more than 400 times without error" do
72
+ begin
73
+ 400.times do
74
+ PandocRuby.convert(@file)
75
+ end
76
+ assert true
77
+ rescue Errno::EMFILE, Errno::EAGAIN => e
78
+ flunk e
79
+ end
80
+ end
70
81
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pandoc-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Melody