texqc 0.3.0 → 0.3.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: bba664e2497edde7f5912a4f80dd869b298d4616a067485fd80c3e3dc1543f7a
4
- data.tar.gz: 055ed18cb80ce020f457a5b247c202587f4aeab8873d4ffa8add96cede28e95e
3
+ metadata.gz: 11c959ccc1a42d66bc7d3d3daa09ca54a8ebdf98facb6354d57238398238d63a
4
+ data.tar.gz: b1fa00eb6c705501b0f9b5cd3663c91f8b52b1c5393c87076f715777808fd498
5
5
  SHA512:
6
- metadata.gz: 033e059bbe03bc3708b85d0c395304e21de151615d7c7087fb6eec384acdd63a025a9153aa227b6b9381f8ca70a8f477c502a73a6ea82d0d203c72bed2308daf
7
- data.tar.gz: 07bac99e8f51d069614c3931a5981aa278a1bb666beba5fb2669114560938da6a76a9561af25d8335d5ed5235300db0d84d86ce0795b7f471e7fb6556d0c8b26
6
+ metadata.gz: d92293bb5536644213817b1d003feb3d13de5a2eb784a17dfde450cb3940cbf0d81683344c99767ae012b3dbd909dc0397cf9ef00c822b442d149e066118f790
7
+ data.tar.gz: 6e6492a16bc3c31293a64e830d8ad8f637378c192b2ccd76971f3fff60dc32cf65883cd42c8e046105db5b74287710947616cb20f3736e3425d12e80aeaf413c
@@ -10,6 +10,7 @@ addons:
10
10
  packages:
11
11
  - aspell
12
12
  - aspell-en
13
+ - texlive
13
14
  install:
14
15
  - gem install pdd -v 0.20.5
15
16
  - travis_retry bundle update
data/README.md CHANGED
@@ -29,6 +29,9 @@ $ latexmk -pdf article
29
29
  $ texqc article
30
30
  ```
31
31
 
32
+ If any warnings were reported by LaTeX, you will get a short list of them
33
+ and the exit code will be non-zero (very convenient for your CI/CD scripts).
34
+
32
35
  ## How to contribute
33
36
 
34
37
  Read [these guidelines](https://www.yegor256.com/2014/04/15/github-guidelines.html).
data/bin/texqc CHANGED
@@ -21,7 +21,7 @@
21
21
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  # SOFTWARE.
23
23
 
24
- VERSION = '0.3.0'
24
+ VERSION = '0.3.1'
25
25
 
26
26
  STDOUT.sync = true
27
27
 
@@ -67,12 +67,22 @@ Options are:"
67
67
  end
68
68
  raise 'Try --help' if opts.arguments.empty?
69
69
  raise 'Too many arguments' unless opts.arguments.length == 1
70
- f = "#{opts.arguments[0]}.log"
70
+ doc = opts.arguments[0]
71
+ if doc.end_with?('.tex')
72
+ log.info("File extention removed from #{doc.inspect}")
73
+ doc = doc.gsub(/\.tex$/, '')
74
+ end
75
+ f = "#{doc}.log"
71
76
  e = Errors.new
72
77
  File.readlines(f).each_with_index do |t, i|
73
- e.report(i, t) if t.start_with?('Underfull ', 'Overfull ', 'LaTeX Warning: ')
74
- e.report(i, t) if /^Class [a-zA-Z0-9\*]+ Warning: /.match?(t)
75
- e.report(i, t) if /^Package [a-zA-Z0-9\*]+ Warning: /.match?(t)
78
+ [
79
+ /^Underfull /,
80
+ /^Overfull /,
81
+ /^LaTeX Warning: /,
82
+ /^Class [a-zA-Z0-9\*]+ Warning: /,
83
+ /^Package [a-zA-Z0-9\*]+ Warning: /,
84
+ /^LaTeX Font Warning: /
85
+ ].each { |p| e.report(i, t) if p.match?(t) }
76
86
  end
77
87
  unless e.count.zero?
78
88
  log.info("#{e.count} LaTeX processing errors found in #{f.inspect}")
@@ -41,6 +41,6 @@ Feature: Command Line Processing
41
41
  \end{document}
42
42
  """
43
43
  When I run bash with "pdflatex article.tex"
44
- Then I run bin/texqc with "article"
44
+ Then I run bin/texqc with "article.tex"
45
45
  Then Exit code is not zero
46
46
  And Stdout contains "1 LaTeX processing errors"
@@ -32,7 +32,7 @@ Gem::Specification.new do |s|
32
32
  s.rubygems_version = '2.2'
33
33
  s.required_ruby_version = '>= 2.3'
34
34
  s.name = 'texqc'
35
- s.version = '0.3.0'
35
+ s.version = '0.3.1'
36
36
  s.license = 'MIT'
37
37
  s.summary = 'Quality Control of Your LaTeX Build'
38
38
  s.description = 'Run it after you compile your LaTeX document'
@@ -47,7 +47,7 @@ Gem::Specification.new do |s|
47
47
  s.add_runtime_dependency 'backtrace', '~> 0.3'
48
48
  s.add_runtime_dependency 'loog', '~> 0.2'
49
49
  s.add_runtime_dependency 'slop', '~> 4.6'
50
- s.add_development_dependency 'codecov', '0.1.10'
50
+ s.add_development_dependency 'codecov', '0.2.6'
51
51
  s.add_development_dependency 'cucumber', '~> 1.3.17'
52
52
  s.add_development_dependency 'rake', '12.3.3'
53
53
  s.add_development_dependency 'rubocop', '0.61.0'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: texqc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-10 00:00:00.000000000 Z
11
+ date: 2020-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: backtrace
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 0.1.10
61
+ version: 0.2.6
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: 0.1.10
68
+ version: 0.2.6
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: cucumber
71
71
  requirement: !ruby/object:Gem::Requirement