relaton-iso 1.14.0 → 1.14.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/relaton_iso/scrapper.rb +8 -6
- data/lib/relaton_iso/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da014f660a3ba5c983c0ce2ea5366b30fa66aef8aac170b399eafebe6fb9b354
|
4
|
+
data.tar.gz: dabf9942fb20214707f4029dbf3f590c0a9d1c5043dda45d192bad2cfe274bc4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e43d0fe9c10d450c499b71f34a4036276d6729e86043a490423e267c74e8969c9545da9b953691f86d3de202af719f52db4d6d45538a5cea79395c1328cdec72
|
7
|
+
data.tar.gz: d8429985f454f033d3c79f9c8c0bdf72d84036c4cbdc9c95be4053bf85ab3f66863690edef6dbcb7679b967712fd6d1ddf7a710898743befb8a452f169047145
|
data/lib/relaton_iso/scrapper.rb
CHANGED
@@ -237,16 +237,18 @@ module RelatonIso
|
|
237
237
|
# Fetch workgroup.
|
238
238
|
# @param doc [Nokogiri::HTML::Document]
|
239
239
|
# @return [Hash]
|
240
|
-
def fetch_workgroup(doc) # rubocop:disable Metrics/MethodLength,Metrics/AbcSize,Metrics/CyclomaticComplexity
|
240
|
+
def fetch_workgroup(doc) # rubocop:disable Metrics/MethodLength,Metrics/AbcSize,Metrics/CyclomaticComplexity,Metrics/PerceivedComplexity
|
241
241
|
wg = doc.at("//div[@class='clearfix']")
|
242
242
|
wg_link = wg.at "span/a"
|
243
|
+
return unless wg_link
|
244
|
+
|
243
245
|
workgroup = wg_link.text.split "/"
|
244
246
|
type = workgroup[1]&.match(/^[A-Z]+/)&.to_s || "TC"
|
245
|
-
{
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
}
|
247
|
+
# {
|
248
|
+
# name: "International Organization for Standardization",
|
249
|
+
# abbreviation: "ISO",
|
250
|
+
# url: "www.iso.org",
|
251
|
+
# }
|
250
252
|
tc_numb = workgroup[1]&.match(/\d+/)&.to_s&.to_i
|
251
253
|
tc_name = wg.at("span[@class='entry-title']").text
|
252
254
|
tc = RelatonBib::WorkGroup.new(name: tc_name, identifier: wg_link.text,
|
data/lib/relaton_iso/version.rb
CHANGED