relaton-itu 1.3.0 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b7ea346c3346b49aa11d8537809895a14ade4b648f9953371988c705e64c6081
4
- data.tar.gz: 59d9fe418c8e54dd1bc678c42efe35650d1c99ffee0c05211ca4b29931f01c25
3
+ metadata.gz: a90a0ac90df75b22459689d60779ead3ca464ed5a72c8969bed2fec390d89214
4
+ data.tar.gz: 58ad948fd0f85362b7f3c95a26e0dd0ce30a764e73f443232792976e9e5efa79
5
5
  SHA512:
6
- metadata.gz: 258db28aa9f3b4caf297881d47a3fca89e64b82d603712cfeefb450123219337ac59530b251356b87a7c5561fc0df0769ea59bb7e7b2ab894e845df01073bf3a
7
- data.tar.gz: 6d5155965ed3aa9fc63e1feabde2557b171c5826c5078dcd5eee83602f2f5591a82542bf38f88f1418373f8f58691eeb6e9ab1881b1c7c18bebe9a2035ba6c4c
6
+ metadata.gz: e5a1771fd84cb59f5465ff86a6e1b681f1ad43af97ee3f3bd4cb1b164a7c1efcbcea81d1efabbd47b0f0e949b053f4269a00818beb33feda53db5e5401beafd7
7
+ data.tar.gz: 330332c8e964bda7b2ca7678591d628c99925a8650e4854c40994c5c57bfffebe847ebdacd83ac1a8146f250cfeabfd2242f736855ce873a2b49583da33592f4
@@ -26,6 +26,8 @@ jobs:
26
26
  - name: Update gems
27
27
  run: |
28
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"
29
31
  bundle install --jobs 4 --retry 3
30
32
  - name: Run specs
31
33
  run: |
@@ -33,22 +33,13 @@ Or install it yourself as:
33
33
 
34
34
  [source,ruby]
35
35
  ----
36
- require 'relaton_bib'
36
+ require 'relaton_itu'
37
37
 
38
38
  hit_collection = RelatonItu::ItuBibliography.search("ITU-T L.163")
39
- => [<RelatonItu::Hit:0x007fe50780a270 @text="ITU-T L.163" @fetched="false" @fullIdentifier="" @title="ITU-T L.163 (11/2018)">,
40
- <RelatonItu::Hit:0x007fe50780a220 @text="ITU-T L.163" @fetched="false" @fullIdentifier="" @title="ITU-T J.163 (12/2007)">,
41
- <RelatonItu::Hit:0x007fe50780a1d0 @text="ITU-T L.163" @fetched="false" @fullIdentifier="" @title="ITU-T F.163 (08/1992)">,
42
- <RelatonItu::Hit:0x007fe50780a180 @text="ITU-T L.163" @fetched="false" @fullIdentifier="" @title="ITU-T J.163 (11/2005)">,
43
- <RelatonItu::Hit:0x007fe50780a130 @text="ITU-T L.163" @fetched="false" @fullIdentifier="" @title="ITU-T J.163 (03/2004)">,
44
- <RelatonItu::Hit:0x007fe50780a0e0 @text="ITU-T L.163" @fetched="false" @fullIdentifier="" @title="ITU-T Q.163 (11/1988)">,
45
- <RelatonItu::Hit:0x007fe50780a090 @text="ITU-T L.163" @fetched="false" @fullIdentifier="" @title="ITU-T J.163 (03/2001)">,
46
- <RelatonItu::Hit:0x007fe50780a040 @text="ITU-T L.163" @fetched="false" @fullIdentifier="" @title="ITU-T F.163 (07/1996)">,
47
- <RelatonItu::Hit:0x007fe507809ff0 @text="ITU-T L.163" @fetched="false" @fullIdentifier="" @title="ITU-T X.163 (04/1995)">,
48
- <RelatonItu::Hit:0x007fe507809fa0 @text="ITU-T L.163" @fetched="false" @fullIdentifier="" @title="ITU-T O.163 (11/1988)">]
39
+ => <RelatonItu::HitCollection:0x007fbf5fb4ab60 @ref=ITU-T L.163 @fetched=false>
49
40
 
50
41
  item = hit_collection[1].fetch
51
- => #<RelatonItu::ItuBibliographicItem:0x007fe5024f3028
42
+ => #<RelatonItu::ItuBibliographicItem:0x007fbf1fc89548
52
43
  ...
53
44
  ----
54
45
 
@@ -56,73 +47,21 @@ hit_collection = RelatonItu::ItuBibliography.search("ITU-T L.163")
56
47
  [source,ruby]
57
48
  ----
58
49
  item.to_xml
59
- => "<bibitem id="ITU-TJ.163(12/2007)">
50
+ => "<bibitem id="ITU-TL.1470" type="standard">
60
51
  <fetched>2019-06-07</fetched>
61
52
  <title type="title-main" format="text/plain" language="en" script="Latn">ITU-T J.163 (12/2007): Dynamic quality of service for the provision of real-time services over cable television networks using cable modems</title>
62
53
  <title type="main" format="text/plain" language="en" script="Latn">ITU-T J.163 (12/2007): Dynamic quality of service for the provision of real-time services over cable television networks using cable modems</title>
63
54
  <uri type="src">https://www.itu.int/net4/ITU-T/search/api/redirection?dest=http%3A%2F%2Fhandle.itu.int%2F11.1002%2F1000%2F9306-en&amp;position=9&amp;page=1</uri>
64
55
  <uri type="obp">https://www.itu.int/rec/T-REC-J.163-200712-I</uri>
65
56
  <docidentifier type="ITU">ITU-T J.163 (12/2007)</docidentifier>
66
- <date type="published">
67
- <on>2007</on>
68
- </date>
69
- <contributor>
70
- <role type="publisher"/>
71
- <organization>
72
- <name>International Telecommunication Union</name>
73
- <abbreviation>ITU</abbreviation>
74
- <uri>www.itu.int</uri>
75
- </organization>
76
- </contributor>
77
- <edition>4</edition>
78
- <language>en</language>
79
- <script>Latn</script>
80
- <abstract format="text/plain" language="en" script="Latn">ITU-T Recommendation J.163 addresses requirements for a client device to obtain access to network resources. In particular, it specifies a comprehensive mechanism for a client device to request a specific quality of service from the DOCSIS network. Extensive examples illustrate the use of this Recommendation. The scope of this Recommendation is to define the QoS architecture for the "Access" portion of the IPCablecom network, provided to requesting applications on a per-flow basis. The access portion of the network is defined to be between the multimedia terminal adapter (MTA) and the cable modem termination system (CMTS), including the DOCSIS network. The method of QoS allocation over the backbone is unspecified in this Recommendation. Interface to the managed IP backbone and issues related to IP multicast are not within the scope of this Recommendation. This Recommendation also recognizes that per-flow reservations may be required within the customer premises, and the protocol developed addresses this potential need.</abstract>
81
- <status>
82
- <stage>Published</stage>
83
- </status>
84
- <copyright>
85
- <from>2007</from>
86
- <owner>
87
- <organization>
88
- <name>International Telecommunication Union</name>
89
- <abbreviation>ITU</abbreviation>
90
- <uri>www.itu.int</uri>
91
- </organization>
92
- </owner>
93
- </copyright>
94
- <relation type="published">
95
- <bibitem id="JSuppl.1(11/1998)">
96
- <formattedref format="text/plain" language="en" script="Latn">J Suppl. 1 (11/1998)</formattedref>
97
- </bibitem>
98
- </relation>
99
- <relation type="published">
100
- <bibitem id="JSuppl.2(11/1998)">
101
- <formattedref format="text/plain" language="en" script="Latn">J Suppl. 2 (11/1998)</formattedref>
102
- </bibitem>
103
- </relation>
104
- <relation type="published">
105
- <bibitem id="JSuppl.3(11/1998)">
106
- <formattedref format="text/plain" language="en" script="Latn">J Suppl. 3 (11/1998)</formattedref>
107
- </bibitem>
108
- </relation>
109
- <relation type="published">
110
- <bibitem id="JSuppl.5(09/1999)">
111
- <formattedref format="text/plain" language="en" script="Latn">J Suppl. 5 (09/1999)</formattedref>
112
- </bibitem>
113
- </relation>
114
- <relation type="published">
115
- <bibitem id="JSuppl.6(09/2016)">
116
- <formattedref format="text/plain" language="en" script="Latn">J Suppl. 6 (09/2016)</formattedref>
117
- </bibitem>
118
- </relation>
57
+ ...
119
58
  </bibitem>"
120
59
  ----
121
60
  With `bibdata: true` option XML output wrapped with `bibdata` element and `ext` element added.
122
61
  [source,ruby]
123
62
  ----
124
63
  item.to_xml bibdata: true
125
- => "<bibdata>
64
+ => "<bibdata type="standard">
126
65
  <fetched>2019-06-07</fetched>
127
66
  ...
128
67
  <ext>
@@ -142,8 +81,9 @@ item.to_xml bibdata: true
142
81
  [source,ruby]
143
82
  ----
144
83
  RelatonItu::ItuBibliography.get("ITU-T L.163", "2018", {})
145
- fetching ITU-T L.163...
146
- => #<RelatonItu::ItuBibliographicItem:0x007fe502509dc8
84
+ [relaton-itu] ("ITU-T L.163") fetching...
85
+ [relaton-itu] ("ITU-T L.163") found ITU-T L.163
86
+ => #<RelatonItu::ItuBibliographicItem:0x007fbf5f94b9b8
147
87
  ...
148
88
  ----
149
89
 
@@ -43,7 +43,9 @@
43
43
  <define name="xref">
44
44
  <element name="xref">
45
45
  <attribute name="target">
46
- <data type="IDREF"/>
46
+ <data type="string">
47
+ <param name="pattern">\i\c*|\c+#\c+</param>
48
+ </data>
47
49
  </attribute>
48
50
  <optional>
49
51
  <attribute name="type">
@@ -61,6 +63,11 @@
61
63
  </choice>
62
64
  </attribute>
63
65
  </optional>
66
+ <optional>
67
+ <attribute name="droploc">
68
+ <data type="boolean"/>
69
+ </attribute>
70
+ </optional>
64
71
  <text/>
65
72
  </element>
66
73
  </define>
@@ -578,6 +585,8 @@
578
585
  <ref name="ol"/>
579
586
  <ref name="dl"/>
580
587
  <ref name="formula"/>
588
+ <ref name="quote"/>
589
+ <ref name="sourcecode"/>
581
590
  </choice>
582
591
  </oneOrMore>
583
592
  </element>
@@ -661,6 +670,16 @@
661
670
  </choice>
662
671
  </attribute>
663
672
  </optional>
673
+ <optional>
674
+ <attribute name="valign">
675
+ <choice>
676
+ <value>top</value>
677
+ <value>middle</value>
678
+ <value>bottom</value>
679
+ <value>baseline</value>
680
+ </choice>
681
+ </attribute>
682
+ </optional>
664
683
  <choice>
665
684
  <zeroOrMore>
666
685
  <choice>
@@ -697,6 +716,16 @@
697
716
  </choice>
698
717
  </attribute>
699
718
  </optional>
719
+ <optional>
720
+ <attribute name="valign">
721
+ <choice>
722
+ <value>top</value>
723
+ <value>middle</value>
724
+ <value>bottom</value>
725
+ <value>baseline</value>
726
+ </choice>
727
+ </attribute>
728
+ </optional>
700
729
  <choice>
701
730
  <zeroOrMore>
702
731
  <choice>
@@ -834,6 +863,13 @@
834
863
  </define>
835
864
  <define name="standard-document">
836
865
  <element name="standard-document">
866
+ <attribute name="version"/>
867
+ <attribute name="type">
868
+ <choice>
869
+ <value>semantic</value>
870
+ <value>presentation</value>
871
+ </choice>
872
+ </attribute>
837
873
  <ref name="bibdata"/>
838
874
  <optional>
839
875
  <ref name="boilerplate"/>
@@ -855,7 +891,7 @@
855
891
  <oneOrMore>
856
892
  <choice>
857
893
  <ref name="content"/>
858
- <ref name="preface_abstract"/>
894
+ <ref name="abstract"/>
859
895
  <ref name="foreword"/>
860
896
  <ref name="introduction"/>
861
897
  <ref name="acknowledgements"/>
@@ -922,6 +958,9 @@
922
958
  <optional>
923
959
  <attribute name="script"/>
924
960
  </optional>
961
+ <optional>
962
+ <attribute name="type"/>
963
+ </optional>
925
964
  <optional>
926
965
  <attribute name="obligation">
927
966
  <choice>
@@ -961,9 +1000,6 @@
961
1000
  </define>
962
1001
  <define name="content-subsection">
963
1002
  <element name="clause">
964
- <optional>
965
- <attribute name="type"/>
966
- </optional>
967
1003
  <ref name="Content-Section"/>
968
1004
  </element>
969
1005
  </define>
@@ -992,6 +1028,9 @@
992
1028
  </choice>
993
1029
  </attribute>
994
1030
  </optional>
1031
+ <optional>
1032
+ <attribute name="type"/>
1033
+ </optional>
995
1034
  <optional>
996
1035
  <ref name="section-title"/>
997
1036
  </optional>
@@ -1011,9 +1050,6 @@
1011
1050
  </define>
1012
1051
  <define name="clause">
1013
1052
  <element name="clause">
1014
- <optional>
1015
- <attribute name="type"/>
1016
- </optional>
1017
1053
  <ref name="Clause-Section"/>
1018
1054
  </element>
1019
1055
  </define>
@@ -1042,18 +1078,24 @@
1042
1078
  </choice>
1043
1079
  </attribute>
1044
1080
  </optional>
1081
+ <optional>
1082
+ <attribute name="type"/>
1083
+ </optional>
1045
1084
  <optional>
1046
1085
  <ref name="section-title"/>
1047
1086
  </optional>
1048
1087
  <group>
1049
- <group>
1050
- <zeroOrMore>
1051
- <ref name="BasicBlock"/>
1052
- </zeroOrMore>
1053
- <zeroOrMore>
1054
- <ref name="note"/>
1055
- </zeroOrMore>
1056
- </group>
1088
+ <choice>
1089
+ <group>
1090
+ <zeroOrMore>
1091
+ <ref name="BasicBlock"/>
1092
+ </zeroOrMore>
1093
+ <zeroOrMore>
1094
+ <ref name="note"/>
1095
+ </zeroOrMore>
1096
+ </group>
1097
+ <ref name="amend"/>
1098
+ </choice>
1057
1099
  <zeroOrMore>
1058
1100
  <choice>
1059
1101
  <ref name="clause-subsection"/>
@@ -1180,6 +1222,9 @@
1180
1222
  <optional>
1181
1223
  <attribute name="script"/>
1182
1224
  </optional>
1225
+ <optional>
1226
+ <attribute name="type"/>
1227
+ </optional>
1183
1228
  <optional>
1184
1229
  <attribute name="obligation">
1185
1230
  <choice>
@@ -1447,11 +1492,6 @@
1447
1492
  </optional>
1448
1493
  </element>
1449
1494
  </define>
1450
- <define name="preface_abstract">
1451
- <element name="abstract">
1452
- <ref name="Basic-Section"/>
1453
- </element>
1454
- </define>
1455
1495
  <define name="term-clause">
1456
1496
  <element name="clause">
1457
1497
  <optional>
@@ -1501,4 +1541,79 @@
1501
1541
  <ref name="CitationType"/>
1502
1542
  </element>
1503
1543
  </define>
1544
+ <define name="amend">
1545
+ <element name="amend">
1546
+ <optional>
1547
+ <attribute name="id">
1548
+ <data type="ID"/>
1549
+ </attribute>
1550
+ </optional>
1551
+ <attribute name="change">
1552
+ <choice>
1553
+ <value>add</value>
1554
+ <value>modify</value>
1555
+ <value>delete</value>
1556
+ </choice>
1557
+ </attribute>
1558
+ <optional>
1559
+ <attribute name="path"/>
1560
+ </optional>
1561
+ <optional>
1562
+ <attribute name="path_end"/>
1563
+ </optional>
1564
+ <optional>
1565
+ <attribute name="title"/>
1566
+ </optional>
1567
+ <optional>
1568
+ <element name="location">
1569
+ <zeroOrMore>
1570
+ <ref name="locality"/>
1571
+ </zeroOrMore>
1572
+ </element>
1573
+ </optional>
1574
+ <zeroOrMore>
1575
+ <ref name="autonumber"/>
1576
+ </zeroOrMore>
1577
+ <optional>
1578
+ <element name="description">
1579
+ <zeroOrMore>
1580
+ <ref name="BasicBlock"/>
1581
+ </zeroOrMore>
1582
+ </element>
1583
+ </optional>
1584
+ <optional>
1585
+ <element name="newcontent">
1586
+ <zeroOrMore>
1587
+ <ref name="BasicBlock"/>
1588
+ </zeroOrMore>
1589
+ </element>
1590
+ </optional>
1591
+ <optional>
1592
+ <element name="description">
1593
+ <zeroOrMore>
1594
+ <ref name="BasicBlock"/>
1595
+ </zeroOrMore>
1596
+ </element>
1597
+ </optional>
1598
+ </element>
1599
+ </define>
1600
+ <define name="autonumber">
1601
+ <element name="autonumber">
1602
+ <attribute name="type">
1603
+ <choice>
1604
+ <value>requirement</value>
1605
+ <value>recommendation</value>
1606
+ <value>permission</value>
1607
+ <value>table</value>
1608
+ <value>figure</value>
1609
+ <value>admonition</value>
1610
+ <value>formula</value>
1611
+ <value>sourcecode</value>
1612
+ <value>example</value>
1613
+ <value>note</value>
1614
+ </choice>
1615
+ </attribute>
1616
+ <text/>
1617
+ </element>
1618
+ </define>
1504
1619
  </grammar>
@@ -68,6 +68,16 @@
68
68
  <text/>
69
69
  </element>
70
70
  </optional>
71
+ <optional>
72
+ <element name="amendment">
73
+ <data type="int"/>
74
+ </element>
75
+ </optional>
76
+ <optional>
77
+ <element name="corrigendum">
78
+ <data type="int"/>
79
+ </element>
80
+ </optional>
71
81
  </element>
72
82
  </define>
73
83
  <define name="BibDataExtensionType">
@@ -84,6 +94,18 @@
84
94
  <optional>
85
95
  <ref name="ipnoticereceived"/>
86
96
  </optional>
97
+ <optional>
98
+ <ref name="meeting"/>
99
+ </optional>
100
+ <optional>
101
+ <ref name="meeting-date"/>
102
+ </optional>
103
+ <optional>
104
+ <ref name="intended-type"/>
105
+ </optional>
106
+ <optional>
107
+ <ref name="ext_source"/>
108
+ </optional>
87
109
  <optional>
88
110
  <ref name="structuredidentifier"/>
89
111
  </optional>
@@ -103,6 +125,44 @@
103
125
  </element>
104
126
  </define>
105
127
  </include>
128
+ <define name="meeting">
129
+ <element name="meeting">
130
+ <text/>
131
+ </element>
132
+ </define>
133
+ <define name="meeting-date">
134
+ <element name="meeting-date">
135
+ <choice>
136
+ <group>
137
+ <element name="from">
138
+ <ref name="ISO8601Date"/>
139
+ </element>
140
+ <optional>
141
+ <element name="to">
142
+ <ref name="ISO8601Date"/>
143
+ </element>
144
+ </optional>
145
+ </group>
146
+ <element name="on">
147
+ <ref name="ISO8601Date"/>
148
+ </element>
149
+ </choice>
150
+ </element>
151
+ </define>
152
+ <define name="intended-type">
153
+ <element name="intended-type">
154
+ <choice>
155
+ <value>R</value>
156
+ <value>C</value>
157
+ <value>TD</value>
158
+ </choice>
159
+ </element>
160
+ </define>
161
+ <define name="ext_source">
162
+ <element name="source">
163
+ <text/>
164
+ </element>
165
+ </define>
106
166
  <define name="TextElement" combine="choice">
107
167
  <choice>
108
168
  <ref name="add"/>
@@ -244,6 +304,13 @@
244
304
  </define>
245
305
  <define name="itu">
246
306
  <element name="itu-standard">
307
+ <attribute name="version"/>
308
+ <attribute name="type">
309
+ <choice>
310
+ <value>semantic</value>
311
+ <value>presentation</value>
312
+ </choice>
313
+ </attribute>
247
314
  <ref name="bibdata"/>
248
315
  <zeroOrMore>
249
316
  <ref name="termdocsource"/>
@@ -25,6 +25,11 @@ module RelatonItu
25
25
  @workgroup = workgroup.is_a?(Hash) ? ItuGroup.new(workgroup) : workgroup
26
26
  end
27
27
 
28
+ # @return [true]
29
+ def presence?
30
+ true
31
+ end
32
+
28
33
  # @param builder [Nokogiri::XML::Builder]
29
34
  def to_xml(builder) # rubocop:disable Metrics/AbcSize
30
35
  builder.editorialgroup do
@@ -29,7 +29,7 @@ module RelatonItu
29
29
 
30
30
  # @return [String]
31
31
  def group
32
- @group ||= if %r{(OB|Operational Bulletin) No} =~ text then "Publications"
32
+ @group ||= if %r{OB|Operational Bulletin}.match? text then "Publications"
33
33
  else "Recommendations"
34
34
  end
35
35
  end
@@ -1,3 +1,3 @@
1
1
  module RelatonItu
2
- VERSION = "1.3.0".freeze
2
+ VERSION = "1.6.0".freeze
3
3
  end
@@ -37,5 +37,5 @@ Gem::Specification.new do |spec|
37
37
  spec.add_development_dependency "vcr", "~> 5.0.0"
38
38
  spec.add_development_dependency "webmock"
39
39
 
40
- spec.add_dependency "relaton-bib", "~> 1.3.0"
40
+ spec.add_dependency "relaton-bib", "~> 1.6.pre"
41
41
  end
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: 1.3.0
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-20 00:00:00.000000000 Z
11
+ date: 2020-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: debase
@@ -156,14 +156,14 @@ dependencies:
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: 1.3.0
159
+ version: 1.6.pre
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: 1.3.0
166
+ version: 1.6.pre
167
167
  description: 'RelatonItu: retrieve ITU Standards for bibliographic use using the BibliographicItem
168
168
  model'
169
169
  email:
@@ -207,7 +207,7 @@ homepage: https://github.com/metanorma/relaton-itu
207
207
  licenses:
208
208
  - MIT
209
209
  metadata: {}
210
- post_install_message:
210
+ post_install_message:
211
211
  rdoc_options: []
212
212
  require_paths:
213
213
  - lib
@@ -223,7 +223,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
223
223
  version: '0'
224
224
  requirements: []
225
225
  rubygems_version: 3.0.6
226
- signing_key:
226
+ signing_key:
227
227
  specification_version: 4
228
228
  summary: 'RelatonItu: retrieve ITU Standards for bibliographic use using the BibliographicItem
229
229
  model'