polytexnic 0.9.2 → 0.9.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/.pull_requests/1395697424 +0 -0
- data/lib/polytexnic/utils.rb +14 -4
- data/lib/polytexnic/version.rb +1 -1
- data/precompiled_binaries/tralics-i686-linux +0 -0
- data/precompiled_binaries/tralics-os-x-older +0 -0
- data/precompiled_binaries/{tralics-linux → tralics-x86_64-linux} +0 -0
- metadata +5 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ddc2f1b1a3d81b30c74dd1a56d512ba2cc117a99
|
|
4
|
+
data.tar.gz: fedabedcf95db36e6b4af2397501e6a918c2dcae
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d64b1fdc46a243bf3dffea765f79021bcd5abea61f39a61baefe3ec3d4c737ac50fcc1f9ab3c58e82b700eb94151b3b2479df8b9ec009bbbc4d46b268471db70
|
|
7
|
+
data.tar.gz: 0d674cdc635aeb2ec552ef12f67d377fc497c6ea0f2539c7d2e6b980a208d6d328598cd976f431e358ad7868fac413d06e56a0d5da2363eb0fc8297178ce9db6
|
|
File without changes
|
data/lib/polytexnic/utils.rb
CHANGED
|
@@ -8,17 +8,27 @@ module Polytexnic
|
|
|
8
8
|
|
|
9
9
|
# Returns the executable for the Tralics LaTeX-to-XML converter.
|
|
10
10
|
def tralics
|
|
11
|
+
executable = `which tralics`.chomp
|
|
12
|
+
return executable unless executable.empty?
|
|
11
13
|
filename = if os_x_newer?
|
|
12
14
|
'tralics-os-x-newer'
|
|
13
15
|
elsif os_x_older?
|
|
14
16
|
'tralics-os-x-older'
|
|
15
17
|
elsif linux?
|
|
16
|
-
|
|
17
|
-
else
|
|
18
|
-
raise "Platform #{RUBY_PLATFORM} not supported"
|
|
18
|
+
"tralics-#{RUBY_PLATFORM}"
|
|
19
19
|
end
|
|
20
20
|
project_root = File.join(File.dirname(__FILE__), '..', '..')
|
|
21
|
-
File.join(project_root, 'precompiled_binaries', filename)
|
|
21
|
+
executable = File.join(project_root, 'precompiled_binaries', filename)
|
|
22
|
+
output = `#{executable}`
|
|
23
|
+
unless output.include?('This is tralics')
|
|
24
|
+
url = 'https://github.com/softcover/tralics'
|
|
25
|
+
$stderr.puts "\nError: Document not built"
|
|
26
|
+
$stderr.puts "No compatible Tralics LaTeX-to-XML translator found"
|
|
27
|
+
$stderr.puts "Follow the instructions at\n #{url}\n"
|
|
28
|
+
$stderr.puts "to compile tralics and put it on your path"
|
|
29
|
+
exit(1)
|
|
30
|
+
end
|
|
31
|
+
@tralics ||= executable
|
|
22
32
|
end
|
|
23
33
|
|
|
24
34
|
# Returns true for OS X Mountain Lion (10.8) and later.
|
data/lib/polytexnic/version.rb
CHANGED
|
Binary file
|
|
File without changes
|
|
File without changes
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: polytexnic
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.9.
|
|
4
|
+
version: 0.9.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Michael Hartl
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2014-
|
|
12
|
+
date: 2014-03-25 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: nokogiri
|
|
@@ -204,6 +204,7 @@ files:
|
|
|
204
204
|
- .pull_requests/1388440664
|
|
205
205
|
- .pull_requests/1388802190
|
|
206
206
|
- .pull_requests/1389652617
|
|
207
|
+
- .pull_requests/1395697424
|
|
207
208
|
- .rspec
|
|
208
209
|
- Gemfile
|
|
209
210
|
- Guardfile
|
|
@@ -225,9 +226,10 @@ files:
|
|
|
225
226
|
- notes/pandoc.md
|
|
226
227
|
- polytexnic.gemspec
|
|
227
228
|
- polytexnic_commands.sty
|
|
228
|
-
- precompiled_binaries/tralics-linux
|
|
229
|
+
- precompiled_binaries/tralics-i686-linux
|
|
229
230
|
- precompiled_binaries/tralics-os-x-newer
|
|
230
231
|
- precompiled_binaries/tralics-os-x-older
|
|
232
|
+
- precompiled_binaries/tralics-x86_64-linux
|
|
231
233
|
- spec/fixtures/code_listing.tex
|
|
232
234
|
- spec/fixtures/figures.tex
|
|
233
235
|
- spec/fixtures/inline_math.html
|