texsc 0.3.2 → 0.4.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: 1338246224d9ddf219b8b4193767dcb6ddc43314ce84e8e1c6379a08176010f2
4
- data.tar.gz: 740893c232d33535750f17734ae05e160628a40c4994765db96fad1e1186f468
3
+ metadata.gz: 66cf2c3cd1fdf24062daf97f76e2a1d2a9bbc7496d4de4b110863fa9a05e34f7
4
+ data.tar.gz: 9482805d7979f80530858c721bcccb1cc80f9b01a59edf3c79e320a22979a90a
5
5
  SHA512:
6
- metadata.gz: 308b393c03295b853346781afd52bd68052619240715a00aeb12baca4347bbd646ba1d48c58f774faf0a55f59058149544e604e85b3e29459a8304381e4b5e1e
7
- data.tar.gz: d2b2056be3591b0b6c68e7eaa9e96765d8c31ee55dd4ca01591a02168a800d6a59d389d7be6dfa1b7381b73bc9cb423baaddbad9aada087e11dce545f32361c9
6
+ metadata.gz: 37f58dc30b1ccadd1edf187b5264d2f95d078c9502ab946711728c88f08bde644dd78a8285b25cec7f793ea5103cf5c8657e5b312fb04000068e1ed429bb19a6
7
+ data.tar.gz: 7477be10ec95d87d4a39429fedb65fa132227afa3b14c5238a5e470eaf7e64f9248473cb92d9e3306c5d8f75ad0cb22cb88c2ef0b12075b09dd003d85941e94a
data/bin/texsc 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.2'
24
+ VERSION = '0.4.0'
25
25
 
26
26
  STDOUT.sync = true
27
27
 
@@ -73,6 +73,11 @@ Options are:"
73
73
  tex = tex.gsub(/\\begin{#{Regexp.escape(i[:cmd])}}.+\\end{#{Regexp.escape(i[:cmd])}}/m, '')
74
74
  end
75
75
  log.info("Checking #{f} (#{tex.length} chars)...")
76
+ log.debug(
77
+ tex.split("\n")
78
+ .each_with_index.map { |t, i| format('%<pos>4d: %<line>s', pos: i + 1, line: t) }
79
+ .join("\n")
80
+ )
76
81
  cmd = [
77
82
  'aspell',
78
83
  "--ignore=#{opts['min-word-length']}",
@@ -93,10 +98,16 @@ Options are:"
93
98
  raise "Failed to run aspell, exit code is #{status}"
94
99
  end
95
100
  out = stdout.read
96
- unless out.nil?
97
- out.split("\n").select { |t| t.start_with?('&') }.each do |t|
98
- log.info(t)
99
- errors += 1
101
+ if out.nil?
102
+ log.info('aspell produced no output, hm...')
103
+ else
104
+ lines = out.split("\n")
105
+ log.info("aspell produced #{lines.length} lines of output")
106
+ lines.each_with_index do |t, i|
107
+ if t.start_with?('&')
108
+ log.info("[#{i}] #{t}")
109
+ errors += 1
110
+ end
100
111
  end
101
112
  end
102
113
  end
@@ -26,7 +26,7 @@ Feature: Command Line Processing
26
26
  How are you, my dear friiend?
27
27
  \end{document}
28
28
  """
29
- When I run bin/texsc with "article.tex"
29
+ When I run bin/texsc with "--verbose article.tex"
30
30
  Then Exit code is not zero
31
31
  And Stdout contains "& friiend "
32
32
 
@@ -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 = 'texsc'
35
- s.version = '0.3.2'
35
+ s.version = '0.4.0'
36
36
  s.license = 'MIT'
37
37
  s.summary = 'Spell Checker for LaTeX'
38
38
  s.description = 'Simple command-line spell checker for LaTeX documents'
@@ -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.8'
51
51
  s.add_development_dependency 'cucumber', '~> 1.3.17'
52
52
  s.add_development_dependency 'rake', '12.0.0'
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: texsc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.4.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: 2020-08-07 00:00:00.000000000 Z
11
+ date: 2020-08-30 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.8
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.8
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: cucumber
71
71
  requirement: !ruby/object:Gem::Requirement