Skip to content
This repository was archived by the owner on Sep 24, 2019. It is now read-only.

Commit 0043ca7

Browse files
committed
rm none check and fix data
1 parent f99dddd commit 0043ca7

2 files changed

Lines changed: 26 additions & 32 deletions

File tree

app/models/graph/types/species.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ module Types
2424
description "Common eye colors for this species, null if this species does not typically have eyes."
2525
resolve ->(species, _, _) do
2626
return unless colors = species.eye_colors
27-
return if species.eye_colors.include?("none")
28-
2927
colors.split(", ")
3028
end
3129
end
@@ -34,8 +32,6 @@ module Types
3432
description "Common hair colors for this species, null if this species does not typically have hair."
3533
resolve ->(species, _, _) do
3634
return unless colors = species.hair_colors
37-
return if species.hair_colors.include?("none")
38-
3935
colors.split(", ")
4036
end
4137
end
@@ -44,8 +40,6 @@ module Types
4440
description "Common skin colors for this species, null if this species does not typically have skin."
4541
resolve ->(species, _, _) do
4642
return unless colors = species.skin_colors
47-
return if species.skin_colors.include?("none")
48-
4943
colors.split(", ")
5044
end
5145
end

test/fixtures/species.yml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ trandoshan:
3131
designation: sentient
3232
average_height: '200'
3333
eye_colors: yellow, orange
34-
hair_colors: none
34+
hair_colors:
3535
skin_colors: brown, green
3636
language: Dosh
3737
homeworld: trandosha
@@ -44,7 +44,7 @@ mon-calamari:
4444
designation: sentient
4545
average_height: '160'
4646
eye_colors: yellow
47-
hair_colors: none
47+
hair_colors:
4848
skin_colors: red, blue, brown, magenta
4949
language: Mon Calamarian
5050
homeworld: mon-cala
@@ -70,7 +70,7 @@ sullustan:
7070
designation: sentient
7171
average_height: '180'
7272
eye_colors: black
73-
hair_colors: none
73+
hair_colors:
7474
skin_colors: pale
7575
language: Sullutese
7676
homeworld: sullust
@@ -82,7 +82,7 @@ neimodian:
8282
designation: sentient
8383
average_height: '180'
8484
eye_colors: red, pink
85-
hair_colors: none
85+
hair_colors:
8686
skin_colors: grey, green
8787
language: Neimoidia
8888
homeworld: cato-neimoidia
@@ -95,7 +95,7 @@ gungan:
9595
designation: sentient
9696
average_height: '190'
9797
eye_colors: orange
98-
hair_colors: none
98+
hair_colors:
9999
skin_colors: brown, green
100100
language: Gungan basic
101101
homeworld: naboo
@@ -109,7 +109,7 @@ toydarian:
109109
average_height: '120'
110110
average_lifespan: '91'
111111
eye_colors: yellow
112-
hair_colors: none
112+
hair_colors:
113113
skin_colors: blue, green, grey
114114
language: Toydarian
115115
homeworld: toydaria
@@ -122,7 +122,7 @@ dug:
122122
designation: sentient
123123
average_height: '100'
124124
eye_colors: yellow, blue
125-
hair_colors: none
125+
hair_colors:
126126
skin_colors: brown, purple, grey, red
127127
language: Dugese
128128
homeworld: malastare
@@ -135,7 +135,7 @@ twi-lek:
135135
designation: sentient
136136
average_height: '200'
137137
eye_colors: blue, brown, orange, pink
138-
hair_colors: none
138+
hair_colors:
139139
skin_colors: orange, yellow, blue, green, pink, purple, tan
140140
language: Twi'leki
141141
homeworld: ryloth
@@ -148,7 +148,7 @@ aleena:
148148
designation: sentient
149149
average_height: '80'
150150
average_lifespan: '79'
151-
hair_colors: none
151+
hair_colors:
152152
skin_colors: blue, gray
153153
language: Aleena
154154
homeworld: aleen-minor
@@ -160,7 +160,7 @@ vulptereen:
160160
designation: sentient
161161
average_height: '100'
162162
eye_colors: yellow
163-
hair_colors: none
163+
hair_colors:
164164
skin_colors: grey
165165
language: vulpterish
166166
homeworld: vulpter
@@ -172,7 +172,7 @@ xexto:
172172
designation: sentient
173173
average_height: '125'
174174
eye_colors: black
175-
hair_colors: none
175+
hair_colors:
176176
skin_colors: grey, yellow, purple
177177
language: Xextese
178178
homeworld: troiken
@@ -184,7 +184,7 @@ toong:
184184
designation: sentient
185185
average_height: '200'
186186
eye_colors: orange
187-
hair_colors: none
187+
hair_colors:
188188
skin_colors: grey, green, yellow
189189
language: Tundan
190190
homeworld: tund
@@ -211,7 +211,7 @@ nautolan:
211211
average_height: '180'
212212
average_lifespan: '70'
213213
eye_colors: black
214-
hair_colors: none
214+
hair_colors:
215215
skin_colors: green, blue, brown, red
216216
language: Nautila
217217
homeworld: glee-anselm
@@ -246,7 +246,7 @@ iktotchi:
246246
designation: sentient
247247
average_height: '180'
248248
eye_colors: orange
249-
hair_colors: none
249+
hair_colors:
250250
skin_colors: pink
251251
language: Iktotchese
252252
homeworld: iktotch
@@ -260,7 +260,7 @@ quermian:
260260
average_height: '240'
261261
average_lifespan: '86'
262262
eye_colors: yellow
263-
hair_colors: none
263+
hair_colors:
264264
skin_colors: white
265265
language: Quermian
266266
homeworld: quermia
@@ -273,7 +273,7 @@ kel-dor:
273273
average_height: '180'
274274
average_lifespan: '70'
275275
eye_colors: black, silver
276-
hair_colors: none
276+
hair_colors:
277277
skin_colors: peach, orange, red
278278
language: Kel Dor
279279
homeworld: dorin
@@ -286,7 +286,7 @@ chagrian:
286286
designation: sentient
287287
average_height: '190'
288288
eye_colors: blue
289-
hair_colors: none
289+
hair_colors:
290290
skin_colors: blue
291291
language: Chagria
292292
homeworld: champala
@@ -299,7 +299,7 @@ geonosian:
299299
designation: sentient
300300
average_height: '178'
301301
eye_colors: green, hazel
302-
hair_colors: none
302+
hair_colors:
303303
skin_colors: green, brown
304304
language: Geonosian
305305
homeworld: geonosis
@@ -326,7 +326,7 @@ clawdite:
326326
average_height: '180'
327327
average_lifespan: '70'
328328
eye_colors: yellow
329-
hair_colors: none
329+
hair_colors:
330330
skin_colors: green, yellow
331331
language: Clawdite
332332
homeworld: zolan
@@ -340,7 +340,7 @@ besalisk:
340340
average_height: '178'
341341
average_lifespan: '75'
342342
eye_colors: yellow
343-
hair_colors: none
343+
hair_colors:
344344
skin_colors: brown
345345
language: besalisk
346346
homeworld: ojom
@@ -354,7 +354,7 @@ kaminoan:
354354
average_height: '220'
355355
average_lifespan: '80'
356356
eye_colors: black
357-
hair_colors: none
357+
hair_colors:
358358
skin_colors: grey, blue
359359
language: Kaminoan
360360
homeworld: kamino
@@ -365,7 +365,7 @@ skakoan:
365365
name: Skakoan
366366
classification: mammal
367367
designation: sentient
368-
hair_colors: none
368+
hair_colors:
369369
skin_colors: grey, green
370370
language: Skakoan
371371
homeworld: skako
@@ -379,7 +379,7 @@ muun:
379379
average_height: '190'
380380
average_lifespan: '100'
381381
eye_colors: black
382-
hair_colors: none
382+
hair_colors:
383383
skin_colors: grey, white
384384
language: Muun
385385
homeworld: muunilinst
@@ -393,7 +393,7 @@ togruta:
393393
average_height: '180'
394394
average_lifespan: '94'
395395
eye_colors: red, orange, yellow, green, blue, black
396-
hair_colors: none
396+
hair_colors:
397397
skin_colors: red, white, orange, yellow, green, blue
398398
language: Togruti
399399
homeworld: shili
@@ -407,7 +407,7 @@ kaleesh:
407407
average_height: '170'
408408
average_lifespan: '80'
409409
eye_colors: yellow
410-
hair_colors: none
410+
hair_colors:
411411
skin_colors: brown, orange, tan
412412
language: Kaleesh
413413
homeworld: kalee
@@ -421,7 +421,7 @@ pau-an:
421421
average_height: '190'
422422
average_lifespan: '700'
423423
eye_colors: black
424-
hair_colors: none
424+
hair_colors:
425425
skin_colors: grey
426426
language: Utapese
427427
homeworld: utapau

0 commit comments

Comments
 (0)