texsc 0.2.0 → 0.3.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: 7afe2218441763abfb00eef1e6c2bfba99071e18dd70b63c5d6e9ed92a2109c1
4
- data.tar.gz: 6f57f9a091a1dfeeb19c41cb6faceefb98ed3686726b2037a2d701c67677a655
3
+ metadata.gz: 1f0e7863fdd9141c6d4d448b60e0feabc45b48bfa2652a93a6bce2cc39fd6087
4
+ data.tar.gz: 80a989ea2b50f79af5860bb396cbd4a0a6d47aaa9a6bcd368296004c8972b29e
5
5
  SHA512:
6
- metadata.gz: aa91ba8ea8c73543141b07bc77a70f303e4d3a1304ef374688283ddb2b7ed78e52e70d0c995cf6c1b840e0ea619af2898f9629f7c5032b2319a3eaf5a5608682
7
- data.tar.gz: ca00529d0a63fb9fa78ccbc0f0e36bf2b8b50f3af8c398f9f4db2e42ef0b20a2bfe83b3016a2f3fbfd33d08b4de238b31cf0a71973ac9f7f15857ae685cd1f9c
6
+ metadata.gz: dc4ee93d540b0fce8255a43bc4c7f1f744de57cd9e38b93f548af9fcc7857d6d8b25bdb3e2012e80a79b3c6c998ec752000a3473aa91919afec550882f0870b9
7
+ data.tar.gz: 2d430663f77c0726fc498026dfbad83e94424f0d272f506ff0c2082c23dcebe0ab250d1e665df7e731b9cd2018b79fcf6b5cf04dd4bee2ba5442df345603bbb4
@@ -9,6 +9,7 @@ addons:
9
9
  apt:
10
10
  packages:
11
11
  - aspell
12
+ - aspell-en
12
13
  install:
13
14
  - gem install pdd -v 0.20.5
14
15
  - travis_retry bundle update
data/README.md CHANGED
@@ -14,7 +14,7 @@
14
14
  [![Test Coverage](https://img.shields.io/codecov/c/github/yegor256/texsc.svg)](https://codecov.io/github/yegor256/texsc?branch=master)
15
15
  [![Hits-of-Code](https://hitsofcode.com/github/yegor256/texsc)](https://hitsofcode.com/view/github/yegor256/texsc)
16
16
 
17
- This tool simplies the usage of [aspell](http://aspell.net/)
17
+ This tool simplies the usage of [GNU aspell](http://aspell.net/)
18
18
  (you must have it installed)
19
19
  for spell-checking of LaTeX files.
20
20
 
@@ -30,7 +30,19 @@ Then, you just run it like this for your LaTeX files:
30
30
  $ texsc article.tex
31
31
  ```
32
32
 
33
- You may ignore certain tags or environments using `--ignore` option.
33
+ You may ignore certain tags or environments using `--ignore` option
34
+
35
+ ```bash
36
+ $ texsc --ignore=citet,citep --ignore=newminted article.tex
37
+ ```
38
+
39
+ You can specify the method of ignoring,
40
+ as [aspell suggests](http://aspell.net/man-html/The-Options.html#TeX_002fLaTeX-Filter)
41
+ (by default it's 'p'):
42
+
43
+ ```bash
44
+ $ texsc --ignore=newminted:opp article.tex
45
+ ```
34
46
 
35
47
  You may also use your own additional dictionary, via `--pws` option.
36
48
  The file must contain one word per line:
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.2.0'
24
+ VERSION = '0.3.0'
25
25
 
26
26
  STDOUT.sync = true
27
27
 
@@ -76,7 +76,11 @@ Options are:"
76
76
  '--lang=en',
77
77
  '--mode=tex',
78
78
  opts[:pws] ? "-p #{opts[:pws]}" : '',
79
- opts[:ignore].map { |e| "--add-tex-command '#{e} pppppooooo'" }.join(' '),
79
+ opts[:ignore].map do |e|
80
+ cmd, opts = e.split(':')
81
+ opts = 'p' if opts.nil?
82
+ "--add-tex-command '#{cmd} #{opts}'"
83
+ end.join(' '),
80
84
  'pipe'
81
85
  ].join(' ')
82
86
  log.debug(cmd)
@@ -28,7 +28,7 @@ Feature: Command Line Processing
28
28
  """
29
29
  When I run bin/texsc with "article.tex"
30
30
  Then Exit code is not zero
31
- And Stdout contains "& friiend 33 21"
31
+ And Stdout contains "& friiend "
32
32
 
33
33
  Scenario: Bad LaTeX with PWS can be spell checked
34
34
  Given I have a "article.tex" file with content:
@@ -74,6 +74,17 @@ Feature: Command Line Processing
74
74
  When I run bin/texsc with "--ignore nospell article.tex"
75
75
  Then Exit code is zero
76
76
 
77
+ Scenario: Bad LaTeX with complex --ignore can be spell checked
78
+ Given I have a "article.tex" file with content:
79
+ """
80
+ \documentclass{article}
81
+ \begin{document}
82
+ How are you, my dear \nospell[friiend]{friiend}{friiend}?
83
+ \end{document}
84
+ """
85
+ When I run bin/texsc with "--ignore nospell:opp article.tex"
86
+ Then Exit code is zero
87
+
77
88
  Scenario: Bad LaTeX with too short words can be spell checked
78
89
  Given I have a "article.tex" file with content:
79
90
  """
@@ -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.2.0'
35
+ s.version = '0.3.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'
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.2.0
4
+ version: 0.3.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-07-02 00:00:00.000000000 Z
11
+ date: 2020-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: backtrace