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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Nzc0OTQ4ZTE1MzA2YzQ0NDY0NGU2M2E0ODY1MzQwNTNjMDk4Nzk4Mw==
4
+ MTljMzY2OTI4MzUzNWZiZDJkNjI1YjY0ZGJmMGYzOTBiNzBhN2FkZQ==
5
5
  data.tar.gz: !binary |-
6
- MTU4ZjUwZGYxNmI2MTg3ZjVjYjExNTM4MzE3MGZlYzdiZTIwMTZjOA==
6
+ OTgxOGU4MmZmNzE4MTA3MGE0MGJmNGVjMjJiMWY3OGM3MjhhYzMyNw==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MDE1N2U0NDE0YmU0NWE0NzQ5MWU4ZDQ4ZTgyODg2MzZiZDMxNzUyZTRjOTgz
10
- NDIxMjliZjQ5NGRkZWEwNTEwZGZkNWU4N2VjNTgxYWEwODBlMmNiM2RhYTU3
11
- YmRlMjQ4M2ZjZDhkNzY2NTkzNWQwOTE3OThlZThkNTAxMGZlMmY=
9
+ OGEyZjU4NzMyZjY1NDIwMmJhNWY0MDRkODY4YTBjZGM2ZjQ3NDUwMDZlZjQ5
10
+ YjM4MmJhMDk0ZjBmZjVmZWJhYTQ3ZjhmNGFiZDZiZTdmZGM0Zjc1NmE3YmE2
11
+ Yjk2OTEzNzkxODNhOTJjZWZjMjMwOWVmOGI2NDk1ODI4NzJmZTI=
12
12
  data.tar.gz: !binary |-
13
- NWE5NGEwOGNiZmExZmZlMWYyNWI4NDg0OTk5MWQ2NzRkYWQ0MWVhZGRiOGM2
14
- YTg4OGE5OTMzMzk2MWM1YTcyM2E4NmJkNTVkZDc5NmQxMzg5ZTQ1ZDYyMjk5
15
- MWNkMjAwMTU4YWIyYTQ2Nzk4OTE1MDJhMTg1N2RjMWM4MDgzNzg=
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 == nil && field == 'Version' || field == 'Featuring Artists'
216
+ elsif MusicMetadataScore::Score.field_is_blank?(corrected) && field == 'Version' || field == 'Featuring Artists'
217
217
  nil
218
- elsif corrected != nil && field == 'Version' || field == 'Featuring Artists'
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'
@@ -1,3 +1,3 @@
1
1
  module MusicMetadataScore
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: music_metadata_score
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - tomallen400