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.
- data/README.markdown +2 -0
- data/VERSION +1 -1
- data/lib/pandoc-ruby.rb +7 -4
- data/pandoc-ruby.gemspec +1 -1
- data/test/pandoc-ruby_test.rb +11 -0
- metadata +1 -1
data/README.markdown
CHANGED
@@ -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.
|
1
|
+
0.0.6
|
data/lib/pandoc-ruby.rb
CHANGED
@@ -37,10 +37,13 @@ class PandocRuby
|
|
37
37
|
private
|
38
38
|
|
39
39
|
def execute(command)
|
40
|
-
|
41
|
-
stdin
|
42
|
-
|
43
|
-
|
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
|
|
data/pandoc-ruby.gemspec
CHANGED
data/test/pandoc-ruby_test.rb
CHANGED
@@ -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
|