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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c3f825db29cf16aa71180113fdba663b417a44cab29a2cd9d4c2a447c3061ae3
4
- data.tar.gz: ae39cd480cffe2f0a3ff6cb673c00c53d0d86def3136b274806dc9cacadff860
3
+ metadata.gz: b9d3b71c632261dc6d88a96862d5b7be391b12afa7cd9900f2416c2702e0a69f
4
+ data.tar.gz: be1393bf1504623c2a756d8e641c1c3fdbccebdc86bc2e6b1fc6a1338a7a6b1a
5
5
  SHA512:
6
- metadata.gz: e1880d26258c57c61d8ba8a1b9b3177e998657cef265411a09c9f5fb95616e370386e3286112e468af581ea8cda235cd4483e95e8c525303598d9377dff363e0
7
- data.tar.gz: afcd28a0b5f6250b5d4d2f6ec90b443feda4017be1543fb2466f485b261c1b256cd2b6875c26fac95e23d5c571e4a000b95d2738501b78be78c88ee2649ea301
6
+ metadata.gz: e5a6cf95d1249bfa24dd587aa79e5681d816e00e4c913821a275be72cb0233b1b0b8ed37ed53e0a3159eda8c6e6275823841f9a40fcd87a29913c1d190303ef6
7
+ data.tar.gz: 07da574c8bee858ede6ada2c8a29cf7ce5f3708a9eb692d082959565b3db7b1aed978ef5f5956b024011f94be7ac363ea7424e710d79163a197b982f6b875fbb
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- clausewitz-spelling (0.2.0)
4
+ clausewitz-spelling (0.2.1)
5
5
  colorize
6
6
  damerau-levenshtein
7
7
  ffi-hunspell-wtchappell
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Clausewitz
2
2
  module Spelling
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clausewitz-spelling
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Will Chappell