rutex 0.1.2 → 0.1.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/Gemfile.lock +1 -1
- data/lib/rutex.rb +10 -4
- data/lib/rutex/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0a109437a1fab0035da570f512d6280fab45ed5da7ff418c0362672c1fed7c8d
|
|
4
|
+
data.tar.gz: 531719ff61028adc2afde56dbeff66a7ec94310a72fb742cc312b87522471023
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '01063887af0845f41b5b2467465924cc690b826950f4f3940d205b996b0670d05112f8ec6040ad7d26d45627542492bd96216c8e7dc8faaddbd7805a37fe6ae1'
|
|
7
|
+
data.tar.gz: dc16f7aa28e8b802bdb06cecef112a32abf91c43a078722f3938491849172345d8d28f68ebaff46ded8dace212361e3a0852310ae350eb7518992e539a3f625a
|
data/Gemfile.lock
CHANGED
data/lib/rutex.rb
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
require 'rutex/version'
|
|
2
2
|
require 'tempfile'
|
|
3
|
-
require 'byebug'
|
|
4
3
|
|
|
5
4
|
class RutexError < StandardError; end
|
|
6
5
|
class PdfError < RutexError; end
|
|
@@ -9,7 +8,6 @@ class ConvertError < RutexError; end
|
|
|
9
8
|
module Rutex
|
|
10
9
|
extend self
|
|
11
10
|
|
|
12
|
-
|
|
13
11
|
def entry(args)
|
|
14
12
|
@args=args
|
|
15
13
|
|
|
@@ -17,8 +15,6 @@ module Rutex
|
|
|
17
15
|
help
|
|
18
16
|
end
|
|
19
17
|
|
|
20
|
-
#byebug
|
|
21
|
-
|
|
22
18
|
parse_options
|
|
23
19
|
|
|
24
20
|
@color||='black'
|
|
@@ -82,6 +78,12 @@ module Rutex
|
|
|
82
78
|
path=tmp.path
|
|
83
79
|
dir=path.sub(%r(.*\K/.*),'')
|
|
84
80
|
tmp.close
|
|
81
|
+
|
|
82
|
+
unless has_pdflatex
|
|
83
|
+
"Cannot proceed: RuTeX depends on pdflatex"
|
|
84
|
+
exit
|
|
85
|
+
end
|
|
86
|
+
|
|
85
87
|
%x(pdflatex --halt-on-error --output-directory=#{dir} #{path})
|
|
86
88
|
raise PdfError unless $?.exitstatus==0
|
|
87
89
|
path
|
|
@@ -98,6 +100,10 @@ module Rutex
|
|
|
98
100
|
exit
|
|
99
101
|
end
|
|
100
102
|
|
|
103
|
+
def has_pdflatex
|
|
104
|
+
system('type','-p', 'pdflatex', out: File::NULL, err: File::NULL)
|
|
105
|
+
end
|
|
106
|
+
|
|
101
107
|
def color
|
|
102
108
|
@color
|
|
103
109
|
end
|
data/lib/rutex/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rutex
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- sergioro
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-02-
|
|
11
|
+
date: 2020-02-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: byebug
|