relaton-iec 1.20.2 → 2.0.0.pre.alpha.1

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.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/release.yml +0 -3
  3. data/.gitignore +1 -0
  4. data/.rubocop.yml +1 -1
  5. data/README.adoc +97 -79
  6. data/grammars/basicdoc.rng +1559 -671
  7. data/grammars/biblio-standoc.rng +107 -46
  8. data/grammars/biblio.rng +1010 -375
  9. data/grammars/relaton-iec.rng +60 -121
  10. data/lib/relaton/iec/bibliography.rb +225 -0
  11. data/lib/relaton/iec/data_fetcher.rb +214 -0
  12. data/lib/relaton/iec/data_parser.rb +328 -0
  13. data/lib/relaton/iec/hit.rb +26 -0
  14. data/lib/relaton/iec/hit_collection.rb +96 -0
  15. data/lib/relaton/iec/item_data.rb +7 -0
  16. data/lib/relaton/iec/model/bibdata.rb +7 -0
  17. data/lib/relaton/iec/model/bibitem.rb +7 -0
  18. data/lib/relaton/iec/model/docidentifier.rb +40 -0
  19. data/lib/relaton/iec/model/doctype.rb +12 -0
  20. data/lib/relaton/iec/model/ext.rb +50 -0
  21. data/lib/relaton/iec/model/item.rb +24 -0
  22. data/lib/relaton/iec/model/item_base.rb +9 -0
  23. data/lib/relaton/iec/model/relation.rb +7 -0
  24. data/lib/relaton/iec/model/stage_name.rb +13 -0
  25. data/lib/relaton/iec/processor.rb +72 -0
  26. data/lib/relaton/iec/util.rb +8 -0
  27. data/lib/relaton/iec/version.rb +5 -0
  28. data/lib/relaton/iec.rb +98 -0
  29. data/relaton_iec.gemspec +9 -9
  30. metadata +38 -56
  31. data/CLAUDE.md +0 -73
  32. data/lib/relaton_iec/basic_block/alignment.rb +0 -29
  33. data/lib/relaton_iec/basic_block/basic_block.rb +0 -15
  34. data/lib/relaton_iec/basic_block/citation_type.rb +0 -32
  35. data/lib/relaton_iec/basic_block/dl.rb +0 -60
  36. data/lib/relaton_iec/basic_block/eref.rb +0 -10
  37. data/lib/relaton_iec/basic_block/eref_type.rb +0 -39
  38. data/lib/relaton_iec/basic_block/formula.rb +0 -34
  39. data/lib/relaton_iec/basic_block/image.rb +0 -40
  40. data/lib/relaton_iec/basic_block/index.rb +0 -27
  41. data/lib/relaton_iec/basic_block/index_xref.rb +0 -31
  42. data/lib/relaton_iec/basic_block/note.rb +0 -21
  43. data/lib/relaton_iec/basic_block/paragraph.rb +0 -27
  44. data/lib/relaton_iec/basic_block/paragraph_with_footnote.rb +0 -29
  45. data/lib/relaton_iec/basic_block/reference_format.rb +0 -38
  46. data/lib/relaton_iec/basic_block/stem.rb +0 -29
  47. data/lib/relaton_iec/basic_block/table.rb +0 -115
  48. data/lib/relaton_iec/basic_block/text_element.rb +0 -26
  49. data/lib/relaton_iec/data_fetcher.rb +0 -211
  50. data/lib/relaton_iec/data_parser.rb +0 -294
  51. data/lib/relaton_iec/document_identifier.rb +0 -34
  52. data/lib/relaton_iec/document_type.rb +0 -20
  53. data/lib/relaton_iec/hash_converter.rb +0 -42
  54. data/lib/relaton_iec/hit.rb +0 -34
  55. data/lib/relaton_iec/hit_collection.rb +0 -76
  56. data/lib/relaton_iec/iec_bibliographic_item.rb +0 -125
  57. data/lib/relaton_iec/iec_bibliography.rb +0 -153
  58. data/lib/relaton_iec/index.rb +0 -135
  59. data/lib/relaton_iec/processor.rb +0 -64
  60. data/lib/relaton_iec/tc_sc_officers_note.rb +0 -24
  61. data/lib/relaton_iec/util.rb +0 -6
  62. data/lib/relaton_iec/version.rb +0 -3
  63. data/lib/relaton_iec/xml_parser.rb +0 -37
  64. data/lib/relaton_iec.rb +0 -98
  65. /data/lib/{relaton_iec → relaton/iec}/statuses.yml +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e8c8daf48df03654e3d32a4ee6dd3a89711a560dbc9a101ebda7e041d5df7fbd
4
- data.tar.gz: 20e40eaca8e62cf94e69b31d07b0be253945eac0448f2bd718f02ecae79c33a4
3
+ metadata.gz: eb18536c08a3cfa37917813b0505c3d35dd78195ff3c4179e459025cc3403551
4
+ data.tar.gz: 808fedfdaa1def6f060bd83353747d3e3f3d77246b7755ca3e55686f99b6f127
5
5
  SHA512:
6
- metadata.gz: 1b9d708e65bd120bcb1c793e65276c8b9a53f739f14d121893db43525a2a8aa26acf5ab42191b3d93e88b9760a457ac34f804a5dd126f66639af930e8d33c1d7
7
- data.tar.gz: 065710bd905145296a60b99835d63f6abcf621099d84faa33f204b9471a2b2b0020e55d4fe90caad6e284bc33a4caea69b7047a7bebc2c5178c1fe7b6e03db62
6
+ metadata.gz: 7c1d60f01ac5cb66618d17d472e80d2bc8845b62ff28a5fb8b9f872cbae548eed38ce1c9e6bd9bbdedb84a94184958a91e6efd29e6a8b17cac18c04002bd81a3
7
+ data.tar.gz: f5387a30e591ca09cb4a5ebe5d4a231024a55f9b53b620a303ab3f49341f0c727e57ea3d2046cf829195f94ea9b2d4061f81ba734e5e013ad9b97402124620b0
@@ -14,9 +14,6 @@ on:
14
14
  repository_dispatch:
15
15
  types: [ do-release ]
16
16
 
17
- permissions:
18
- id-token: write
19
- contents: write
20
17
 
21
18
  jobs:
22
19
  release:
data/.gitignore CHANGED
@@ -13,3 +13,4 @@
13
13
  # rspec failure tracking
14
14
  .rspec_status
15
15
  Gemfile.lock
16
+ .claude/
data/.rubocop.yml CHANGED
@@ -7,6 +7,6 @@ require: rubocop-rails
7
7
  inherit_from:
8
8
  - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
9
9
  AllCops:
10
- TargetRubyVersion: 2.7
10
+ TargetRubyVersion: 3.2
11
11
  Rails:
12
12
  Enabled: false
data/README.adoc CHANGED
@@ -1,4 +1,4 @@
1
- = RelatonIec: retrieve IEC Standards for bibliographic use using the BibliographicItem model
1
+ = Relaton::Iec: retrieve IEC Standards for bibliographic use using the BibliographicItem model
2
2
 
3
3
  image:https://img.shields.io/gem/v/relaton-iec.svg["Gem Version", link="https://rubygems.org/gems/relaton-iec"]
4
4
  image:https://github.com/relaton/relaton-iec/workflows/macos/badge.svg["Build Status (macOS)", link="https://github.com/relaton/relaton-iec/actions?workflow=macos"]
@@ -8,9 +8,9 @@ image:https://codeclimate.com/github/relaton/relaton-iec/badges/gpa.svg["Code Cl
8
8
  image:https://img.shields.io/github/issues-pr-raw/relaton/relaton-iec.svg["Pull Requests", link="https://github.com/relaton/relaton-iec/pulls"]
9
9
  image:https://img.shields.io/github/commits-since/relaton/relaton-iec/latest.svg["Commits since latest",link="https://github.com/relaton/relaton-iec/releases"]
10
10
 
11
- RelatonIec is a Ruby gem that implements the https://github.com/metanorma/metanorma-model-iso#iso-bibliographic-item[IsoBibliographicItem model].
11
+ Relaton:Iec is a Ruby gem that implements the https://github.com/metanorma/metanorma-model-iso#iso-bibliographic-item[IsoBibliographicItem model].
12
12
 
13
- You can use it to retrieve metadata of IEC Standards from https://www.iec.ch, and access such metadata through the `IecBibliographicItem` object.
13
+ You can use it to retrieve metadata of IEC Standards from https://www.iec.ch, and access such metadata through the `Relaton::Iec::ItemData` object.
14
14
 
15
15
  == Installation
16
16
 
@@ -33,43 +33,45 @@ Or install it yourself as:
33
33
 
34
34
  === Search for a standard using keywords
35
35
 
36
- `RelatonIec::IecBibliography.search(ref, year)` method returns hits collection. Each hit can be used to fetch a document.
36
+ `Relaton::Iec::Bibliography.search(ref, year)` method returns hits collection. Each hit can be used to fetch a document.
37
37
 
38
38
  - `ref` - a reference to search document
39
39
  - `year` - filter by year (optional)
40
40
 
41
41
  [source,ruby]
42
42
  ----
43
- require 'relaton_iec'
43
+ require 'relaton/iec'
44
44
  => true
45
45
 
46
- hit_collection = RelatonIec::IecBibliography.search("60050")
47
- => <RelatonIec::HitCollection:0x007fe0d7126f28 @ref=60050 @fetched=false>
46
+ hit_collection = Relaton::Iec::Bibliography.search("IEC 60050")
47
+ => <Relaton::Iec::HitCollection:0x00000000005650 @ref=IEC 60050 @fetched=false>
48
48
 
49
49
  hit_collection.first
50
- => <RelatonIec::Hit:0x000000000003e8 @text="60050" @fetched="false" @fullIdentifier="" @title="IEC 60050-05:1935">
50
+ => <Relaton::Iec::Hit:0x00000000006260 @reference="IEC 60050" @fetched="false" @docidentifier="IEC 60050-05:1935">
51
51
 
52
- item = hit_collection[2].fetch
53
- => #<RelatonIec::IecBibliographicItem:0x007fe1171a06f8
52
+ item = hit_collection[2].item
53
+ => #<Relaton::Iec::ItemData:0x000000012cbc72a8
54
54
  ...
55
55
 
56
- item.docidentifier
57
- => [#<RelatonBib::DocumentIdentifier:0x00007ff1b52a2b60 @id="IEC 60050-07:1956", @language=nil, @primary=true, @scope=nil, @script=nil, @type="IEC">,
58
- #<RelatonBib::DocumentIdentifier:0x00007ff1b52a2a98
59
- @id="urn:iec:std:iec:60050-07:1956-01:::",
60
- @language=nil,
61
- @primary=nil,
62
- @scope=nil,
63
- @script=nil,
64
- @type="URN">]
65
-
66
- item.docidentifier.detect { |di| di.type == "URN" }.id
56
+ item.docidentifier[0].type
57
+ => "IEC"
58
+
59
+ item.docidentifier[0].primary
60
+ => true
61
+
62
+ item.docidentifier[0].content
63
+ => "IEC 60050-07:1956"
64
+
65
+ item.docidentifier[1].type
66
+ => "URN"
67
+
68
+ item.docidentifier[1].content
67
69
  => "urn:iec:std:iec:60050-07:1956-01:::"
68
70
  ----
69
71
 
70
72
  === Fetch document by keywords
71
73
 
72
- `RelatonIec::IecBibliography.get(ref, year, opts)` method returns the document.
74
+ `Relaton::Iec::Bibliography.get(ref, year, opts)` method returns the document.
73
75
 
74
76
  - `ref` - a reference to search document
75
77
  - `year` - filter by year (optional)
@@ -77,28 +79,28 @@ item.docidentifier.detect { |di| di.type == "URN" }.id
77
79
 
78
80
  [source,ruby]
79
81
  ----
80
- item = RelatonIec::IecBibliography.get("IEC 60050-112:2010")
81
- [relaton-iec] (IEC 60050-112:2010) Fetching from Relaton repository ...
82
- [relaton-iec] (IEC 60050-112:2010) Found: `IEC 60050-112:2010`
83
- => #<RelatonIec::IecBibliographicItem:0x00007f876525e8d0
82
+ item = Relaton::Iec::Bibliography.get("IEC 60050-112:2010")
83
+ [relaton-iec] INFO: (IEC 60050-112:2010) Fetching from Relaton repsitory ...
84
+ [relaton-iec] INFO: (IEC 60050-112:2010) Found: `IEC 60050-112:2010`
85
+ => #<Relaton::Iec::ItemData:0x000000012e5c6410
84
86
  ...
85
87
 
86
- item = RelatonIec::IecBibliography.get("IEC 60050-112", "2010", all_parts: true)
87
- [relaton-iec] (IEC 60050-112) Fetching from Relaton repository ...
88
- [relaton-iec] (IEC 60050-112) Found: `IEC 60050 (all parts)`
89
- => #<RelatonIec::IecBibliographicItem:0x00007f87851888f0
88
+ item = Relaton::Iec::Bibliography.get("IEC 60050-112", "2010", all_parts: true)
89
+ [relaton-iec] INFO: (IEC 60050-112:2010) Fetching from Relaton repsitory ...
90
+ [relaton-iec] INFO: (IEC 60050-112:2010) Found: `IEC 60050 (all parts)`
91
+ => #<Relaton::Iec::ItemData:0x000000012e1ebb88
90
92
  ...
91
93
 
92
- item.docidentifier.first
93
- => #<RelatonBib::DocumentIdentifier:0x00007f878518eea8 @id="IEC 60050 (all parts)", @language=nil, @primary=true, @scope=nil, @script=nil, @type="IEC">
94
+ item.docidentifier.first.content
95
+ => "IEC 60050 (all parts)"
94
96
 
95
- item = RelatonIec::IecBibliography.get("IEC 60050-112", "2010")
96
- [relaton-iec] (IEC 60050-112) Fetching from Relaton repository ...
97
- [relaton-iec] (IEC 60050-112) Found: `IEC 60050-112:2010`
98
- => #<RelatonIec::IecBibliographicItem:0x007fa69f296da8
97
+ item = Relaton::Iec::Bibliography.get("IEC 60050-112", "2010")
98
+ [relaton-iec] INFO: (IEC 60050-112:2010) Fetching from Relaton repsitory ...
99
+ [relaton-iec] INFO: (IEC 60050-112:2010) Found: `IEC 60050-112:2010`
100
+ => #<Relaton::Iec::ItemData:0x000000012f0c6b80
99
101
 
100
- item.docidentifier.first
101
- => #<RelatonBib::DocumentIdentifier:0x00007f876530c2c8 @id="IEC 60050-112:2010", @language=nil, @primary=true, @scope=nil, @script=nil, @type="IEC">
102
+ item.docidentifier.first.content
103
+ => "IEC 60050-112:2010"
102
104
  ----
103
105
 
104
106
  === Search for ISO/IEC Directives
@@ -120,23 +122,40 @@ Possible options:
120
122
  [source,ruby]
121
123
  ----
122
124
  item.to_xml
123
- => "<bibitem id="IEC60050-112-2010" type="standard" schema-version="v1.2.1">
124
- <fetched>2023-03-01</fetched>
125
- <title type="main" format="text/plain" language="en" script="Latn">International Electrotechnical Vocabulary (IEV) - Part 112: Quantities and units</title>
126
- <title type="main" format="text/plain" language="fr" script="Latn">Vocabulaire Electrotechnique International (IEV) - Partie 112: Grandeurs et unités</title>
127
- <title type="main" format="text/plain" language="es" script="Latn">Versión Oficial En español - Vocabulario Electrotécnico Internacional. Parte 112: Magnitudes y unidades.</title>
125
+ => "<bibitem id="IEC600501122010" type="standard" schema-version="v1.4.1">
126
+ <fetched>2026-02-02</fetched>
127
+ <title language="en" script="Latn" type="title-main">International Electrotechnical Vocabulary (IEV)</title>
128
+ <title language="en" script="Latn" type="title-part">Part 112: Quantities and units</title>
129
+ <title language="en" script="Latn" type="main">International Electrotechnical Vocabulary (IEV) - Part 112: Quantities and units</title>
130
+ <title language="fr" script="Latn" type="title-main">Vocabulaire Electrotechnique International (IEV)</title>
131
+ <title language="fr" script="Latn" type="title-part">Partie 112: Grandeurs et unités</title>
132
+ <title language="fr" script="Latn" type="main">Vocabulaire Electrotechnique International (IEV) - Partie 112: Grandeurs et unités</title>
133
+ <title language="es" script="Latn" type="title-intro">Versión Oficial En español</title>
134
+ <title language="es" script="Latn" type="title-main">Vocabulario Electrotécnico Internacional. Parte 112: Magnitudes y unidades.</title>
135
+ <title language="es" script="Latn" type="main">Versión Oficial En español - Vocabulario Electrotécnico Internacional. Parte 112: Magnitudes y unidades.</title>
128
136
  <uri type="src">https://webstore.iec.ch/publication/162</uri>
137
+ <uri type="obp">https://webstore.iec.ch/preview/info_iec60050-112{ed1.0}b.pdf</uri>
138
+ <docidentifier type="IEC" primary="true">IEC 60050-112:2010</docidentifier>
139
+ <docidentifier type="URN">urn:iec:std:iec:60050-112:2010-01:::</docidentifier>
129
140
  ...
130
141
  </bibitem>"
131
142
 
132
143
  item.to_xml bibdata: true
133
- => "<bibdata type="standard" schema-version="v1.2.1">
134
- <fetched>2023-03-01</fetched>
135
- <title type="main" format="text/plain" language="en" script="Latn">International Electrotechnical Vocabulary (IEV) - Part 112: Quantities and units</title>
136
- <title type="main" format="text/plain" language="fr" script="Latn">Vocabulaire Electrotechnique International (IEV) - Partie 112: Grandeurs et unités</title>
137
- <title type="main" format="text/plain" language="es" script="Latn">Versión Oficial En español - Vocabulario Electrotécnico Internacional. Parte 112: Magnitudes y unidades.</title>
144
+ => "<bibdata type="standard" schema-version="v1.4.1">
145
+ <fetched>2026-02-02</fetched>
146
+ <title language="en" script="Latn" type="title-main">International Electrotechnical Vocabulary (IEV)</title>
147
+ <title language="en" script="Latn" type="title-part">Part 112: Quantities and units</title>
148
+ <title language="en" script="Latn" type="main">International Electrotechnical Vocabulary (IEV) - Part 112: Quantities and units</title>
149
+ <title language="fr" script="Latn" type="title-main">Vocabulaire Electrotechnique International (IEV)</title>
150
+ <title language="fr" script="Latn" type="title-part">Partie 112: Grandeurs et unités</title>
151
+ <title language="fr" script="Latn" type="main">Vocabulaire Electrotechnique International (IEV) - Partie 112: Grandeurs et unités</title>
152
+ <title language="es" script="Latn" type="title-intro">Versión Oficial En español</title>
153
+ <title language="es" script="Latn" type="title-main">Vocabulario Electrotécnico Internacional. Parte 112: Magnitudes y unidades.</title>
154
+ <title language="es" script="Latn" type="main">Versión Oficial En español - Vocabulario Electrotécnico Internacional. Parte 112: Magnitudes y unidades.</title>
138
155
  <uri type="src">https://webstore.iec.ch/publication/162</uri>
139
156
  <uri type="obp">https://webstore.iec.ch/preview/info_iec60050-112{ed1.0}b.pdf</uri>
157
+ <docidentifier type="IEC" primary="true">IEC 60050-112:2010</docidentifier>
158
+ <docidentifier type="URN">urn:iec:std:iec:60050-112:2010-01:::</docidentifier>
140
159
  ...
141
160
  <ext schema-version="v1.0.0">
142
161
  <doctype>international-standard</doctype>
@@ -144,44 +163,43 @@ item.to_xml bibdata: true
144
163
  </ext>
145
164
  </bibdata>"
146
165
 
147
- item.to_xml note: [{ text: "Note", type: "note" }]
148
- => "<bibitem id="IEC60050-112-2010" type="standard" schema-version="v1.2.1">
166
+ item.to_xml note: [{ content: "Note", type: "note" }]
167
+ => "<bibitem id="IEC600501122010" type="standard" schema-version="v1.4.1">
149
168
  ...
150
- <note format="text/plain" type="note">Note</note>
169
+ <note type="note">Note</note>
151
170
  ...
152
171
  </bibitem>"
153
172
  ----
154
173
 
155
- === Typed links
174
+ === Typed source links
156
175
 
157
- Each IEC document has `src` type link and optional `obp` type link.
176
+ Each IEC document has `src` type link source and optional `obp` type link source.
158
177
 
159
178
  [source,ruby]
160
179
  ----
161
- item.link
162
- => [#<RelatonBib::TypedUri:0x00007ff1d50e9e20
163
- @content=#<Addressable::URI:0x2260 URI:https://webstore.iec.ch/publication/162>,
164
- @language=nil,
165
- @script=nil,
166
- @type="src">,
167
- #<RelatonBib::TypedUri:0x00007ff1d50e9498
168
- @content=#<Addressable::URI:0x2274 URI:https://webstore.iec.ch/preview/info_iec60050-112{ed1.0}b.pdf>,
169
- @language=nil,
170
- @script=nil,
171
- @type="obp">]
180
+ item.source[0].type
181
+ => "src"
182
+
183
+ item.source[0].content
184
+ => "https://webstore.iec.ch/publication/162"
185
+
186
+ item.source[1].type
187
+ => "obp"
188
+
189
+ item.source[1].content
190
+ => "https://webstore.iec.ch/preview/info_iec60050-112{ed1.0}b.pdf"
172
191
  ----
173
192
 
174
- === Create bibliographic item from Hash
193
+ === Create bibliographic item from XML or YAML
175
194
 
176
195
  [source,ruby]
177
196
  ----
178
- hash = YAML.load_file "spec/examples/hit.yaml"
179
- => {"schema-version"=>"v1.2.1",
180
- "id"=>"IEC61058-2-4-1995+AMD1-2003CSV",
197
+ Relaton::Iec::Item.from_xml File.read("spec/fixtures/bibitem.xml")
198
+ => #<Relaton::Iec::ItemData:0x000000012e5c9d90
181
199
  ...
182
200
 
183
- RelatonIec::IecBibliographicItem.from_hash hash
184
- => #<RelatonIec::IecBibliographicItem:0x00007fe16f032d40
201
+ Relaton::Iec::Item.from_yaml File.read("spec/fixtures/item.yaml")
202
+ => #<Relaton::Iec::ItemData:0x000000012f282460
185
203
  ...
186
204
  ----
187
205
 
@@ -213,28 +231,28 @@ URN structure: +
213
231
 
214
232
  For more information see https://github.com/relaton/relaton-iec/issues/22
215
233
 
216
- The method `RelatonIec.code_to_urn(code, lang)` converts document identifier to URN.
234
+ The method `Relaton::Iec.code_to_urn(code, lang)` converts document identifier to URN.
217
235
 
218
236
  * `code` is a document identifier
219
237
  * `lang` is a laguage code (optional). Examples: en, fr, en-fr etc.
220
238
 
221
239
  [source,ruby]
222
240
  ----
223
- RelatonIec.code_to_urn "IEC 60050-102:2007/AMD1:2017"
241
+ Relaton::Iec.code_to_urn "IEC 60050-102:2007/AMD1:2017"
224
242
  => "urn:iec:std:iec:60050-102:2007:::::amd:1:2017"
225
243
 
226
- RelatonIec.code_to_urn "IEC 60034-1:1969+AMD1:1977+AMD2:1979+AMD3:1980 CSV", "en-fr"
244
+ Relaton::Iec.code_to_urn "IEC 60034-1:1969+AMD1:1977+AMD2:1979+AMD3:1980 CSV", "en-fr"
227
245
  => "urn:iec:std:iec:60034-1:1969::csv:en-fr:plus:amd:1:1977:plus:amd:2:1979:plus:amd:3:1980"
228
246
  ----
229
247
 
230
- The method `RelatonIec.urn_to_code(urn)` converts URN to document identifier.
248
+ The method `Relaton::Iec.urn_to_code(urn)` converts URN to document identifier.
231
249
 
232
250
  [source,ruby]
233
251
  ----
234
- RelatonIec.urn_to_code "urn:iec:std:iec:60050-102:2007:::::amd:1:2017"
252
+ Relaton::Iec.urn_to_code "urn:iec:std:iec:60050-102:2007:::::amd:1:2017"
235
253
  => ["IEC 60050-102:2007/AMD1:2017", ""]
236
254
 
237
- RelatonIec.urn_to_code "urn:iec:std:iec:60034-1:1969::csv:en-fr:plus:amd:1:1977:plus:amd:2:1979:plus:amd:3:1980"
255
+ Relaton::Iec.urn_to_code "urn:iec:std:iec:60034-1:1969::csv:en-fr:plus:amd:1:1977:plus:amd:2:1979:plus:amd:3:1980"
238
256
  => ["IEC 60034-1:1969+AMD1:1977+AMD2:1979+AMD3:1980 CSV", "en-fr"]
239
257
  ----
240
258
 
@@ -244,7 +262,7 @@ This gem uses the https://bitbucket.org/sdo-hapi/api-specifications/wiki/Guideli
244
262
  - `iec-harmonized-all` - fetches all the documents using the API
245
263
  - `iec-harmonized-latest` - fetches the latest documents using the API
246
264
 
247
- The method `RelatonIec::DataFetcher.new(source, output: "data", format: "yaml").fetch` fetches IEC documents from the dataset and saves them to the `./data` folder in YAML format.
265
+ The method `Relaton::Iec::DataFetcher.fetch(source, output: "data", format: "yaml") fetches IEC documents from the dataset and saves them to the `./data` folder in YAML format.
248
266
  Arguments:
249
267
 
250
268
  - `source` - data source. Possible values: `iec-harmonized-all`, `iec-harmonized-latest` (default `iec-harmonized-latest`).
@@ -253,7 +271,7 @@ Arguments:
253
271
 
254
272
  [source,ruby]
255
273
  ----
256
- RelatonIec::DataFetcher.new.fetch
274
+ Relaton::Iec::DataFetcher.fetch
257
275
  Started at: 2022-06-23 09:36:55 +0200
258
276
  Stopped at: 2022-06-23 09:36:58 +0200
259
277
  Done in: 752 sec.
@@ -262,7 +280,7 @@ Done in: 752 sec.
262
280
 
263
281
  === Logging
264
282
 
265
- RelatonIec uses the relaton-logger gem for logging. By default, it logs to STDOUT. To change the log levels and add other loggers, read the https://github.com/relaton/relaton-logger#usage[relaton-logger] documentation.
283
+ Relaton::Iec uses the relaton-logger gem for logging. By default, it logs to STDOUT. To change the log levels and add other loggers, read the https://github.com/relaton/relaton-logger#usage[relaton-logger] documentation.
266
284
 
267
285
  == Development
268
286