relaton-itu 0.3.7 → 0.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/relaton_itu/itu_bibliography.rb +1 -1
- data/lib/relaton_itu/scrapper.rb +8 -7
- data/lib/relaton_itu/version.rb +1 -1
- 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: af7a818e18ffa5fccfeef423545ad4c32b0d6dcb1fe644009c15bdd10b0fd2ee
|
4
|
+
data.tar.gz: 380ee25d72296884a4f939a68ce59e38cd888c39358fa37dc44dd36acc1543e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff1799f1140844c073ace47166272f8dba321ed606f17699122dd6f668c9746eea6cafaf52c0d55e84ed827ccf5b0f90a2f293c6b1de4f0d43a37415b9aa77ab
|
7
|
+
data.tar.gz: f263ec16e358948b32d49947cd2f7861a9f8b4635efea78250927587e72eb37c3a6fbf7e0c50a3e9784838fa074224612dedc6f5effdfda36c72281ba1ec33cf
|
data/Gemfile.lock
CHANGED
data/lib/relaton_itu/scrapper.rb
CHANGED
@@ -65,7 +65,7 @@ module RelatonItu
|
|
65
65
|
ics: [], # fetch_ics(doc),
|
66
66
|
date: fetch_dates(doc),
|
67
67
|
contributor: fetch_contributors(hit_data[:code]),
|
68
|
-
editorialgroup: fetch_workgroup(doc),
|
68
|
+
editorialgroup: fetch_workgroup(hit_data[:code], doc),
|
69
69
|
abstract: fetch_abstract(doc),
|
70
70
|
copyright: fetch_copyright(hit_data[:code], doc),
|
71
71
|
link: fetch_link(doc, url),
|
@@ -153,16 +153,17 @@ module RelatonItu
|
|
153
153
|
end
|
154
154
|
|
155
155
|
# Fetch workgroup.
|
156
|
+
# @param code [String]
|
156
157
|
# @param doc [Nokogiri::HTML::Document]
|
157
158
|
# @return [RelatonItu::EditorialGroup, NilClass]
|
158
|
-
def fetch_workgroup(doc)
|
159
|
+
def fetch_workgroup(code, doc)
|
159
160
|
wg = doc.at('//table/tr/td/span[contains(@id, "Label8")]/a')
|
160
|
-
return unless wg
|
161
|
+
# return unless wg
|
161
162
|
|
162
|
-
|
163
|
+
group = wg && itugroup(wg.text)
|
163
164
|
EditorialGroup.new(
|
164
|
-
bureau:
|
165
|
-
group:
|
165
|
+
bureau: code.match(/(?<=-)./).to_s,
|
166
|
+
group: group,
|
166
167
|
)
|
167
168
|
end
|
168
169
|
|
@@ -247,7 +248,7 @@ module RelatonItu
|
|
247
248
|
dates = []
|
248
249
|
pdate = doc.at("//table/tr/td/span[contains(@id, 'Label5')]")
|
249
250
|
publish_date = pdate&.text || ob_date(doc)
|
250
|
-
unless publish_date
|
251
|
+
unless publish_date&.empty?
|
251
252
|
dates << { type: "published", on: publish_date }
|
252
253
|
end
|
253
254
|
dates
|
data/lib/relaton_itu/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-itu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|