metal_archives 3.1.1 → 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/metal_archives/models/release.rb +10 -1
- data/lib/metal_archives/parsers/release.rb +7 -0
- data/lib/metal_archives/version.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c000d091859fb144ab19500353d4901a3cb2aa2e10962e5a138a12e40c5eb11
|
4
|
+
data.tar.gz: cf9428989c5b8c3f5b36169219fbb62632703a797df2c31bf041ed8dd7e053ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56d38a266d6d882b9df4fe4a2efb0d2d9cf9a7f473a19d0bf3ff360a1967edd566c1f49f98a58e58cfcd2d245e856dd28b9fdc3d9bca6f283d253e752c99778e
|
7
|
+
data.tar.gz: a0db17d07d3703743247ed7c59dffcdbefa7686f7d50b8af4f3b6ff9d3fcc640a25208253125ad94784f9b6755298dade393a7a435fac24a8797dcf5d85ff25f
|
data/CHANGELOG.md
CHANGED
@@ -26,7 +26,16 @@ module MetalArchives
|
|
26
26
|
#
|
27
27
|
property :title
|
28
28
|
|
29
|
-
|
29
|
+
##
|
30
|
+
# :attr_reader: band
|
31
|
+
#
|
32
|
+
# Returns +rdoc-ref:MetalArchives::Band+
|
33
|
+
#
|
34
|
+
# [Raises]
|
35
|
+
# - rdoc-ref:MetalArchives::Errors::InvalidIDError when no or invalid id
|
36
|
+
# - rdoc-ref:MetalArchives::Errors::APIError when receiving a status code >= 400 (except 404)
|
37
|
+
#
|
38
|
+
property :band, type: Band
|
30
39
|
|
31
40
|
##
|
32
41
|
# :attr_reader: type
|
@@ -104,6 +104,7 @@ module MetalArchives
|
|
104
104
|
# Set default props
|
105
105
|
props = {
|
106
106
|
title: nil,
|
107
|
+
band: nil,
|
107
108
|
type: nil,
|
108
109
|
date_released: nil,
|
109
110
|
catalog_id: nil,
|
@@ -117,6 +118,12 @@ module MetalArchives
|
|
117
118
|
|
118
119
|
props[:title] = sanitize doc.css("#album_info .album_name a").first.content
|
119
120
|
|
121
|
+
# Band
|
122
|
+
band_doc = doc.css("#album_info .band_name a").first
|
123
|
+
id = Integer(band_doc.attr("href").split("/").last)
|
124
|
+
|
125
|
+
props[:band] = MetalArchives::Band.find(id)
|
126
|
+
|
120
127
|
doc.css("#album_info dl").each do |dl|
|
121
128
|
dl.search("dt").each do |dt|
|
122
129
|
content = sanitize dt.next_element.content
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metal_archives
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Dejonckheere
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04-
|
11
|
+
date: 2021-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: countries
|