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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 66e994d86e1b228992fd31667ba198ae660cbaee762d062c20c8ff1411f74f27
4
- data.tar.gz: 517d3e13686eb64a9ea5838c977ea808ed170d1fca84a75d6b004bc59e59653a
3
+ metadata.gz: 2954d070bc209b96fae11b28331a7060fb6678c446f5cf26aa042486d999bb6a
4
+ data.tar.gz: 282ed9911f05a70e940686cf05afea6c1db88bb3e9f9ab8674a7ff8e1f715d6c
5
5
  SHA512:
6
- metadata.gz: 3ea9f582c79ce7422a50efa84b6ab7d8035a190a49d907136b26a230a5086f27205a587f3dfdca689e4b1d3c334a5d2334d4ac633f3aeda9cdd92b262f953ce3
7
- data.tar.gz: 0636f4de76c9558434b5bf430a51ae76b8a6c4ae96829d062cc34677541a7e60ef7634d9f45c606c0c1115c51d27dc562d9a9bdc1aa50b60be10f203b2de6205
6
+ metadata.gz: 7637796bbcde0646dc11fb0fe3936cc273a7ce5a5bd2002031bd54cfc952b51eed87d99165029da57f1b2db534da4a7ea4977911e5973a5d933d418315aeb695
7
+ data.tar.gz: 933f6829704fe62451ab66f707d7ccc7eec30b2977784bfd6dcad8154ef54094ffc0b267d96e79c27b5aef74fe19d0384e8a7cff8b87ac5778cc591128c45cc5
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
+ Gemfile.lock
1
2
  /.bundle/
2
3
  /.yardoc
3
4
  /_yardoc/
@@ -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
- if line =~ /^#\s*spellcheck_ignore:/
95
+ contents[current_lang] ||= {}
96
+ if line =~ /^\s*#\s*spellcheck_ignore:\s*\w+/
96
97
  current_ignores = contents[current_lang]["spellcheck_ignore"] || []
97
- new_ignores = line.split(/:\s*/, 1)[1].split(',').map(&:strip)
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
- return UnparseableFileResult.new(filepath, e.errors)
68
- rescue => e
69
- return UnparseableFileResult.new(filepath, e)
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
@@ -1,5 +1,5 @@
1
1
  module Clausewitz
2
2
  module Spelling
3
- VERSION = "0.2.22"
3
+ VERSION = "0.2.24"
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.22
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