music_ids 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/music_ids/id.rb +2 -2
- data/lib/music_ids/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 01d4df7373cff1ee3e167e3d95e762b2df104885
|
4
|
+
data.tar.gz: 7b0240d4b59fc374758094344fc16609407a6824
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c6ba9a0f85c9c9b4f719e00bc48a3fc66b67cd831f6147a1b41b7052d9fc5de8b08dc9873bfec5a8065b233b6a55b78a40114898f902268f9d119b66f6ca8ee
|
7
|
+
data.tar.gz: a0c4686300285053b14b86d33343c1c3d86dfd9f92c4c1aa4c4d630782e75408f9328955920835a0e67faae01088222cb71c04ece05eb1ae4b3f583989b0e46b
|
data/lib/music_ids/id.rb
CHANGED
@@ -8,7 +8,6 @@ module MusicIds
|
|
8
8
|
# @option opts [true, false] :relaxed (false) Whether to parse in relaxed mode
|
9
9
|
# @return [ISRC] the ISRC instance
|
10
10
|
def parse(input, opts = {})
|
11
|
-
input = input.to_s.upcase
|
12
11
|
opts[:relaxed] ? parse_relaxed(input) : parse_strict(input)
|
13
12
|
end
|
14
13
|
|
@@ -33,7 +32,8 @@ module MusicIds
|
|
33
32
|
end
|
34
33
|
|
35
34
|
def parse_string(input)
|
36
|
-
|
35
|
+
normalised = input.to_s.upcase
|
36
|
+
if match = well_formed_id_matcher.match(normalised)
|
37
37
|
new(match[1].gsub('-', ''))
|
38
38
|
else
|
39
39
|
yield(input)
|
data/lib/music_ids/version.rb
CHANGED