texqc 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/bin/texqc +12 -2
  3. data/features/cli.feature +16 -0
  4. data/texqc.gemspec +1 -1
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c6417dba6502ed4e98ee381614ada43663890850be482dc3e7f4dc30b72b8d25
4
- data.tar.gz: 36a4e4704d3f35c92a7ab5ae66ced90d33f83cf96bea35c2138aaf526ea70095
3
+ metadata.gz: e88425aca179dc71ac9e248a801d9c1b186099971c9eeaeec39758f57198c64b
4
+ data.tar.gz: 3bf5fe50c3ca447464518b63fc0c239015875f101d47eb9b921a9e75ab2bdcfb
5
5
  SHA512:
6
- metadata.gz: b61800ce2230eb64d841be40bc6dcabc6eeb4359878c7225b16be4cb1539c5812f90493e190ca02b2b20838a3d15ad8289ec30198b7ae1483824cfa4601b6244
7
- data.tar.gz: 6b2481529eb732483a68acf882a8311c15088658d6e5b04bed6a766e4a89f8f33b20fda47f08852baaa1e84fd3b9f9696b9d5d54a3d35fa0208f65d10f78a67b
6
+ metadata.gz: 8368418b1b9bdbaadfaaf0f4e2fe9b0e02e6744b0ec459d5b5d43333dbcd5aaaa6dbeb270cfc84829802ef1949bea88959e016ee5d3b5736877d661ddf58dd5f
7
+ data.tar.gz: b2feafedb767d24ac19a2e506ed7c711fe5254e7694bf201806e6c91f6282eeede0d42d614471c8b15c8723f0da338fc7464ee03b9bc30d5c2022bec0b645ccc
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.6.0'
24
+ VERSION = '0.7.0'
25
25
 
26
26
  STDOUT.sync = true
27
27
 
@@ -45,8 +45,18 @@ end
45
45
 
46
46
  begin
47
47
  log = Loog::REGULAR
48
+ args = []
49
+ if File.exist?('.texqc')
50
+ cfg = File.new('.texqc')
51
+ body = File.read(cfg)
52
+ extra = body.split(/\s+/).map(&:strip)
53
+ args += extra
54
+ puts "Found #{body.split(/\n/).length} lines in #{File.absolute_path(cfg)}"
55
+ end
56
+ args += ARGV
57
+
48
58
  begin
49
- opts = Slop.parse(ARGV, strict: true, help: true) do |o|
59
+ opts = Slop.parse(args, strict: true, help: true) do |o|
50
60
  o.banner = "Usage (#{VERSION}): texqc [options] file...
51
61
  Options are:"
52
62
  o.bool '--dry', 'Don\'t fail the build on errors'
data/features/cli.feature CHANGED
@@ -56,3 +56,19 @@ Feature: Command Line Processing
56
56
  When I run bash with "pdflatex article.tex"
57
57
  Then I run bin/texqc with "--ignore 'may have changed' article.tex"
58
58
  Then Exit code is zero
59
+
60
+ Scenario: Bad LaTeX log output checked with LaTeX warning, but ignored with .texqc
61
+ Given I have a "article.tex" file with content:
62
+ """
63
+ \documentclass{article}
64
+ \begin{document}
65
+ test\label{xxx}test\label{xxx}
66
+ \end{document}
67
+ """
68
+ And I have a ".texqc" file with content:
69
+ """
70
+ --ignore 'may have changed' article.tex
71
+ """
72
+ When I run bash with "pdflatex article.tex"
73
+ Then I run bin/texqc
74
+ Then Exit code is zero
data/texqc.gemspec CHANGED
@@ -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.6.0'
35
+ s.version = '0.7.0'
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'
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.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-16 00:00:00.000000000 Z
11
+ date: 2021-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: backtrace