clausewitz-spelling 0.2.22 → 0.2.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/lib/clausewitz/localisation.rb +6 -4
- data/lib/clausewitz/spelling/checker.rb +4 -4
- data/lib/clausewitz/spelling/version.rb +1 -1
- metadata +1 -2
- data/Gemfile.lock +0 -55
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2954d070bc209b96fae11b28331a7060fb6678c446f5cf26aa042486d999bb6a
|
4
|
+
data.tar.gz: 282ed9911f05a70e940686cf05afea6c1db88bb3e9f9ab8674a7ff8e1f715d6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7637796bbcde0646dc11fb0fe3936cc273a7ce5a5bd2002031bd54cfc952b51eed87d99165029da57f1b2db534da4a7ea4977911e5973a5d933d418315aeb695
|
7
|
+
data.tar.gz: 933f6829704fe62451ab66f707d7ccc7eec30b2977784bfd6dcad8154ef54094ffc0b267d96e79c27b5aef74fe19d0384e8a7cff8b87ac5778cc591128c45cc5
|
data/.gitignore
CHANGED
@@ -92,17 +92,19 @@ module Clausewitz
|
|
92
92
|
errors = ["Cannot parse loc key without a langauge being set!"]
|
93
93
|
fail(UnparseableFileError, errors)
|
94
94
|
end
|
95
|
-
|
95
|
+
contents[current_lang] ||= {}
|
96
|
+
if line =~ /^\s*#\s*spellcheck_ignore:\s*\w+/
|
96
97
|
current_ignores = contents[current_lang]["spellcheck_ignore"] || []
|
97
|
-
|
98
|
+
ignore_section = line.split(/:\d*\s*/)[1]
|
99
|
+
ignore_section = ignore_section.strip.delete_prefix('"').delete_suffix('"')
|
100
|
+
new_ignores = ignore_section.split(',').map { |key| key.strip.delete_prefix('"').delete_suffix('"') }
|
98
101
|
current_ignores = (current_ignores + new_ignores).uniq
|
99
|
-
contents[current_lang]["spellcheck_ignore"] = current_ignores
|
102
|
+
contents[current_lang]["spellcheck_ignore"] = current_ignores.join(",")
|
100
103
|
end
|
101
104
|
next if line.empty? || line =~ /^#/
|
102
105
|
key, value = line.split(/\s/, 2)
|
103
106
|
key.gsub!(/:(\d+)?$/, '')
|
104
107
|
value.gsub!(/(^"|"$)/, '')
|
105
|
-
contents[current_lang] ||= {}
|
106
108
|
contents[current_lang][key] = value
|
107
109
|
end
|
108
110
|
contents
|
@@ -63,10 +63,10 @@ module Clausewitz; module Spelling
|
|
63
63
|
|
64
64
|
begin
|
65
65
|
contents = Clausewitz::Localisation.parse_file(filepath)
|
66
|
-
rescue Clausewitz::Localisation::UnparseableFileError => e
|
67
|
-
|
68
|
-
rescue => e
|
69
|
-
|
66
|
+
#rescue Clausewitz::Localisation::UnparseableFileError => e
|
67
|
+
# return UnparseableFileResult.new(filepath, e.errors)
|
68
|
+
#rescue => e
|
69
|
+
# return UnparseableFileResult.new(filepath, e)
|
70
70
|
end
|
71
71
|
|
72
72
|
changed_keys = Set.new
|
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.
|
4
|
+
version: 0.2.24
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Will Chappell
|
@@ -150,7 +150,6 @@ files:
|
|
150
150
|
- ".travis.yml"
|
151
151
|
- CODE_OF_CONDUCT.md
|
152
152
|
- Gemfile
|
153
|
-
- Gemfile.lock
|
154
153
|
- LICENSE.txt
|
155
154
|
- README.md
|
156
155
|
- Rakefile
|
data/Gemfile.lock
DELETED
@@ -1,55 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
clausewitz-spelling (0.2.22)
|
5
|
-
colorize
|
6
|
-
damerau-levenshtein
|
7
|
-
ffi-hunspell-wtchappell
|
8
|
-
optimist
|
9
|
-
pragmatic_tokenizer
|
10
|
-
|
11
|
-
GEM
|
12
|
-
remote: https://rubygems.org/
|
13
|
-
specs:
|
14
|
-
coderay (1.1.3)
|
15
|
-
colorize (0.8.1)
|
16
|
-
damerau-levenshtein (1.3.3)
|
17
|
-
diff-lcs (1.4.4)
|
18
|
-
ffi (1.15.4)
|
19
|
-
ffi-hunspell-wtchappell (0.4.0)
|
20
|
-
ffi (~> 1.0)
|
21
|
-
method_source (1.0.0)
|
22
|
-
optimist (3.0.1)
|
23
|
-
pragmatic_tokenizer (3.2.0)
|
24
|
-
unicode
|
25
|
-
pry (0.14.1)
|
26
|
-
coderay (~> 1.1)
|
27
|
-
method_source (~> 1.0)
|
28
|
-
rake (10.5.0)
|
29
|
-
rspec (3.10.0)
|
30
|
-
rspec-core (~> 3.10.0)
|
31
|
-
rspec-expectations (~> 3.10.0)
|
32
|
-
rspec-mocks (~> 3.10.0)
|
33
|
-
rspec-core (3.10.1)
|
34
|
-
rspec-support (~> 3.10.0)
|
35
|
-
rspec-expectations (3.10.1)
|
36
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
37
|
-
rspec-support (~> 3.10.0)
|
38
|
-
rspec-mocks (3.10.2)
|
39
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
40
|
-
rspec-support (~> 3.10.0)
|
41
|
-
rspec-support (3.10.3)
|
42
|
-
unicode (0.4.4.4)
|
43
|
-
|
44
|
-
PLATFORMS
|
45
|
-
x86_64-linux
|
46
|
-
|
47
|
-
DEPENDENCIES
|
48
|
-
bundler
|
49
|
-
clausewitz-spelling!
|
50
|
-
pry
|
51
|
-
rake (~> 10.0)
|
52
|
-
rspec (~> 3.0)
|
53
|
-
|
54
|
-
BUNDLED WITH
|
55
|
-
2.2.33
|