ruby-pandoc 0.0.2 → 0.0.3
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/lib/ruby-pandoc/converter.rb +4 -3
- data/lib/ruby-pandoc/dependencies.rb +2 -2
- data/lib/ruby-pandoc/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e3f41bac4b099f10df6c2263873f5bbff593d89f
|
|
4
|
+
data.tar.gz: bb5a97f330ace15ad1867742f03e0073ab2e96b5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 05f0cc2a34b333479b7b28187f138ccee2ddda93f762616d8a240472140374c5b83f998fc9d61fd80dcdeb0c92eb081d3d7b1ed0911b89839e0f94ffc63f7e27
|
|
7
|
+
data.tar.gz: 6d3f73a5696375d12d10a14e6ba79b6f2cbe114712f485da99f1ae5f3ee2848f337799358c1f16b8bbca2d015d106d810283549bb33bba61352b90f17a2a9740
|
|
@@ -97,11 +97,12 @@ module RubyPandoc
|
|
|
97
97
|
# RubyPandoc.new("# text").convert
|
|
98
98
|
# # => "<h1 id=\"text\">text</h1>\n"
|
|
99
99
|
def convert(*args)
|
|
100
|
-
tmp_file = Tempfile.new('pandoc-conversion')
|
|
101
100
|
@options += args if args
|
|
102
|
-
@options
|
|
101
|
+
outputfile = @options.map{ |x| x[:output] }.compact
|
|
102
|
+
tmp_file = Tempfile.new('pandoc-conversion')
|
|
103
|
+
@options += [{ output: tmp_file.path }] if outputfile.empty?
|
|
103
104
|
@option_string = prepare_options(@options)
|
|
104
|
-
|
|
105
|
+
begin
|
|
105
106
|
run_pandoc
|
|
106
107
|
IO.binread(tmp_file)
|
|
107
108
|
ensure
|
|
@@ -48,13 +48,13 @@ module RubyPandoc
|
|
|
48
48
|
Dir.mktmpdir do |dir|
|
|
49
49
|
Dir.chdir(dir) do
|
|
50
50
|
system("wget #{PANDOC_URL} -O pandoc.deb")
|
|
51
|
-
system("dpkg -i pandoc.deb")
|
|
51
|
+
system("sudo dpkg -i pandoc.deb")
|
|
52
52
|
end
|
|
53
53
|
end
|
|
54
54
|
end
|
|
55
55
|
|
|
56
56
|
def get_latex
|
|
57
|
-
system('apt-get install -y --force-yes texlive
|
|
57
|
+
system('sudo apt-get install -y --force-yes texlive')
|
|
58
58
|
end
|
|
59
59
|
end
|
|
60
60
|
end
|
data/lib/ruby-pandoc/version.rb
CHANGED