clean_words 0.0.1 → 0.0.2
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/data/words.txt +1 -16
- data/lib/clean_words/version.rb +1 -1
- data/util/word_list_sanitizer.rb +5 -6
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 93b4c5b5f2f0c9536e4b6af836e9da3d20e27d0c
|
|
4
|
+
data.tar.gz: db9d86cdd3deb5e5e2d91d0a764770b8b8e0c274
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 53dd19aaa1cacaa4ed383714ddcf9470b9befe7828c167702b736dda1b57beb4ee10cc0b753ddaa33e45c9c5cf06f1b41659d05ecd2422b473a63096debe9da6
|
|
7
|
+
data.tar.gz: 8f8bd766c77f30bda25c7a70519aa571a07a60ae73bde9526bcc44ae7beb6a4c0146cd36610d1b0bfd31f2551578f72a5b9b3d8e0a17495896d9392cf519a391
|
data/data/words.txt
CHANGED
|
@@ -27,7 +27,7 @@ arctic
|
|
|
27
27
|
arena
|
|
28
28
|
armadillo
|
|
29
29
|
artichoke
|
|
30
|
-
|
|
30
|
+
arugula
|
|
31
31
|
asparagus
|
|
32
32
|
aspen
|
|
33
33
|
assembly
|
|
@@ -36,7 +36,6 @@ baboon
|
|
|
36
36
|
bacon
|
|
37
37
|
badger
|
|
38
38
|
bagel
|
|
39
|
-
bandicoot
|
|
40
39
|
barley
|
|
41
40
|
barn
|
|
42
41
|
barnacle
|
|
@@ -63,16 +62,13 @@ bluefin
|
|
|
63
62
|
boathouse
|
|
64
63
|
bobcat
|
|
65
64
|
bongo
|
|
66
|
-
bonobo
|
|
67
65
|
border
|
|
68
|
-
bowhead
|
|
69
66
|
bowling
|
|
70
67
|
boxer
|
|
71
68
|
bread
|
|
72
69
|
bridge
|
|
73
70
|
brittle
|
|
74
71
|
broccoli
|
|
75
|
-
brown
|
|
76
72
|
brownstone
|
|
77
73
|
buffalo
|
|
78
74
|
building
|
|
@@ -81,7 +77,6 @@ bullfrog
|
|
|
81
77
|
bumblebee
|
|
82
78
|
bungalow
|
|
83
79
|
bunkhouse
|
|
84
|
-
buritto
|
|
85
80
|
butterfly
|
|
86
81
|
cabana
|
|
87
82
|
cabbage
|
|
@@ -110,9 +105,7 @@ chameleon
|
|
|
110
105
|
chapel
|
|
111
106
|
cheese
|
|
112
107
|
cheetah
|
|
113
|
-
chickadee
|
|
114
108
|
chicken
|
|
115
|
-
chihuahua
|
|
116
109
|
chinchilla
|
|
117
110
|
chipmunk
|
|
118
111
|
chips
|
|
@@ -121,7 +114,6 @@ chowder
|
|
|
121
114
|
church
|
|
122
115
|
cicada
|
|
123
116
|
cinema
|
|
124
|
-
clownfish
|
|
125
117
|
clubhouse
|
|
126
118
|
cobra
|
|
127
119
|
coffee
|
|
@@ -170,7 +162,6 @@ dragon
|
|
|
170
162
|
dragonfly
|
|
171
163
|
dromedary
|
|
172
164
|
duck
|
|
173
|
-
dugong
|
|
174
165
|
dumpling
|
|
175
166
|
duplex
|
|
176
167
|
dwelling
|
|
@@ -228,11 +219,9 @@ goldfinch
|
|
|
228
219
|
goldfish
|
|
229
220
|
goose
|
|
230
221
|
gopher
|
|
231
|
-
gorilla
|
|
232
222
|
granary
|
|
233
223
|
granola
|
|
234
224
|
grape
|
|
235
|
-
grapes
|
|
236
225
|
grasshopper
|
|
237
226
|
great
|
|
238
227
|
green
|
|
@@ -365,11 +354,9 @@ monarch
|
|
|
365
354
|
monastery
|
|
366
355
|
mongoose
|
|
367
356
|
monitor
|
|
368
|
-
monkey
|
|
369
357
|
monument
|
|
370
358
|
moose
|
|
371
359
|
moray
|
|
372
|
-
mosque
|
|
373
360
|
mosquito
|
|
374
361
|
motel
|
|
375
362
|
moth
|
|
@@ -428,7 +415,6 @@ quail
|
|
|
428
415
|
queen
|
|
429
416
|
quiche
|
|
430
417
|
rabbit
|
|
431
|
-
raccoon
|
|
432
418
|
racer
|
|
433
419
|
railway
|
|
434
420
|
ranch
|
|
@@ -439,7 +425,6 @@ restaurant
|
|
|
439
425
|
retriever
|
|
440
426
|
reuben
|
|
441
427
|
river
|
|
442
|
-
roach
|
|
443
428
|
roadrunner
|
|
444
429
|
robin
|
|
445
430
|
rodent
|
data/lib/clean_words/version.rb
CHANGED
data/util/word_list_sanitizer.rb
CHANGED
|
@@ -4,8 +4,7 @@ class WordListSanitizer
|
|
|
4
4
|
end
|
|
5
5
|
|
|
6
6
|
def run!
|
|
7
|
-
|
|
8
|
-
write_file
|
|
7
|
+
update_word_file
|
|
9
8
|
end
|
|
10
9
|
|
|
11
10
|
private
|
|
@@ -13,11 +12,11 @@ class WordListSanitizer
|
|
|
13
12
|
File.dirname(__FILE__) + '/../data/words.txt'
|
|
14
13
|
end
|
|
15
14
|
|
|
16
|
-
def
|
|
17
|
-
@
|
|
15
|
+
def processed_words
|
|
16
|
+
@words.reject { |w| w.match(/^\w+$/).nil? }.map(&:downcase).sort.uniq
|
|
18
17
|
end
|
|
19
18
|
|
|
20
|
-
def
|
|
21
|
-
File.open(file_path, 'w') { |f|
|
|
19
|
+
def update_word_file
|
|
20
|
+
File.open(file_path, 'w') { |f| processed_words.each { |w| f.puts(w) } }
|
|
22
21
|
end
|
|
23
22
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: clean_words
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jake Sutton
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-10-
|
|
11
|
+
date: 2014-10-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|