paru 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/paru/pandoc.rb +17 -0
- 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: a4c10cfc64027013b5ce47891486bb4420b7d5ad
|
4
|
+
data.tar.gz: c4db7b91a605c04c628bade971783713137ca98e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 749e3acf6c0bd0c3618a988d55f1febfda28e18de72192af80e84ac5f142596fc466c0c0805c241af2dd2595bfa654bda4798a7ffd6fa47b64f32b541a915137
|
7
|
+
data.tar.gz: e873c7d78748a3cdb192625c2fc5b3f0870d9fb6e257f4ff87adc62542ed7e09f6953ef2ff2e3887a31058ca90865e77688fe1bb12fe16dd69019d33e7af4813
|
data/lib/paru/pandoc.rb
CHANGED
@@ -27,6 +27,23 @@ module Paru
|
|
27
27
|
|
28
28
|
class Pandoc
|
29
29
|
|
30
|
+
# Gather information about pandoc. It runs `pandoc --version` and extracts
|
31
|
+
# pandoc's version number and default data directory.
|
32
|
+
def self.info
|
33
|
+
output = ''
|
34
|
+
IO.popen('pandoc --version', 'r+') do |p|
|
35
|
+
p.close_write
|
36
|
+
output << p.read
|
37
|
+
end
|
38
|
+
version = output.match(/pandoc (\d+\.\d+)$/)[1]
|
39
|
+
data_dir = output.match(/Default user data directory: (.+)$/)[1]
|
40
|
+
|
41
|
+
{
|
42
|
+
:version => version,
|
43
|
+
:data_dir => data_dir
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
30
47
|
def initialize &block
|
31
48
|
@options = {}
|
32
49
|
configure(&block) if block_given?
|