texqc 0.5.0 → 0.6.0

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: 19e114b82eed83d7dc3e0b0320418c89dbc0fbaf557b9886867837264c49939e
4
- data.tar.gz: d815e0852ed6fdf217935cdc8a3340bffec993430b51064b5af1f0ef6f56080c
3
+ metadata.gz: c6417dba6502ed4e98ee381614ada43663890850be482dc3e7f4dc30b72b8d25
4
+ data.tar.gz: 36a4e4704d3f35c92a7ab5ae66ced90d33f83cf96bea35c2138aaf526ea70095
5
5
  SHA512:
6
- metadata.gz: cb0a5f84ecdc58c058ce1ba513cea2e30a9b3deadf42a342b254002f2ea911174f2b853ff05fa0a7ccfeb7ba9a62b193fbe79d51f7763311d378c273d211a914
7
- data.tar.gz: 33e1ffc295e36868d42a345ac1522ffd5aa7fb5ea45caad133afb189fb0627bc4a222dabaadeb0376348df9c8ffa507b1cc15086de9bc53ace22e36bb2631eb6
6
+ metadata.gz: b61800ce2230eb64d841be40bc6dcabc6eeb4359878c7225b16be4cb1539c5812f90493e190ca02b2b20838a3d15ad8289ec30198b7ae1483824cfa4601b6244
7
+ data.tar.gz: 6b2481529eb732483a68acf882a8311c15088658d6e5b04bed6a766e4a89f8f33b20fda47f08852baaa1e84fd3b9f9696b9d5d54a3d35fa0208f65d10f78a67b
data/.rultor.yml CHANGED
@@ -1,6 +1,7 @@
1
1
  assets:
2
2
  rubygems.yml: yegor256/home#assets/rubygems.yml
3
3
  install: |
4
+ export PATH=$PATH:/usr/local/texlive/2021/bin/x86_64-linux/
4
5
  sudo apt install -y aspell
5
6
  pdd -f /dev/null
6
7
  sudo bundle install --no-color "--gemfile=$(pwd)/Gemfile"
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.5.0'
24
+ VERSION = '0.6.0'
25
25
 
26
26
  STDOUT.sync = true
27
27
 
@@ -47,7 +47,7 @@ begin
47
47
  log = Loog::REGULAR
48
48
  begin
49
49
  opts = Slop.parse(ARGV, strict: true, help: true) do |o|
50
- o.banner = "Usage (#{VERSION}): texqc [options] file
50
+ o.banner = "Usage (#{VERSION}): texqc [options] file...
51
51
  Options are:"
52
52
  o.bool '--dry', 'Don\'t fail the build on errors'
53
53
  o.array '--ignore', 'Ignore given regexp'
@@ -66,36 +66,37 @@ Options are:"
66
66
  rescue Slop::Error => ex
67
67
  raise ex.message
68
68
  end
69
- raise 'Try --help' if opts.arguments.empty?
70
- raise 'Too many arguments' unless opts.arguments.length == 1
71
- doc = opts.arguments[0]
72
- if doc.end_with?('.tex')
73
- log.info("File extention removed from #{doc.inspect}")
74
- doc = doc.gsub(/\.tex$/, '')
75
- end
76
- f = "#{doc}.log"
77
- e = Errors.new
78
- matches = [
79
- /^Underfull /,
80
- /^Overfull /,
81
- /^LaTeX Warning: /,
82
- /^pdfTeX warning: /,
83
- /^Class [a-zA-Z0-9\*]+ Warning: /,
84
- /^Package [a-zA-Z0-9\*]+ Warning: /,
85
- /^LaTeX Font Warning: /
86
- ]
87
- File.readlines(f).each_with_index do |t, i|
88
- matches.each do |p|
89
- next unless p.match?(t)
90
- next if opts[:ignore].any? { |re| /.*#{re}.*/.match?(t) }
91
- e.report(i, t)
69
+ candidates = opts.arguments
70
+ candidates += Dir['*.tex'] if candidates.empty?
71
+ candidates.each do |doc|
72
+ if doc.end_with?('.tex')
73
+ log.info("File extention removed from #{doc.inspect}")
74
+ doc = doc.gsub(/\.tex$/, '')
92
75
  end
76
+ f = "#{doc}.log"
77
+ e = Errors.new
78
+ matches = [
79
+ /^Underfull /,
80
+ /^Overfull /,
81
+ /^LaTeX Warning: /,
82
+ /^pdfTeX warning: /,
83
+ /^Class [a-zA-Z0-9\*]+ Warning: /,
84
+ /^Package [a-zA-Z0-9\*]+ Warning: /,
85
+ /^LaTeX Font Warning: /
86
+ ]
87
+ File.readlines(f).each_with_index do |t, i|
88
+ matches.each do |p|
89
+ next unless p.match?(t)
90
+ next if opts[:ignore].any? { |re| /.*#{re}.*/.match?(t) }
91
+ e.report(i, t)
92
+ end
93
+ end
94
+ unless e.count.zero?
95
+ log.info("#{e.count} LaTeX processing errors found in #{f.inspect}")
96
+ exit 1
97
+ end
98
+ log.info("No LaTeX processing errors found in #{f.inspect}")
93
99
  end
94
- unless e.count.zero?
95
- log.info("#{e.count} LaTeX processing errors found in #{f.inspect}")
96
- exit 1
97
- end
98
- log.info("No LaTeX processing errors found in #{f.inspect}")
99
100
  rescue StandardError => ex
100
101
  if opts[:verbose]
101
102
  puts Backtrace.new(ex).to_s
data/features/cli.feature CHANGED
@@ -15,7 +15,7 @@ Feature: Command Line Processing
15
15
  \end{document}
16
16
  """
17
17
  When I run bash with "pdflatex article.tex"
18
- Then I run bin/texqc with "article"
18
+ Then I run bin/texqc with ""
19
19
  Then Exit code is zero
20
20
  And Stdout contains "No LaTeX processing errors found"
21
21
 
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.5.0'
35
+ s.version = '0.6.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.5.0
4
+ version: 0.6.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-03-28 00:00:00.000000000 Z
11
+ date: 2021-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: backtrace
@@ -171,7 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
171
171
  - !ruby/object:Gem::Version
172
172
  version: '0'
173
173
  requirements: []
174
- rubygems_version: 3.0.1
174
+ rubygems_version: 3.1.2
175
175
  signing_key:
176
176
  specification_version: 2
177
177
  summary: Quality Control of Your LaTeX Build