relaton-iec 1.7.4 → 1.8.0
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 +46 -0
- data/README.adoc +230 -1
- data/bin/rspec +29 -0
- data/grammars/basicdoc.rng +165 -20
- data/grammars/biblio.rng +4 -6
- data/grammars/iec.rng +92 -1
- data/grammars/isodoc.rng +460 -6
- data/grammars/isostandard.rng +42 -104
- data/grammars/reqt.rng +31 -2
- data/lib/relaton_iec.rb +71 -7
- data/lib/relaton_iec/basic_block/alignment.rb +30 -0
- data/lib/relaton_iec/basic_block/basic_block.rb +15 -0
- data/lib/relaton_iec/basic_block/citation_type.rb +32 -0
- data/lib/relaton_iec/basic_block/dl.rb +60 -0
- data/lib/relaton_iec/basic_block/eref.rb +10 -0
- data/lib/relaton_iec/basic_block/eref_type.rb +39 -0
- data/lib/relaton_iec/basic_block/formula.rb +34 -0
- data/lib/relaton_iec/basic_block/image.rb +41 -0
- data/lib/relaton_iec/basic_block/index.rb +27 -0
- data/lib/relaton_iec/basic_block/index_xref.rb +31 -0
- data/lib/relaton_iec/basic_block/note.rb +21 -0
- data/lib/relaton_iec/basic_block/paragraph.rb +27 -0
- data/lib/relaton_iec/basic_block/paragraph_with_footnote.rb +29 -0
- data/lib/relaton_iec/basic_block/reference_format.rb +38 -0
- data/lib/relaton_iec/basic_block/stem.rb +30 -0
- data/lib/relaton_iec/basic_block/table.rb +115 -0
- data/lib/relaton_iec/basic_block/text_element.rb +27 -0
- data/lib/relaton_iec/hash_converter.rb +1 -1
- data/lib/relaton_iec/hit.rb +4 -0
- data/lib/relaton_iec/hit_collection.rb +31 -12
- data/lib/relaton_iec/iec_bibliographic_item.rb +92 -0
- data/lib/relaton_iec/iec_bibliography.rb +82 -49
- data/lib/relaton_iec/processor.rb +7 -2
- data/lib/relaton_iec/scrapper.rb +12 -40
- data/lib/relaton_iec/statuses.yml +84 -17
- data/lib/relaton_iec/tc_sc_officers_note.rb +24 -0
- data/lib/relaton_iec/version.rb +1 -1
- data/lib/relaton_iec/xml_parser.rb +21 -1
- data/relaton_iec.gemspec +3 -3
- metadata +25 -36
- data/.github/workflows/macos.yml +0 -34
- data/.github/workflows/ubuntu.yml +0 -33
- data/.github/workflows/windows.yml +0 -35
@@ -4,6 +4,9 @@ ACD:
|
|
4
4
|
ACDV:
|
5
5
|
status: Approved for CDV
|
6
6
|
stage: '30.99'
|
7
|
+
ADISSB:
|
8
|
+
status: Preparation of text subcontracted to CO
|
9
|
+
stage: '40.95'
|
7
10
|
ADTR:
|
8
11
|
status: Approved for DTR
|
9
12
|
stage: '40.99'
|
@@ -13,30 +16,39 @@ ADTS:
|
|
13
16
|
AFDIS:
|
14
17
|
status: Approved for FDIS
|
15
18
|
stage: '40.99'
|
19
|
+
AMW:
|
20
|
+
status: Document under revision
|
21
|
+
stage: '92.20'
|
22
|
+
ANW:
|
23
|
+
status: Registration of new project
|
24
|
+
stage: '20.00'
|
16
25
|
APUB:
|
17
26
|
status: Approved for publication
|
18
27
|
stage: '50.99'
|
28
|
+
APUBSB:
|
29
|
+
status: Preparation of text subcontracted to CO
|
30
|
+
stage: '50.95'
|
19
31
|
BPUB:
|
20
32
|
status: Being published
|
21
33
|
stage: '60.00'
|
34
|
+
BWG:
|
35
|
+
status: Return to drafting phase or redefine project
|
36
|
+
stage: '30.92'
|
22
37
|
CAN:
|
23
38
|
status: Draft cancelled
|
24
39
|
stage: '20.98'
|
40
|
+
CCDV:
|
41
|
+
status: Draft circulated as CDV
|
42
|
+
stage: '40.00'
|
25
43
|
CD:
|
26
44
|
status: Draft circulated as CD
|
27
45
|
stage: '30.00'
|
46
|
+
CDISH:
|
47
|
+
status: Draft circulated as DISH
|
48
|
+
stage: '50.20'
|
28
49
|
CDM:
|
29
50
|
status: CD to be discussed at meeting
|
30
51
|
stage: '30.20'
|
31
|
-
CCDV:
|
32
|
-
status: Draft circulated as CDV
|
33
|
-
stage: '40.00'
|
34
|
-
CDVM:
|
35
|
-
status: Rejected CDV to be discussed at a meeting
|
36
|
-
stage: '40.93'
|
37
|
-
CFDIS:
|
38
|
-
status: Draft circulated as FDIS
|
39
|
-
stage: '50.20'
|
40
52
|
CDPAS:
|
41
53
|
status: Draft circulated as DPAS
|
42
54
|
stage: '50.20'
|
@@ -46,12 +58,15 @@ CDTR:
|
|
46
58
|
CDTS:
|
47
59
|
status: Draft circulated as DTS
|
48
60
|
stage: '50.20'
|
49
|
-
|
50
|
-
status: Rejected
|
51
|
-
stage: '
|
52
|
-
|
53
|
-
status:
|
54
|
-
stage: '50.
|
61
|
+
CDVM:
|
62
|
+
status: Rejected CDV to be discussed at a meeting
|
63
|
+
stage: '40.93'
|
64
|
+
CFDIS:
|
65
|
+
status: Draft circulated as FDIS
|
66
|
+
stage: '50.20'
|
67
|
+
DECDISH:
|
68
|
+
status: DISH at editing check
|
69
|
+
stage: '40.99'
|
55
70
|
DECFDIS:
|
56
71
|
status: FDIS at editing check
|
57
72
|
stage: '50.60'
|
@@ -64,6 +79,21 @@ DEL:
|
|
64
79
|
DELPUB:
|
65
80
|
status: Deleted publication
|
66
81
|
stage: '90.99'
|
82
|
+
DREJ:
|
83
|
+
status: Abandon
|
84
|
+
stage: '30.98'
|
85
|
+
DTRM:
|
86
|
+
status: Rejected DTR to be discussed at meeting
|
87
|
+
stage: '50.92'
|
88
|
+
DTSM:
|
89
|
+
status: Rejected DTS to be discussed at meeting
|
90
|
+
stage: '50.92'
|
91
|
+
MERGED:
|
92
|
+
status: Fragment merged
|
93
|
+
stage: '30.97'
|
94
|
+
NADIS:
|
95
|
+
status: Repeat enquiry
|
96
|
+
stage: '40.93'
|
67
97
|
NCDV:
|
68
98
|
status: CDV rejected
|
69
99
|
stage: '40.98'
|
@@ -84,13 +114,16 @@ PNW:
|
|
84
114
|
stage: '10.00'
|
85
115
|
PPUB:
|
86
116
|
status: Publication issued
|
87
|
-
stage: '60.60'
|
117
|
+
stage: '60.60'
|
88
118
|
PRVC:
|
89
119
|
status: Preparation of RVC
|
90
120
|
stage: '40.92'
|
91
121
|
PRVD:
|
92
122
|
status: Preparation of RVD
|
93
123
|
stage: '40.92'
|
124
|
+
PRVDISH:
|
125
|
+
status: Preparation of RVDISH
|
126
|
+
stage: '40.92' # ?
|
94
127
|
PRVDPAS:
|
95
128
|
status: Preparation of RVDPAS
|
96
129
|
stage: '40.92'
|
@@ -106,15 +139,34 @@ PRVN:
|
|
106
139
|
PWI:
|
107
140
|
status: Preliminary work item
|
108
141
|
stage: '00.00'
|
142
|
+
RDIS:
|
143
|
+
status: Registration for formal approval
|
144
|
+
stage: '50.00'
|
145
|
+
RDISH:
|
146
|
+
status: DISH received and registered
|
147
|
+
stage: '50.00'
|
109
148
|
RFDIS:
|
110
149
|
status: FDIS received and registered
|
111
150
|
stage: '50.00'
|
112
151
|
RPUB:
|
113
152
|
status: Publication received and registered
|
114
153
|
stage: '60.60'
|
154
|
+
SPE:
|
155
|
+
stage: SPE # ?
|
156
|
+
SPLIT:
|
157
|
+
status: Project Fragmented
|
158
|
+
stage: SPLIT # ?
|
159
|
+
SRP:
|
160
|
+
stage: SRP
|
161
|
+
SUSPENDED:
|
162
|
+
status: Project Suspended
|
163
|
+
stage: SUSPENDED # ?
|
115
164
|
TCDV:
|
116
165
|
status: Translation of CDV
|
117
166
|
stage: '50.00'
|
167
|
+
TDISH:
|
168
|
+
status: Translation of DISH
|
169
|
+
stage: '50.00' # ?
|
118
170
|
TDTR:
|
119
171
|
status: Translation of DTR
|
120
172
|
stage: '50.00'
|
@@ -129,4 +181,19 @@ TPUB:
|
|
129
181
|
stage: '60.00'
|
130
182
|
WPUB:
|
131
183
|
status: Publication withdrawn
|
132
|
-
stage: '95.99'
|
184
|
+
stage: '95.99'
|
185
|
+
preCD:
|
186
|
+
status: Preparation of CD document
|
187
|
+
stage: preCD
|
188
|
+
preCDPAS:
|
189
|
+
status: Preparation of DPAS
|
190
|
+
stage: preCDPAS
|
191
|
+
preDISH:
|
192
|
+
status: Preparation of DISH
|
193
|
+
stage: preDISH
|
194
|
+
preDTR:
|
195
|
+
status: Preparation of DTR document
|
196
|
+
stage: preDTR
|
197
|
+
prePNW:
|
198
|
+
status: Preparation of NP document
|
199
|
+
stage: prePNW
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module RelatonIec
|
2
|
+
class TcScOfficersNote
|
3
|
+
# @return [Array<RelatonIec::BasicBlock>]
|
4
|
+
attr_reader :basic_blocks
|
5
|
+
|
6
|
+
#
|
7
|
+
# @param [Array<BasicBlock::ParagraphWithFootnote>] basic_blocks
|
8
|
+
#
|
9
|
+
def initialize(basic_blocks)
|
10
|
+
@basic_blocks = basic_blocks
|
11
|
+
end
|
12
|
+
|
13
|
+
#
|
14
|
+
# XML serialization
|
15
|
+
#
|
16
|
+
# @param [Nokogiri::XML::Builder] builder
|
17
|
+
#
|
18
|
+
def to_xml(builder)
|
19
|
+
builder.send "tc-sc-officers-note" do |b|
|
20
|
+
basic_blocks.each { |bb| bb.to_xml b }
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/lib/relaton_iec/version.rb
CHANGED
@@ -1,13 +1,33 @@
|
|
1
1
|
module RelatonIec
|
2
2
|
class XMLParser < RelatonIsoBib::XMLParser
|
3
3
|
class << self
|
4
|
+
# Override RelatonIsoBib::XMLParser.item_data method.
|
5
|
+
# @param isoitem [Nokogiri::XML::Element]
|
6
|
+
# @returtn [Hash]
|
7
|
+
def item_data(isoitem) # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity,Metrics/MethodLength,Metrics/PerceivedComplexity
|
8
|
+
data = super
|
9
|
+
ext = isoitem.at "./ext"
|
10
|
+
return data unless ext
|
11
|
+
|
12
|
+
data[:function] = ext.at("./function")&.text
|
13
|
+
data[:updates_document_type] = ext.at("./updates-document-type")&.text
|
14
|
+
aci = ext.at("./accessibility-color-inside")
|
15
|
+
data[:accessibility_color_inside] = aci.text == "true" if aci
|
16
|
+
data[:price_code] = ext.at("./price-code")&.text
|
17
|
+
cp = ext.at("./cen-processing")
|
18
|
+
data[:cen_processing] = cp.text == "true" if cp
|
19
|
+
data[:secretary] = ext.at("./secretary")&.text
|
20
|
+
data[:interest_to_committees] = ext.at("./interest-to-committees")&.text
|
21
|
+
data
|
22
|
+
end
|
23
|
+
|
4
24
|
private
|
5
25
|
|
6
26
|
# override RelatonIsoBib::IsoBibliographicItem.bib_item method
|
7
27
|
# @param item_hash [Hash]
|
8
28
|
# @return [RelatonIec::IecBibliographicItem]
|
9
29
|
def bib_item(item_hash)
|
10
|
-
IecBibliographicItem.new item_hash
|
30
|
+
IecBibliographicItem.new **item_hash
|
11
31
|
end
|
12
32
|
end
|
13
33
|
end
|
data/relaton_iec.gemspec
CHANGED
@@ -23,17 +23,17 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.require_paths = ["lib"]
|
24
24
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
|
25
25
|
|
26
|
-
spec.add_development_dependency "debase"
|
26
|
+
# spec.add_development_dependency "debase"
|
27
27
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
28
28
|
spec.add_development_dependency "pry-byebug"
|
29
29
|
spec.add_development_dependency "rake", "~> 10.0"
|
30
30
|
spec.add_development_dependency "rspec", "~> 3.0"
|
31
|
-
spec.add_development_dependency "ruby-debug-ide"
|
31
|
+
# spec.add_development_dependency "ruby-debug-ide"
|
32
32
|
spec.add_development_dependency "ruby-jing"
|
33
33
|
spec.add_development_dependency "simplecov"
|
34
34
|
spec.add_development_dependency "vcr"
|
35
35
|
spec.add_development_dependency "webmock"
|
36
36
|
|
37
37
|
spec.add_dependency "addressable"
|
38
|
-
spec.add_dependency "relaton-iso-bib", "~> 1.
|
38
|
+
spec.add_dependency "relaton-iso-bib", "~> 1.8.0"
|
39
39
|
end
|
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-iec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: debase
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: equivalent-xml
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,20 +66,6 @@ dependencies:
|
|
80
66
|
- - "~>"
|
81
67
|
- !ruby/object:Gem::Version
|
82
68
|
version: '3.0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: ruby-debug-ide
|
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
69
|
- !ruby/object:Gem::Dependency
|
98
70
|
name: ruby-jing
|
99
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -170,14 +142,14 @@ dependencies:
|
|
170
142
|
requirements:
|
171
143
|
- - "~>"
|
172
144
|
- !ruby/object:Gem::Version
|
173
|
-
version: 1.
|
145
|
+
version: 1.8.0
|
174
146
|
type: :runtime
|
175
147
|
prerelease: false
|
176
148
|
version_requirements: !ruby/object:Gem::Requirement
|
177
149
|
requirements:
|
178
150
|
- - "~>"
|
179
151
|
- !ruby/object:Gem::Version
|
180
|
-
version: 1.
|
152
|
+
version: 1.8.0
|
181
153
|
description: 'RelatonIec: retrieve IEC Standards for bibliographic use using the IecBibliographicItem
|
182
154
|
model'
|
183
155
|
email:
|
@@ -186,9 +158,7 @@ executables: []
|
|
186
158
|
extensions: []
|
187
159
|
extra_rdoc_files: []
|
188
160
|
files:
|
189
|
-
- ".github/workflows/
|
190
|
-
- ".github/workflows/ubuntu.yml"
|
191
|
-
- ".github/workflows/windows.yml"
|
161
|
+
- ".github/workflows/rake.yml"
|
192
162
|
- ".gitignore"
|
193
163
|
- ".rspec"
|
194
164
|
- ".rubocop.yml"
|
@@ -197,6 +167,7 @@ files:
|
|
197
167
|
- README.adoc
|
198
168
|
- Rakefile
|
199
169
|
- bin/console
|
170
|
+
- bin/rspec
|
200
171
|
- bin/setup
|
201
172
|
- grammars/basicdoc.rng
|
202
173
|
- grammars/biblio.rng
|
@@ -205,6 +176,23 @@ files:
|
|
205
176
|
- grammars/isostandard.rng
|
206
177
|
- grammars/reqt.rng
|
207
178
|
- lib/relaton_iec.rb
|
179
|
+
- lib/relaton_iec/basic_block/alignment.rb
|
180
|
+
- lib/relaton_iec/basic_block/basic_block.rb
|
181
|
+
- lib/relaton_iec/basic_block/citation_type.rb
|
182
|
+
- lib/relaton_iec/basic_block/dl.rb
|
183
|
+
- lib/relaton_iec/basic_block/eref.rb
|
184
|
+
- lib/relaton_iec/basic_block/eref_type.rb
|
185
|
+
- lib/relaton_iec/basic_block/formula.rb
|
186
|
+
- lib/relaton_iec/basic_block/image.rb
|
187
|
+
- lib/relaton_iec/basic_block/index.rb
|
188
|
+
- lib/relaton_iec/basic_block/index_xref.rb
|
189
|
+
- lib/relaton_iec/basic_block/note.rb
|
190
|
+
- lib/relaton_iec/basic_block/paragraph.rb
|
191
|
+
- lib/relaton_iec/basic_block/paragraph_with_footnote.rb
|
192
|
+
- lib/relaton_iec/basic_block/reference_format.rb
|
193
|
+
- lib/relaton_iec/basic_block/stem.rb
|
194
|
+
- lib/relaton_iec/basic_block/table.rb
|
195
|
+
- lib/relaton_iec/basic_block/text_element.rb
|
208
196
|
- lib/relaton_iec/hash_converter.rb
|
209
197
|
- lib/relaton_iec/hit.rb
|
210
198
|
- lib/relaton_iec/hit_collection.rb
|
@@ -213,6 +201,7 @@ files:
|
|
213
201
|
- lib/relaton_iec/processor.rb
|
214
202
|
- lib/relaton_iec/scrapper.rb
|
215
203
|
- lib/relaton_iec/statuses.yml
|
204
|
+
- lib/relaton_iec/tc_sc_officers_note.rb
|
216
205
|
- lib/relaton_iec/version.rb
|
217
206
|
- lib/relaton_iec/xml_parser.rb
|
218
207
|
- relaton_iec.gemspec
|
@@ -235,7 +224,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
235
224
|
- !ruby/object:Gem::Version
|
236
225
|
version: '0'
|
237
226
|
requirements: []
|
238
|
-
rubygems_version: 3.
|
227
|
+
rubygems_version: 3.2.3
|
239
228
|
signing_key:
|
240
229
|
specification_version: 4
|
241
230
|
summary: 'RelatonIec: retrieve IEC Standards for bibliographic use using the IecBibliographicItem
|
data/.github/workflows/macos.yml
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
-
# See https://github.com/metanorma/cimas
|
3
|
-
name: macos
|
4
|
-
|
5
|
-
on:
|
6
|
-
push:
|
7
|
-
branches: [ master ]
|
8
|
-
pull_request:
|
9
|
-
branches: [ '**' ]
|
10
|
-
|
11
|
-
jobs:
|
12
|
-
test-macos:
|
13
|
-
name: Test on Ruby ${{ matrix.ruby }} macOS
|
14
|
-
runs-on: macos-latest
|
15
|
-
strategy:
|
16
|
-
fail-fast: false
|
17
|
-
matrix:
|
18
|
-
ruby: [ '2.6', '2.5', '2.4' ]
|
19
|
-
steps:
|
20
|
-
- uses: actions/checkout@master
|
21
|
-
- name: Use Ruby
|
22
|
-
uses: actions/setup-ruby@v1
|
23
|
-
with:
|
24
|
-
ruby-version: ${{ matrix.ruby }}
|
25
|
-
architecture: 'x64'
|
26
|
-
- name: Update gems
|
27
|
-
run: |
|
28
|
-
sudo gem install bundler --force
|
29
|
-
ruby -v | grep 2.5 && bundle config set build.debase --with-cflags="-Wno-error=implicit-function-declaration"
|
30
|
-
ruby -v | grep 2.5 && bundle config set build.ruby-debug-ide --with-cflags="-Wno-error=implicit-function-declaration"
|
31
|
-
bundle install --jobs 4 --retry 3
|
32
|
-
- name: Run specs
|
33
|
-
run: |
|
34
|
-
bundle exec rake
|
@@ -1,33 +0,0 @@
|
|
1
|
-
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
-
# See https://github.com/metanorma/cimas
|
3
|
-
name: ubuntu
|
4
|
-
|
5
|
-
on:
|
6
|
-
push:
|
7
|
-
branches: [ master ]
|
8
|
-
pull_request:
|
9
|
-
branches: [ '**' ]
|
10
|
-
|
11
|
-
jobs:
|
12
|
-
test-linux:
|
13
|
-
name: Test on Ruby ${{ matrix.ruby }} Ubuntu
|
14
|
-
runs-on: ubuntu-latest
|
15
|
-
strategy:
|
16
|
-
fail-fast: false
|
17
|
-
matrix:
|
18
|
-
ruby: [ '2.6', '2.5', '2.4' ]
|
19
|
-
steps:
|
20
|
-
- uses: actions/checkout@master
|
21
|
-
- name: Use Ruby
|
22
|
-
uses: actions/setup-ruby@v1
|
23
|
-
with:
|
24
|
-
ruby-version: ${{ matrix.ruby }}
|
25
|
-
architecture: 'x64'
|
26
|
-
- name: Update gems
|
27
|
-
run: |
|
28
|
-
gem install bundler
|
29
|
-
bundle install --jobs 4 --retry 3
|
30
|
-
- name: Run specs
|
31
|
-
run: |
|
32
|
-
unset JAVA_TOOL_OPTIONS
|
33
|
-
bundle exec rake
|