relaton-iec 1.11.1 → 1.11.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/relaton_iec/iec_bibliographic_item.rb +3 -3
- data/lib/relaton_iec/scrapper.rb +13 -11
- data/lib/relaton_iec/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: 6ac7a2b47a1a7b746f0a40a5ba93210ef38d6302e155d3b5c52d363e888de9c7
|
4
|
+
data.tar.gz: 18253a34039c3b99ad516f0260f7b34c61df0a4a8dd0ed5a32f5bafabc72b7ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7ade3ceccc427c5901b59fa90674d781430f9562ea4c64b6d575a538a58fb2c930eda46f790c2bbe9439e0e8c0dcfe92122bed97693560674dda66321778c50
|
7
|
+
data.tar.gz: d47eba43051be57244e1985b2311848db19eb5225cdada484b69c4af745eb364e40ab3c0cd745808b9c16378b448049323169844a290fd0710383d7df8bae033
|
@@ -3,7 +3,7 @@ module RelatonIec
|
|
3
3
|
TYPES = %w[
|
4
4
|
international-standard technical-specification technical-report
|
5
5
|
publicly-available-specification international-workshop-agreement
|
6
|
-
guide industry-technical-agreement
|
6
|
+
guide industry-technical-agreement system-reference-delivrabble
|
7
7
|
].freeze
|
8
8
|
|
9
9
|
FUNCTION = %w[emc safety enviroment quality-assurance].freeze
|
@@ -25,9 +25,9 @@ module RelatonIec
|
|
25
25
|
if args[:updates_document_type] &&
|
26
26
|
!TYPES.include?(args[:updates_document_type])
|
27
27
|
warn "[relaton-iec] WARNING: invalid updates_document_type "\
|
28
|
-
|
28
|
+
"\"#{args[:updates_document_type]}\""
|
29
29
|
warn "[relaton-iec] allowed updates_document_type values are: "\
|
30
|
-
|
30
|
+
"#{TYPES.join(', ')}"
|
31
31
|
end
|
32
32
|
@function = args.delete :function
|
33
33
|
@updates_document_type = args.delete :updates_document_type
|
data/lib/relaton_iec/scrapper.rb
CHANGED
@@ -17,17 +17,18 @@ module RelatonIec
|
|
17
17
|
|
18
18
|
TYPES = {
|
19
19
|
"ISO" => "international-standard",
|
20
|
-
"TS" => "
|
21
|
-
"TR" => "
|
22
|
-
"PAS" => "
|
23
|
-
"AWI" => "
|
24
|
-
"CD" => "
|
25
|
-
"FDIS" => "
|
26
|
-
"NP" => "
|
27
|
-
"DIS" => "
|
28
|
-
"WD" => "
|
20
|
+
"TS" => "technical-specification",
|
21
|
+
"TR" => "technical-report",
|
22
|
+
"PAS" => "publicly-available-specification",
|
23
|
+
"AWI" => "appruved-work-item",
|
24
|
+
"CD" => "committee-draft",
|
25
|
+
"FDIS" => "final-draft-international-standard",
|
26
|
+
"NP" => "new-proposal",
|
27
|
+
"DIS" => "draft-international-standard",
|
28
|
+
"WD" => "working-draft",
|
29
29
|
"R" => "recommendation",
|
30
30
|
"Guide" => "guide",
|
31
|
+
"SRD" => "system-reference-delivrabble",
|
31
32
|
}.freeze
|
32
33
|
|
33
34
|
class << self
|
@@ -218,9 +219,10 @@ module RelatonIec
|
|
218
219
|
# @param doc [Nokogiri::HTML::Document]
|
219
220
|
# @return [String]
|
220
221
|
def fetch_type(doc)
|
221
|
-
doc.at(
|
222
|
+
type = doc.at(
|
222
223
|
'//th[contains(., "Publication type")]/following-sibling::td/span',
|
223
|
-
).text
|
224
|
+
).text
|
225
|
+
TYPES[type] || type.downcase.tr(" ", "-")
|
224
226
|
end
|
225
227
|
|
226
228
|
# Fetch titles.
|
data/lib/relaton_iec/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-iec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.11.
|
4
|
+
version: 1.11.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-04-
|
11
|
+
date: 2022-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: equivalent-xml
|