relaton-3gpp 1.19.1 → 1.19.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 45004cd52d3255e9882f17e3c4331025aaf389c21ad1c756ba3aeccd5953f5b0
4
- data.tar.gz: d87bbfcdbdd04d17726554e7bcbd7438b8edc5f31dcc7030553522f292ea9ec2
3
+ metadata.gz: dd1fa645aac028fc52f0b6421c2d679ae5db3fc2f007fcfc89b26337eefe5a76
4
+ data.tar.gz: 3db5b69186b8284c36bb3a55edbcee9410f2422226096d69a0498d54a486e9c1
5
5
  SHA512:
6
- metadata.gz: 9e11c551066552effe3e897850210ba5b7e06f033b5ddc2798f1ec74b68534cd3b87772b6175f506af4909e376f55c078701035a2a4353399ab8f88f4ffc1d76
7
- data.tar.gz: 2303de76da8eebe06ac967b54fe08b4e2cb78215f66cf8a789182f8c81d89286ca97034e1617dee50b0efb0e92a90c7aa75914903c0e79a336b830daa613e2d4
6
+ metadata.gz: 4158d0fd06bc9b854332ae22c097bea928a88eb8bf94a7b51e8411b6600199f42b80926fdb68e67c6b7f197c54b2ee96d31d81afdfeb90f8676e6e1d85271b64
7
+ data.tar.gz: 945cbd425db32440741b918f3f69012606903ad90a446a57c46307ad3ce432add2890ad5c0a51b40a0ea470061b52aeda8b571a43061219d9c97a1f927341da9
data/README.adoc CHANGED
@@ -127,7 +127,7 @@ Relaton3gpp::BibliographicItem.new(**bib_hash)
127
127
 
128
128
  === Fetch data
129
129
 
130
- There is a 3GPP dataset ftp://www.3gpp.org/Information/Databases/Spec_Status/[latest *.zip] which can be converted into RelatonXML/BibXML/BibYAML formats.
130
+ There is a 3GPP dataset ftp://www.3gpp.org/Information/Databases/[latest *.csv] which can be converted into RelatonXML/BibXML/BibYAML formats.
131
131
 
132
132
  The method `Relaton3GPP::DataFetcher.fetch(output: "data", format: "yaml")` converts all the documents from the dataset and save them to the `./data` folder in YAML format.
133
133
  Arguments:
@@ -3,12 +3,15 @@ module Relaton3gpp
3
3
  DOCSUBTYPES = %w[spec release].freeze
4
4
  RADIOTECHNOLOGIES = %w[2G 3G LTE 5G].freeze
5
5
 
6
+ # @return [String, nil]
7
+ attr_reader :radiotechnology, :release
8
+
6
9
  #
7
10
  # Initialize bibliographic item.
8
11
  #
9
- # @param [String] radiotechnology
12
+ # @param [String, nil] radiotechnology
10
13
  # @param [Boolean] common_ims_spec
11
- # @param [Relaton3gpp::Release] release
14
+ # @param [Relaton3gpp::Release, nil] release
12
15
  #
13
16
  def initialize(**args) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
14
17
  Util.warn "Doctype is missing" if args[:type].nil?
@@ -61,9 +64,9 @@ module Relaton3gpp
61
64
  b.subdoctype subdoctype if subdoctype
62
65
  editorialgroup&.to_xml b
63
66
  ics.each { |i| i.to_xml b }
64
- b.radiotechnology @radiotechnology if @radiotechnology
67
+ b.radiotechnology radiotechnology if radiotechnology
65
68
  b.send :"common-ims-spec", @common_ims_spec if @common_ims_spec
66
- @release&.to_xml b
69
+ release&.to_xml b
67
70
  end
68
71
  ext["schema-version"] = ext_schema unless opts[:embedded]
69
72
  end
@@ -71,8 +74,8 @@ module Relaton3gpp
71
74
  end
72
75
 
73
76
  def has_ext_attrs? # rubocop:disable Metrics/CyclomaticComplexity
74
- doctype || subdoctype || editorialgroup || ics.any? || @radiotechnology ||
75
- @common_ims_spec || @release
77
+ doctype || subdoctype || editorialgroup || ics.any? || radiotechnology ||
78
+ @common_ims_spec || release
76
79
  end
77
80
 
78
81
  #
@@ -82,9 +85,9 @@ module Relaton3gpp
82
85
  #
83
86
  def to_hash(embedded: false)
84
87
  hash = super
85
- hash["radiotechnology"] = @radiotechnology if @radiotechnology
88
+ hash["radiotechnology"] = radiotechnology if radiotechnology
86
89
  hash["common-ims-spec"] = @common_ims_spec if @common_ims_spec
87
- hash["release"] = @release.to_hash if @release
90
+ hash["release"] = release.to_hash if release
88
91
  hash
89
92
  end
90
93
  end
@@ -40,6 +40,7 @@ module Relaton3gpp
40
40
  date: parse_date,
41
41
  doctype: parse_doctype,
42
42
  editorialgroup: parse_editorialgroup,
43
+ version: parse_version,
43
44
  # biblionote: parse_note,
44
45
  # docstatus: parse_status,
45
46
  radiotechnology: parse_radiotechnology,
@@ -100,7 +101,15 @@ module Relaton3gpp
100
101
  def number
101
102
  num = "#{doctype_abbr} #{@row[0]}"
102
103
  num += ":#{release}" if release
103
- "#{num}/#{@row['Version']}"
104
+ "#{num}/#{version}"
105
+ end
106
+
107
+ def version
108
+ @row["Version"]
109
+ end
110
+
111
+ def parse_version
112
+ [RelatonBib::BibliographicItem::Version.new(nil, version)]
104
113
  end
105
114
 
106
115
  def doctype_abbr
@@ -199,11 +208,11 @@ module Relaton3gpp
199
208
  # @return [String] radio technology
200
209
  #
201
210
  def parse_radiotechnology
202
- case @row[:"WPM Code 3G"]
211
+ case @row["WPM Code 3G"]
203
212
  when /5G/ then "5G"
204
213
  when /4G/ then "LTE"
205
214
  when /3G/ then "3G"
206
- else @row[:"WPM Code 2G"] && "2G"
215
+ else @row["WPM Code 2G"] && "2G"
207
216
  end
208
217
  end
209
218
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Relaton3gpp
4
- VERSION = "1.19.1"
4
+ VERSION = "1.19.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-3gpp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.19.1
4
+ version: 1.19.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: 2024-07-12 00:00:00.000000000 Z
11
+ date: 2024-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: csv