music_metadata_score 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/music_metadata_score/score.rb +10 -2
- data/lib/music_metadata_score/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MTljMzY2OTI4MzUzNWZiZDJkNjI1YjY0ZGJmMGYzOTBiNzBhN2FkZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
OTgxOGU4MmZmNzE4MTA3MGE0MGJmNGVjMjJiMWY3OGM3MjhhYzMyNw==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OGEyZjU4NzMyZjY1NDIwMmJhNWY0MDRkODY4YTBjZGM2ZjQ3NDUwMDZlZjQ5
|
10
|
+
YjM4MmJhMDk0ZjBmZjVmZWJhYTQ3ZjhmNGFiZDZiZTdmZGM0Zjc1NmE3YmE2
|
11
|
+
Yjk2OTEzNzkxODNhOTJjZWZjMjMwOWVmOGI2NDk1ODI4NzJmZTI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YWJiODc3MTI1MTMwZjUwM2Y1Y2UxNTVjNmM4MmIyYzYyNDNiNTY2YTY0ZjM3
|
14
|
+
NTdhMWI1OGIyZmUzNDBmMjVjNTBmOWUzMzQ0OTU1Mjk3ZjAwMzE0Y2IwZGI3
|
15
|
+
ZWY5MzRkZmYwNjMzZGNjNTcxNTkwYjlmODQwMzRlYmZkZjVmMjM=
|
@@ -213,15 +213,23 @@ module MusicMetadataScore
|
|
213
213
|
else
|
214
214
|
"#{field} #{is_or_are} incorrect. It should be #{corrected}"
|
215
215
|
end
|
216
|
-
elsif corrected
|
216
|
+
elsif MusicMetadataScore::Score.field_is_blank?(corrected) && field == 'Version' || field == 'Featuring Artists'
|
217
217
|
nil
|
218
|
-
elsif corrected
|
218
|
+
elsif !MusicMetadataScore::Score.field_is_blank?(corrected) && field == 'Version' || field == 'Featuring Artists'
|
219
219
|
"#{field} #{is_or_are} incorrect. It should be #{corrected}"
|
220
220
|
else
|
221
221
|
"#{field} #{is_or_are} missing"
|
222
222
|
end
|
223
223
|
end
|
224
224
|
|
225
|
+
def self.field_is_blank?(field)
|
226
|
+
if field == nil || field == "" || field == []
|
227
|
+
true
|
228
|
+
else
|
229
|
+
false
|
230
|
+
end
|
231
|
+
end
|
232
|
+
|
225
233
|
def self.is_or_are(field)
|
226
234
|
if field[field.length - 1].downcase == 's'
|
227
235
|
'are'
|