rutex 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ff3a8a86d346108ad932c9367a0f01d031d38cbe6bc55de111252bfbd5fa8d3b
4
- data.tar.gz: b441037fc05ad507269ff5c4b8e8813316bc741598dbb4d4a9261c1350d07bba
3
+ metadata.gz: ec9288e5d2e78afba4aef6a583f5fa4271024cbda48cc15eb772fd91818d9235
4
+ data.tar.gz: b77cdc736a6a7a23c47b533b31b247339c679b790e0414810270fe561cdffc89
5
5
  SHA512:
6
- metadata.gz: fb21635ec40a0790d89f9df4ab7cd072e0fc5dd796c4ed0a238a422e362603c881adabb5e8060e898f1dcf91db7aa6549a50df5e24d13a3db425cd6c04d6c3de
7
- data.tar.gz: 2c3a8fa83ff9ad5323cb9fa57d0229a8ab5f5c72833b570a4a75b36cd483fc3c73667dfbb7e8d3f43fd524df85bf019c5cab03570320daf337d7fc816bdba304
6
+ metadata.gz: b9a86f8c9ec7f7e9ab145c70a3f9c58fd37a646e719f2f5e9571a3462b7a9c9018579e6472904a5cee7fc59713872bb79ab40321514dc53c53c595fe633075ec
7
+ data.tar.gz: 1acaf94423d0b59cc1c5c19565370a90e976a3e96dae02a278e7a7c16934a01e96568963372149f780c942c299666012b9bdd2bf9990b8dc0f228bf467255cb0
data/.gitignore CHANGED
@@ -9,3 +9,4 @@
9
9
  /vendor/
10
10
  TODO.md
11
11
  .rake*
12
+ *.swp
data/.rubocop.yml ADDED
@@ -0,0 +1,27 @@
1
+ Layout/CommentIndentation:
2
+ Enabled: false
3
+
4
+ Layout/LeadingCommentSpace:
5
+ Enabled: false
6
+
7
+ Layout/SpaceAroundOperators:
8
+ Enabled: false
9
+
10
+ Layout/SpaceAfterComma:
11
+ Enabled: false
12
+
13
+ Layout/SpaceInsideBlockBraces:
14
+ Enabled: false
15
+
16
+ Naming/MethodParameterName:
17
+ Enabled: false
18
+
19
+ Style/Documentation:
20
+ Enabled: false
21
+
22
+ Style/FrozenStringLiteralComment:
23
+ Enabled: false
24
+
25
+ Style/FormatStringToken:
26
+ Enabled: false
27
+
data/Gemfile.lock ADDED
@@ -0,0 +1,32 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ rutex (0.1.1)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ ansi (1.5.0)
10
+ builder (3.2.4)
11
+ byebug (11.0.1)
12
+ minitest (5.14.0)
13
+ minitest-reporters (1.3.8)
14
+ ansi
15
+ builder
16
+ minitest (>= 5.0)
17
+ ruby-progressbar
18
+ rake (13.0.1)
19
+ ruby-progressbar (1.10.1)
20
+
21
+ PLATFORMS
22
+ ruby
23
+
24
+ DEPENDENCIES
25
+ byebug (~> 11.0.1)
26
+ minitest (~> 5.0)
27
+ minitest-reporters (~> 1.3.8)
28
+ rake (~> 13.0.1)
29
+ rutex!
30
+
31
+ BUNDLED WITH
32
+ 2.1.4
data/lib/rutex/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Rutex
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/lib/rutex.rb CHANGED
@@ -82,15 +82,20 @@ module Rutex
82
82
  path=tmp.path
83
83
  dir=path.sub(%r(.*\K/.*),'')
84
84
  tmp.close
85
- %x(pdflatex --output-directory=#{dir} #{path})
85
+ %x(pdflatex --halt-on-error --output-directory=#{dir} #{path})
86
+ raise PdfError unless $?.exitstatus==0
86
87
  path
87
88
  rescue => e
88
- puts "pdflatex error: \n#{e.message}"
89
+ puts "Pdflatex error: \n#{e.message}"
89
90
  exit
90
91
  end
91
92
 
92
93
  def convert_tex(tex_file)
93
94
  %x(convert -density 300 #{tex_file}.pdf #{outfile} 2>/dev/null)
95
+ raise ConvertError unless $?.exitstatus==0
96
+ rescue => e
97
+ puts "Conversion error: \n#{e.message}"
98
+ exit
94
99
  end
95
100
 
96
101
  def color
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rutex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - sergioro
@@ -75,8 +75,10 @@ extensions: []
75
75
  extra_rdoc_files: []
76
76
  files:
77
77
  - ".gitignore"
78
+ - ".rubocop.yml"
78
79
  - ".travis.yml"
79
80
  - Gemfile
81
+ - Gemfile.lock
80
82
  - LICENSE.txt
81
83
  - README.md
82
84
  - Rakefile