clausewitz-spelling 0.2.0 → 0.2.1
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/lib/clausewitz/spelling/checker.rb +2 -0
- data/lib/clausewitz/spelling/results.rb +19 -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: b9d3b71c632261dc6d88a96862d5b7be391b12afa7cd9900f2416c2702e0a69f
|
4
|
+
data.tar.gz: be1393bf1504623c2a756d8e641c1c3fdbccebdc86bc2e6b1fc6a1338a7a6b1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5a6cf95d1249bfa24dd587aa79e5681d816e00e4c913821a275be72cb0233b1b0b8ed37ed53e0a3159eda8c6e6275823841f9a40fcd87a29913c1d190303ef6
|
7
|
+
data.tar.gz: 07da574c8bee858ede6ada2c8a29cf7ce5f3708a9eb692d082959565b3db7b1aed978ef5f5956b024011f94be7ac363ea7424e710d79163a197b982f6b875fbb
|
data/Gemfile.lock
CHANGED
@@ -91,6 +91,8 @@ module Clausewitz; module Spelling
|
|
91
91
|
end
|
92
92
|
|
93
93
|
def check_entry(key, entry, lc)
|
94
|
+
return NullEntryResult.new(key) unless entry
|
95
|
+
|
94
96
|
# We don't want to pay attention to scripted localisation, so we'll strip
|
95
97
|
# it out before we start.
|
96
98
|
# TODO: Look into supporting escaped square brackets as part of the
|
@@ -88,6 +88,25 @@ module Clausewitz; module Spelling
|
|
88
88
|
end
|
89
89
|
end
|
90
90
|
|
91
|
+
class NullEntryResults
|
92
|
+
def initialize(key)
|
93
|
+
@key = key
|
94
|
+
end
|
95
|
+
|
96
|
+
def failed?
|
97
|
+
true
|
98
|
+
end
|
99
|
+
|
100
|
+
def to_s
|
101
|
+
to_str
|
102
|
+
end
|
103
|
+
|
104
|
+
def to_str(indent = 0)
|
105
|
+
spacer = ' ' * indent
|
106
|
+
"#{spacer}#{@key.red} is missing!".red
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
91
110
|
class IgnoredEntryResult
|
92
111
|
def initialize(key)
|
93
112
|
@key = key
|