clausewitz-spelling 0.2.6 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/exe/clausewitz-spellcheck +10 -1
- data/lib/clausewitz/spelling/results.rb +8 -0
- data/lib/clausewitz/spelling/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 363139adec7a7cb0f9ea6e6f68f8973191609990a178eb09d219990487f9b673
|
4
|
+
data.tar.gz: 3cb93eafd6486916a76e7291e36d5ed13da692a4044253c9f524999fa359ccdc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b513fb1ff1c99a1330d024d18f963fcfb00d3e3a849477436dbdd112dfa0fcdf5f4ffd96574d4fb7b788b51c70a0ba05c755e6ac1cb0b09ca6da6b227f72b52
|
7
|
+
data.tar.gz: b0fe43720f3ecb1f8a62e097ace943bad84efe16ea349410a2b3563ec59b03c7f89dc648fab3abac28b6697ee9baa26b624598ed341bdb7b04213c6103605a87
|
data/Gemfile.lock
CHANGED
data/exe/clausewitz-spellcheck
CHANGED
@@ -51,7 +51,16 @@ class Main
|
|
51
51
|
spellchecker = Clausewitz::Spelling::Checker.new(@opts)
|
52
52
|
results = @args.map { |arg| spellchecker.check_file(arg) }
|
53
53
|
results.each { |r| puts r }
|
54
|
-
|
54
|
+
failed = results.any?(&:failed?)
|
55
|
+
if failed
|
56
|
+
overall_failures = results.reduce(0) do |memo, obj|
|
57
|
+
memo += obj.failure_total
|
58
|
+
end
|
59
|
+
puts "\nFound #{overall_failures} errors in total. :(".red
|
60
|
+
else
|
61
|
+
puts "\nAll entries checked with no errors! :)".green
|
62
|
+
end
|
63
|
+
failed
|
55
64
|
end
|
56
65
|
end
|
57
66
|
|
@@ -207,6 +207,10 @@ module Clausewitz; module Spelling
|
|
207
207
|
true
|
208
208
|
end
|
209
209
|
|
210
|
+
def failure_total
|
211
|
+
1
|
212
|
+
end
|
213
|
+
|
210
214
|
def to_s
|
211
215
|
to_str
|
212
216
|
end
|
@@ -231,6 +235,10 @@ module Clausewitz; module Spelling
|
|
231
235
|
true
|
232
236
|
end
|
233
237
|
|
238
|
+
def failure_total
|
239
|
+
1
|
240
|
+
end
|
241
|
+
|
234
242
|
def to_s
|
235
243
|
to_str
|
236
244
|
end
|