relaton-ieee 1.14.5 → 1.14.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +1 -0
- data/.github/workflows/release.yml +3 -2
- data/.gitignore +1 -0
- data/Gemfile +7 -0
- data/lib/relaton_ieee/data_fetcher.rb +4 -3
- data/lib/relaton_ieee/data_parser.rb +4 -4
- data/lib/relaton_ieee/hash_converter.rb +1 -1
- data/lib/relaton_ieee/ieee_bibliographic_item.rb +6 -6
- data/lib/relaton_ieee/version.rb +1 -1
- data/lib/relaton_ieee/xml_parser.rb +1 -1
- data/lib/relaton_ieee.rb +1 -0
- data/relaton_ieee.gemspec +4 -9
- metadata +20 -90
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ada9626ba7d42d2b18555142d178896b289c1d55910b64bd2de05e2be230aee8
|
4
|
+
data.tar.gz: 696191fb9c3a4aa1f35b444e84a82aed4121a55ca599df6cad4428cdec0ce6fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4def0f35dcbbee001582ef10a9ae33c14421740c9e2c791df064c1e050adaff51419e80c13e6e2d5e16318eb850d8ed6325f63dbad39b0b15af029356fccd214
|
7
|
+
data.tar.gz: 55c4b23088e260c7679e5dbaaf5283c222f45df06d61909c81cb3d6498e5652da2f751dba9ed8a1b9504c2e185172646c4b47463f85687997b7df0cc65b05de8
|
data/.github/workflows/rake.yml
CHANGED
data/.gitignore
CHANGED
data/Gemfile
CHANGED
@@ -31,7 +31,7 @@ module RelatonIeee
|
|
31
31
|
@ext = format.sub(/^bib/, "")
|
32
32
|
@crossrefs = {}
|
33
33
|
@backrefs = {}
|
34
|
-
|
34
|
+
@index = Relaton::Index.find_or_create :IEEE
|
35
35
|
end
|
36
36
|
|
37
37
|
#
|
@@ -44,7 +44,7 @@ module RelatonIeee
|
|
44
44
|
def self.fetch(output: "data", format: "yaml")
|
45
45
|
t1 = Time.now
|
46
46
|
puts "Started at: #{t1}"
|
47
|
-
FileUtils.mkdir_p output
|
47
|
+
FileUtils.mkdir_p output
|
48
48
|
new(output, format).fetch
|
49
49
|
t2 = Time.now
|
50
50
|
puts "Stopped at: #{t2}"
|
@@ -99,7 +99,8 @@ module RelatonIeee
|
|
99
99
|
stdid = doc.at("./publicationinfo/standard_id")&.text
|
100
100
|
return if stdid == "0"
|
101
101
|
|
102
|
-
|
102
|
+
fetcher = DataParser.new doc, self
|
103
|
+
bib = fetcher.parse
|
103
104
|
if bib.docnumber.nil?
|
104
105
|
nt = doc&.at("./normtitle")&.text
|
105
106
|
warn "PubID parse error. Normtitle: #{nt}, file: #{filename}"
|
@@ -4,7 +4,7 @@ module RelatonIeee
|
|
4
4
|
"LastInspecUpd" => "updated" }.freeze
|
5
5
|
ATTRS = %i[
|
6
6
|
docnumber title date docid contributor abstract copyright docstatus
|
7
|
-
relation link keyword ics editorialgroup standard_status
|
7
|
+
relation link keyword ics editorialgroup standard_status standard_modified
|
8
8
|
pubstatus holdstatus doctype
|
9
9
|
].freeze
|
10
10
|
|
@@ -223,7 +223,7 @@ module RelatonIeee
|
|
223
223
|
# @return [RelatonIee::DocumentStatus, nil]
|
224
224
|
#
|
225
225
|
def parse_docstatus
|
226
|
-
st =
|
226
|
+
st = parse_standard_modified
|
227
227
|
return unless %w[Draft Approved Superseded Withdrawn].include?(st)
|
228
228
|
|
229
229
|
DocumentStatus.new stage: st.downcase
|
@@ -307,7 +307,7 @@ module RelatonIeee
|
|
307
307
|
#
|
308
308
|
# @return [String, nil] standard modifier or nil
|
309
309
|
#
|
310
|
-
def
|
310
|
+
def parse_standard_modified
|
311
311
|
doc.at("./publicationinfo/standardmodifierset/standard_modifier")&.text
|
312
312
|
end
|
313
313
|
|
@@ -335,7 +335,7 @@ module RelatonIeee
|
|
335
335
|
# @return [String] doctype
|
336
336
|
#
|
337
337
|
def parse_doctype
|
338
|
-
|
338
|
+
parse_standard_modified == "Redline" ? "redline" : "standard"
|
339
339
|
end
|
340
340
|
end
|
341
341
|
end
|
@@ -30,7 +30,7 @@ module RelatonIeee
|
|
30
30
|
ext = hash.delete(:ext)
|
31
31
|
return unless ext
|
32
32
|
|
33
|
-
attrs = %i[standard_status
|
33
|
+
attrs = %i[standard_status standard_modified pubstatus holdstatus]
|
34
34
|
ext.select { |k, _| attrs.include? k }.each do |k, v|
|
35
35
|
hash[k] = v
|
36
36
|
end
|
@@ -10,7 +10,7 @@ module RelatonIeee
|
|
10
10
|
attr_reader :trialuse
|
11
11
|
|
12
12
|
# @return [String, nil]
|
13
|
-
attr_reader :standard_status, :
|
13
|
+
attr_reader :standard_status, :standard_modified, :pubstatus, :holdstatus
|
14
14
|
|
15
15
|
#
|
16
16
|
# @param [Hash] args
|
@@ -18,7 +18,7 @@ module RelatonIeee
|
|
18
18
|
# @option args [Array<RelatonIeee::EditorialGroup>] :editorialgroup
|
19
19
|
# Editorial group
|
20
20
|
# @option args [String, nil] :standard_status Active, Inactive, Superseded
|
21
|
-
# @option args [String, nil] :
|
21
|
+
# @option args [String, nil] :standard_modified Draft, Withdrawn, Suspended,
|
22
22
|
# Approved, Reserved, Redline
|
23
23
|
# @option args [String, nil] :pubstatus Active, Inactive
|
24
24
|
# @option args [String, nil] :holdstatus Held, Publish
|
@@ -35,7 +35,7 @@ module RelatonIeee
|
|
35
35
|
eg = args.delete(:editorialgroup)
|
36
36
|
@trialuse = args.delete(:trialuse)
|
37
37
|
@standard_status = args.delete(:standard_status)
|
38
|
-
@
|
38
|
+
@standard_modified = args.delete(:standard_modified)
|
39
39
|
@pubstatus = args.delete(:pubstatus)
|
40
40
|
@holdstatus = args.delete(:holdstatus)
|
41
41
|
super
|
@@ -66,7 +66,7 @@ module RelatonIeee
|
|
66
66
|
def to_xml(**opts) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
67
67
|
super(**opts) do |bldr|
|
68
68
|
if opts[:bibdata] && (doctype || subdoctype || !trialuse.nil? || editorialgroup ||
|
69
|
-
ics.any? || standard_status ||
|
69
|
+
ics.any? || standard_status || standard_modified || pubstatus || holdstatus)
|
70
70
|
ext = bldr.ext do |b|
|
71
71
|
b.doctype doctype if doctype
|
72
72
|
b.subdoctype subdoctype if subdoctype
|
@@ -74,7 +74,7 @@ module RelatonIeee
|
|
74
74
|
editorialgroup&.to_xml(b)
|
75
75
|
ics.each { |ic| ic.to_xml(b) }
|
76
76
|
b.standard_status standard_status if standard_status
|
77
|
-
b.
|
77
|
+
b.standard_modified standard_modified if standard_modified
|
78
78
|
b.pubstatus pubstatus if pubstatus
|
79
79
|
b.holdstatus holdstatus if holdstatus
|
80
80
|
end
|
@@ -94,7 +94,7 @@ module RelatonIeee
|
|
94
94
|
hash = super
|
95
95
|
hash["trialuse"] = trialuse unless trialuse.nil?
|
96
96
|
hash["ext"]["standard_status"] = standard_status unless standard_status.nil?
|
97
|
-
hash["ext"]["
|
97
|
+
hash["ext"]["standard_modified"] = standard_modified unless standard_modified.nil?
|
98
98
|
hash["ext"]["pubstatus"] = pubstatus unless pubstatus.nil?
|
99
99
|
hash["ext"]["holdstatus"] = holdstatus unless holdstatus.nil?
|
100
100
|
hash
|
data/lib/relaton_ieee/version.rb
CHANGED
@@ -13,7 +13,7 @@ module RelatonIeee
|
|
13
13
|
|
14
14
|
data[:editorialgroup] = parse_editorialgroup(item)
|
15
15
|
data[:standard_status] = ext.at("./standard_status")&.text
|
16
|
-
data[:
|
16
|
+
data[:standard_modified] = ext.at("./standard_modified")&.text
|
17
17
|
data[:pubstatus] = ext.at("./pubstatus")&.text
|
18
18
|
data[:holdstatus] = ext.at("./holdstatus")&.text
|
19
19
|
data
|
data/lib/relaton_ieee.rb
CHANGED
data/relaton_ieee.gemspec
CHANGED
@@ -32,15 +32,10 @@ Gem::Specification.new do |spec|
|
|
32
32
|
spec.require_paths = ["lib"]
|
33
33
|
|
34
34
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
35
|
-
|
36
|
-
spec.
|
37
|
-
spec.
|
38
|
-
spec.add_development_dependency "vcr"
|
39
|
-
spec.add_development_dependency "webmock"
|
40
|
-
spec.add_development_dependency "webrick"
|
41
|
-
|
42
|
-
spec.add_dependency "faraday", "~> 1.0"
|
43
|
-
spec.add_dependency "mini_portile2"
|
35
|
+
|
36
|
+
spec.add_dependency "faraday", "~> 2.7.0"
|
37
|
+
spec.add_dependency "mini_portile2", "~> 2.8.0"
|
44
38
|
spec.add_dependency "relaton-bib", "~> 1.14.0"
|
39
|
+
spec.add_dependency "relaton-index", "~> 0.2.0"
|
45
40
|
spec.add_dependency "rubyzip", "~> 2.3.0"
|
46
41
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-ieee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.14.
|
4
|
+
version: 1.14.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: equivalent-xml
|
@@ -25,131 +25,61 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0.6'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: ruby-jing
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: simplecov
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: vcr
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: webmock
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: webrick
|
28
|
+
name: faraday
|
99
29
|
requirement: !ruby/object:Gem::Requirement
|
100
30
|
requirements:
|
101
|
-
- - "
|
31
|
+
- - "~>"
|
102
32
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
104
|
-
type: :
|
33
|
+
version: 2.7.0
|
34
|
+
type: :runtime
|
105
35
|
prerelease: false
|
106
36
|
version_requirements: !ruby/object:Gem::Requirement
|
107
37
|
requirements:
|
108
|
-
- - "
|
38
|
+
- - "~>"
|
109
39
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
40
|
+
version: 2.7.0
|
111
41
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
42
|
+
name: mini_portile2
|
113
43
|
requirement: !ruby/object:Gem::Requirement
|
114
44
|
requirements:
|
115
45
|
- - "~>"
|
116
46
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
47
|
+
version: 2.8.0
|
118
48
|
type: :runtime
|
119
49
|
prerelease: false
|
120
50
|
version_requirements: !ruby/object:Gem::Requirement
|
121
51
|
requirements:
|
122
52
|
- - "~>"
|
123
53
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
54
|
+
version: 2.8.0
|
125
55
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
56
|
+
name: relaton-bib
|
127
57
|
requirement: !ruby/object:Gem::Requirement
|
128
58
|
requirements:
|
129
|
-
- - "
|
59
|
+
- - "~>"
|
130
60
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
61
|
+
version: 1.14.0
|
132
62
|
type: :runtime
|
133
63
|
prerelease: false
|
134
64
|
version_requirements: !ruby/object:Gem::Requirement
|
135
65
|
requirements:
|
136
|
-
- - "
|
66
|
+
- - "~>"
|
137
67
|
- !ruby/object:Gem::Version
|
138
|
-
version:
|
68
|
+
version: 1.14.0
|
139
69
|
- !ruby/object:Gem::Dependency
|
140
|
-
name: relaton-
|
70
|
+
name: relaton-index
|
141
71
|
requirement: !ruby/object:Gem::Requirement
|
142
72
|
requirements:
|
143
73
|
- - "~>"
|
144
74
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
75
|
+
version: 0.2.0
|
146
76
|
type: :runtime
|
147
77
|
prerelease: false
|
148
78
|
version_requirements: !ruby/object:Gem::Requirement
|
149
79
|
requirements:
|
150
80
|
- - "~>"
|
151
81
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
82
|
+
version: 0.2.0
|
153
83
|
- !ruby/object:Gem::Dependency
|
154
84
|
name: rubyzip
|
155
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -226,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
226
156
|
- !ruby/object:Gem::Version
|
227
157
|
version: '0'
|
228
158
|
requirements: []
|
229
|
-
rubygems_version: 3.
|
159
|
+
rubygems_version: 3.3.26
|
230
160
|
signing_key:
|
231
161
|
specification_version: 4
|
232
162
|
summary: 'RelatonIeee: retrieve IEEE Standards for bibliographic use using the IeeeBibliographicItem
|