relaton-3gpp 1.18.0 → 1.19.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: 682c2146c49654c1b6d4648ebfc3f7cfce733192c362271326cfbe83dc179554
4
- data.tar.gz: 52d95d657d9f98c250ff9f969561f0fc41d88792b1417f62be5024be192325d7
3
+ metadata.gz: 8ff1174543dfbd48b4d626209d606068d47ae500cd7b9bbf5cd76fa349286d04
4
+ data.tar.gz: df03d0d8c121fdf64838e5d4d4c5ee763d7e44296a25d028203284dbd5fccd87
5
5
  SHA512:
6
- metadata.gz: d91d4bbe21537e5314ed66f962ed0bd667134b92f94363b71c7da43d20f29e2a2187d6201e88a3f4467babc78d8d349e830eac3c4b85920671f352c65b9d4fb7
7
- data.tar.gz: 07e9502c6de74eeba4d9492978a62af326fe5a4fd2973bfdc5493514af7d722159d5020b1b6b9c793bbf0aaad70d24a03bfb1d2bf54a44dc6d9a11fb6342d23f
6
+ metadata.gz: f7c829da8ad2a8c9cadba2293d87e0f8cf90db08ce35f91b411d00f3c261d990c6b3d2a105ac81bc9112e726acf913e471b364c8bc5c44af762e36c1b89cf5ea
7
+ data.tar.gz: 1e6d5b9679d1ea1c59aee4a43c807772bfadb0a28943d56930f0295cd75aa1bddfbfdc958406616b3622d54afa8d427a26b08d476d505130dd5585ede977cef4
data/README.adoc CHANGED
@@ -23,24 +23,13 @@ Or install it yourself as:
23
23
 
24
24
  == Usage
25
25
 
26
- === Configuration
27
-
28
- Configuration is optional. The available option is `logger` which is a `Logger` instance. By default, the logger is `Logger.new($stderr)` with `Logger::WARN` level. To change the logger level, use `Relaton3gpp.configure` block.
26
+ === Search for a standard using keywords
29
27
 
30
28
  [source,ruby]
31
29
  ----
32
- require 'relaton_3gpp'
30
+ require "relaton_3gpp"
33
31
  => true
34
32
 
35
- Relaton3gpp.configure do |config|
36
- config.logger.level = Logger::DEBUG
37
- end
38
- ----
39
-
40
- === Search for a standard using keywords
41
-
42
- [source,ruby]
43
- ----
44
33
  item = Relaton3gpp::Bibliography.get "3GPP TR 00.01U:UMTS/3.0.0"
45
34
  [relaton-3gpp] (3GPP TR 00.01U:UMTS/3.0.0) Fetching repository ...
46
35
  [relaton-3gpp] (3GPP TR 00.01U:UMTS/3.0.0) Found: `3GPP TR 00.01U:UMTS/3.0.0`
@@ -156,6 +145,10 @@ Done in: 557 sec.
156
145
  => nil
157
146
  ----
158
147
 
148
+ === Logging
149
+
150
+ Relaton3gpp 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.
151
+
159
152
  == Development
160
153
 
161
154
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -244,6 +244,9 @@
244
244
  <data type="ID"/>
245
245
  </attribute>
246
246
  <attribute name="reviewer"/>
247
+ <optional>
248
+ <attribute name="type"/>
249
+ </optional>
247
250
  <optional>
248
251
  <attribute name="date">
249
252
  <data type="dateTime"/>
@@ -11,17 +11,17 @@ module Relaton3gpp
11
11
  # @param [Relaton3gpp::Release] release
12
12
  #
13
13
  def initialize(**args) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
14
- Util.warn "WARNING: Doctype is missing" if args[:type].nil?
14
+ Util.warn "Doctype is missing" if args[:type].nil?
15
15
  @radiotechnology = args.delete(:radiotechnology)
16
16
  if @radiotechnology && !RADIOTECHNOLOGIES.include?(@radiotechnology)
17
- Util.warn "WARNING: Unknown radiotechnology type: `#{@radiotechnology}`"
18
- Util.warn "WARNING: Possible radiotechnology types: `#{RADIOTECHNOLOGIES.join '`, `'}`"
17
+ Util.warn "Unknown radiotechnology type: `#{@radiotechnology}`"
18
+ Util.warn "Possible radiotechnology types: `#{RADIOTECHNOLOGIES.join '`, `'}`"
19
19
  end
20
20
  @common_ims_spec = args.delete(:common_ims_spec)
21
21
  @release = args.delete(:release)
22
22
  if args[:docsubtype] && !DOCSUBTYPES.include?(args[:docsubtype])
23
- Util.warn "WARNING: Unknown docsubtype: `#{args[:docsubtype]}`"
24
- Util.warn "WARNING: Possible docsubtypes: `#{DOCSUBTYPES.join '`, `'}`"
23
+ Util.warn "Unknown docsubtype: `#{args[:docsubtype]}`"
24
+ Util.warn "Possible docsubtypes: `#{DOCSUBTYPES.join '`, `'}`"
25
25
  end
26
26
  super(**args)
27
27
  end
@@ -34,14 +34,14 @@ module Relaton3gpp
34
34
  # @param opts [Hash] options
35
35
  # @return [RelatonBib::BibliographicItem]
36
36
  def get(ref, _year = nil, _opts = {})
37
- Util.warn "(#{ref}) Fetching from Relaton repository ..."
37
+ Util.info "Fetching from Relaton repository ...", key: ref
38
38
  result = search(ref)
39
39
  unless result
40
- Util.warn "(#{ref}) Not found."
40
+ Util.info "Not found.", key: ref
41
41
  return
42
42
  end
43
43
 
44
- Util.warn "(#{ref}) Found: `#{result.docidentifier[0].id}`"
44
+ Util.info "Found: `#{result.docidentifier[0].id}`", key: ref
45
45
  result
46
46
  end
47
47
 
@@ -10,8 +10,7 @@ module Relaton3gpp
10
10
  def initialize(output, format)
11
11
  require "fileutils"
12
12
  require "net/ftp"
13
- require "zip"
14
- require "mdb"
13
+ require "csv"
15
14
 
16
15
  @output = output
17
16
  @format = format
@@ -47,25 +46,14 @@ module Relaton3gpp
47
46
  #
48
47
  def fetch(renewal) # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
49
48
  file = get_file renewal
50
- return unless file
49
+ return unless file && File.exist?(file) && File.size(file) > 20_000_000
51
50
 
52
- Zip::File.open(file) do |zip_file|
53
- enntry = zip_file.glob("status_smg_3GPP.mdb").first
54
- File.open("status_smg_3GPP.mdb", "wb") do |f|
55
- f.write enntry.get_input_stream.read
56
- end
57
- end
58
- dbs = Mdb.open "status_smg_3GPP.mdb"
59
- specs = dbs["Specs_GSM+3G"]
60
- specrels = dbs["Specs_GSM+3G_release-info"]
61
- releases = dbs["Releases"]
62
- tstatus = dbs["temp-status"]
63
- if renewal && dbs["2001-04-25_schedule"].any?
51
+ if renewal
64
52
  FileUtils.rm_f File.join(@output, "/*") # if renewal && dbs["2001-04-25_schedule"].any?
65
53
  index.remove_all # if renewal
66
54
  end
67
- dbs["2001-04-25_schedule"].each do |row|
68
- fetch_doc row, specs, specrels, releases, tstatus
55
+ CSV.open(file, "r:bom|utf-8", headers: true, col_sep: ";").each do |row|
56
+ save_doc Parser.parse(row)
69
57
  end
70
58
  File.write CURRENT, @current.to_yaml, encoding: "UTF-8"
71
59
  index.save
@@ -86,17 +74,18 @@ module Relaton3gpp
86
74
  ftp = Net::FTP.new("www.3gpp.org")
87
75
  ftp.resume = true
88
76
  ftp.login
89
- ftp.chdir "/Information/Databases/Spec_Status/"
90
- file_path = ftp.list("*.zip").first
77
+ ftp.chdir "/Information/Databases/"
78
+ file_path = ftp.list("*.csv").first
91
79
  return unless file_path
92
80
 
93
81
  d, t, _, file = file_path.split
94
- unless renewal
95
- dt = DateTime.strptime("#{d} #{t}", "%m-%d-%y %I:%M%p")
96
- return if file == @current["file"] && !@current["date"].empty? && dt == DateTime.parse(@current["date"])
82
+ dt = DateTime.strptime("#{d} #{t}", "%m-%d-%y %I:%M%p")
83
+ if !renewal && file == @current["file"] && !@current["date"].empty? && dt == DateTime.parse(@current["date"])
84
+ return
97
85
  end
98
86
 
99
- ftp.getbinaryfile file
87
+ tmp_file = File.join Dir.tmpdir, "3gpp.csv"
88
+ ftp.get(file, tmp_file)
100
89
  rescue Net::ReadTimeout => e
101
90
  n += 1
102
91
  retry if n < 5
@@ -104,7 +93,7 @@ module Relaton3gpp
104
93
  end
105
94
  @current["file"] = file
106
95
  @current["date"] = dt.to_s
107
- file
96
+ tmp_file
108
97
  end
109
98
 
110
99
  #
@@ -118,15 +107,15 @@ module Relaton3gpp
118
107
  #
119
108
  # @return [Relaton3gpp::BibliographicItem, nil] bibliographic item
120
109
  #
121
- def fetch_doc(row, specs, specrels, releases, tstatus)
122
- doc = Parser.parse row, specs, specrels, releases, tstatus
123
- save_doc doc
124
- rescue StandardError => e
125
- warn "Error: #{e.message}"
126
- warn "PubID: #{row[:spec]}:#{row[:release]}/#{row[:MAJOR_VERSION_NB]}."\
127
- "#{row[:TECHNICAL_VERSION_NB]}.#{row[:EDITORIAL_VERSION_NB]}"
128
- warn e.backtrace[0..5].join("\n")
129
- end
110
+ # def fetch_doc(row, specs, specrels, releases, tstatus)
111
+ # doc = Parser.parse row, specs, specrels, releases, tstatus
112
+ # save_doc doc
113
+ # rescue StandardError => e
114
+ # warn "Error: #{e.message}"
115
+ # warn "PubID: #{row[:spec]}:#{row[:release]}/#{row[:MAJOR_VERSION_NB]}."\
116
+ # "#{row[:TECHNICAL_VERSION_NB]}.#{row[:EDITORIAL_VERSION_NB]}"
117
+ # warn e.backtrace[0..5].join("\n")
118
+ # end
130
119
 
131
120
  #
132
121
  # Save document to file
@@ -143,7 +132,7 @@ module Relaton3gpp
143
132
  end
144
133
  file = file_name(bib)
145
134
  if @files.include? file
146
- warn "File #{file} already exists. Document: #{bib.docnumber}"
135
+ Util.warn "File #{file} already exists. Document: #{bib.docnumber}"
147
136
  else
148
137
  @files << file
149
138
  end
@@ -10,8 +10,8 @@ module Relaton3gpp
10
10
  # @param type [String]
11
11
  def check(type)
12
12
  unless DOCTYPES.include? type
13
- Util.warn "WARNING: Unknown doctype: `#{type}`"
14
- Util.warn "WARNING: Possible doctypes: `#{DOCTYPES.join '`, `'}`"
13
+ Util.warn "Unknown doctype: `#{type}`"
14
+ Util.warn "Possible doctypes: `#{DOCTYPES.join '`, `'}`"
15
15
  end
16
16
  end
17
17
  end
@@ -1,39 +1,25 @@
1
1
  module Relaton3gpp
2
2
  class Parser
3
+ DOCTYPES = { "TS" => "Technical Specification", "TR" => "Technical Report"}.freeze
4
+
3
5
  #
4
6
  # Document parser initalization
5
7
  #
6
- # @param [Hash] row row
7
- # @param [Array<Hash>] specrels Spec + Release table
8
- # @param [Array<Hash>] relaeases Releases table
9
- # @param [Array<Hash>] specs Specs table
10
- # @param [Array<Hash>] tstatus temp status-table
8
+ # @param [CSV::Row] row CSV row
11
9
  #
12
- def initialize(row, specs, specrels, releases, tstatus) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity
10
+ def initialize(row)
13
11
  @row = row
14
- @spec = specs.detect { |s| s[:Number] == row[:spec] }
15
- if @spec
16
- @specrel = specrels.detect do |sr|
17
- sr[:Spec] == row[:spec] && sr[:Release] == row[:release]
18
- end
19
- @rel = releases.detect { |r| r[:Release_code] == row[:release] }
20
- end
21
- @tstatus = tstatus.detect { |t| t[:Number] == row[:spec] }
22
12
  end
23
13
 
24
14
  #
25
15
  # Initialize document parser and run it
26
16
  #
27
- # @param [Hash] row row
28
- # @param [Array<Hash>] specrels Spec + Release table
29
- # @param [Array<Hash>] relaeases Releases table
30
- # @param [Array<Hash>] specs Specs table
31
- # @param [Array<Hash>] tstatus temp status-table
17
+ # @param [CSV:Row] row CSV row
32
18
  #
33
19
  # @return [RelatonBib:BibliographicItem, nil] bibliographic item
34
20
  #
35
- def self.parse(row, specs, specrels, relaeases, tstatus)
36
- new(row, specs, specrels, relaeases, tstatus).parse
21
+ def self.parse(row)
22
+ new(row).parse
37
23
  end
38
24
 
39
25
  #
@@ -42,24 +28,22 @@ module Relaton3gpp
42
28
  # @return [Relaton3gpp:BibliographicItem, nil] bibliographic item
43
29
  #
44
30
  def parse # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
45
- return unless @spec && @row[:"3guId"]
46
-
47
31
  Relaton3gpp::BibliographicItem.new(
48
32
  type: "standard",
49
33
  language: ["en"],
50
34
  script: ["Latn"],
51
35
  title: parse_title,
52
36
  link: parse_link,
53
- abstract: parse_abstract,
37
+ # abstract: parse_abstract,
54
38
  docid: parse_docid,
55
39
  docnumber: number,
56
40
  date: parse_date,
57
- doctype: DocumentType.new(type: @spec[:Type]),
41
+ doctype: parse_doctype,
58
42
  editorialgroup: parse_editorialgroup,
59
- biblionote: parse_note,
60
- docstatus: parse_status,
43
+ # biblionote: parse_note,
44
+ # docstatus: parse_status,
61
45
  radiotechnology: parse_radiotechnology,
62
- common_ims_spec: @spec[:ComIMS] == "1",
46
+ # common_ims_spec: @spec[:ComIMS] == "1",
63
47
  # internal: @spec[:"For publication"] == "0",
64
48
  release: parse_release,
65
49
  contributor: parse_contributor,
@@ -73,7 +57,7 @@ module Relaton3gpp
73
57
  # @return [RelatonBib::TypedTitleStringCollection] title
74
58
  #
75
59
  def parse_title
76
- t = RelatonBib::TypedTitleString.new content: @spec[:Title], type: "main"
60
+ t = RelatonBib::TypedTitleString.new content: @row["Title"], type: "main"
77
61
  RelatonBib::TypedTitleStringCollection.new [t]
78
62
  end
79
63
 
@@ -83,10 +67,9 @@ module Relaton3gpp
83
67
  # @return [Array<RelatonBib::TypedUri>] link
84
68
  #
85
69
  def parse_link
86
- return [] unless @row[:location]
70
+ return [] unless @row["Link"]
87
71
 
88
- content = @row[:location].split("#").last
89
- [RelatonBib::TypedUri.new(type: "src", content: content)]
72
+ [RelatonBib::TypedUri.new(type: "src", content: @row["Link"])]
90
73
  end
91
74
 
92
75
  #
@@ -94,11 +77,11 @@ module Relaton3gpp
94
77
  #
95
78
  # @return [Array<RelatonBib::FormattedString>]
96
79
  #
97
- def parse_abstract
98
- return [] unless @spec[:description]
80
+ # def parse_abstract
81
+ # return [] unless @spec[:description]
99
82
 
100
- [RelatonBib::FormattedString.new(content: @spec[:description])]
101
- end
83
+ # [RelatonBib::FormattedString.new(content: @spec[:description])]
84
+ # end
102
85
 
103
86
  #
104
87
  # Parse docidentifier
@@ -115,7 +98,21 @@ module Relaton3gpp
115
98
  # @return [String] number
116
99
  #
117
100
  def number
118
- "#{@spec[:Type]} #{@row[:spec]}:#{@row[:release]}/#{version}"
101
+ num = "#{doctype_abbr} #{@row[0]}"
102
+ num += ":#{release}" if release
103
+ "#{num}/#{@row['Version']}"
104
+ end
105
+
106
+ def doctype_abbr
107
+ @row["Is TS"] == "1" ? "TS" : "TR"
108
+ end
109
+
110
+ def release
111
+ @release ||= case @row["WPM Code 2G"]
112
+ when /Release_(\d+)/ then "R#{$1}"
113
+ when /PH(\d+)/ then "Ph#{$1}"
114
+ else @row["Release"]
115
+ end
119
116
  end
120
117
 
121
118
  #
@@ -123,9 +120,9 @@ module Relaton3gpp
123
120
  #
124
121
  # @return [String] version
125
122
  #
126
- def version
127
- "#{@row[:MAJOR_VERSION_NB]}.#{@row[:TECHNICAL_VERSION_NB]}.#{@row[:EDITORIAL_VERSION_NB]}"
128
- end
123
+ # def version
124
+ # "#{@row[:MAJOR_VERSION_NB]}.#{@row[:TECHNICAL_VERSION_NB]}.#{@row[:EDITORIAL_VERSION_NB]}"
125
+ # end
129
126
 
130
127
  #
131
128
  # Parse date
@@ -133,32 +130,31 @@ module Relaton3gpp
133
130
  # @return [Array<RelatonBib::BibliographicDate>] date
134
131
  #
135
132
  def parse_date
136
- dates = { completed: "created", ACHIEVED_DATE: "published" }.each_with_object([]) do |(k, t), d|
137
- # if @row[:completed]
138
- next unless @row[k]
139
-
140
- cd = Date.parse(@row[k]).to_s
141
- d << RelatonBib::BibliographicDate.new(type: t, on: cd)
142
- end
143
- if @spec[:"title verified"]
144
- td = Date.parse(@spec[:"title verified"]).to_s
145
- dates << RelatonBib::BibliographicDate.new(type: "confirmed", on: td)
133
+ dates = []
134
+ if @row["Date"]
135
+ on = Date.parse(@row["Date"]).to_s
136
+ dates << RelatonBib::BibliographicDate.new(type: "published", on: on)
146
137
  end
147
138
  dates
148
139
  end
149
140
 
141
+ def parse_doctype
142
+ # type = DOCTYPES[doctype_abbr]
143
+ DocumentType.new(type: doctype_abbr)
144
+ end
145
+
150
146
  #
151
147
  # Parse editorialgroup
152
148
  #
153
149
  # @return [RelatonBib::EditorialGroup] editorialgroups
154
150
  #
155
151
  def parse_editorialgroup # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
156
- eg = [create_workgroup(@spec[:"WG prime"], "prime")]
157
- if @spec[:"WG other"] && @spec[:"WG other"] != "-"
158
- eg << create_workgroup(@spec[:"WG other"], "other")
159
- end
160
- if @spec[:"former WG"]
161
- eg << create_workgroup(@spec[:"former WG"], "former")
152
+ eg = []
153
+ prime = @row["Responsible Primary"]
154
+ eg << create_workgroup(prime, "prime") if prime
155
+
156
+ @row["Responsible Secondary"].strip.split(", ").each do |wg|
157
+ eg << create_workgroup(wg, "other")
162
158
  end
163
159
  RelatonBib::EditorialGroup.new eg
164
160
  end
@@ -173,29 +169,29 @@ module Relaton3gpp
173
169
  #
174
170
  # @return [RelatonBib::BiblioNoteCollection] notes
175
171
  #
176
- def parse_note
177
- n = []
178
- if @specrel && @specrel[:remarks] && @specrel[:remarks] != "."
179
- n << RelatonBib::BiblioNote.new(type: "remark", content: @specrel[:remarks])
180
- end
181
- if @row[:comment] && @row[:comment] != "."
182
- n << RelatonBib::BiblioNote.new(type: "comment", content: @row[:comment])
183
- end
184
- RelatonBib::BiblioNoteCollection.new n
185
- end
172
+ # def parse_note
173
+ # n = []
174
+ # if @specrel && @specrel[:remarks] && @specrel[:remarks] != "."
175
+ # n << RelatonBib::BiblioNote.new(type: "remark", content: @specrel[:remarks])
176
+ # end
177
+ # if @row[:comment] && @row[:comment] != "."
178
+ # n << RelatonBib::BiblioNote.new(type: "comment", content: @row[:comment])
179
+ # end
180
+ # RelatonBib::BiblioNoteCollection.new n
181
+ # end
186
182
 
187
183
  #
188
184
  # Prase status
189
185
  #
190
186
  # @return [RelatnoBib::DocumentStatus, nil] status
191
187
  #
192
- def parse_status
193
- if @specrel && @specrel[:withdrawn] == "1"
194
- RelatonBib::DocumentStatus.new stage: "withdrawn"
195
- elsif @spec[:"For publication"] == "1"
196
- RelatonBib::DocumentStatus.new stage: "published"
197
- end
198
- end
188
+ # def parse_status
189
+ # if @specrel && @specrel[:withdrawn] == "1"
190
+ # RelatonBib::DocumentStatus.new stage: "withdrawn"
191
+ # elsif @spec[:"For publication"] == "1"
192
+ # RelatonBib::DocumentStatus.new stage: "published"
193
+ # end
194
+ # end
199
195
 
200
196
  #
201
197
  # Parse radio technology
@@ -203,10 +199,11 @@ module Relaton3gpp
203
199
  # @return [String] radio technology
204
200
  #
205
201
  def parse_radiotechnology
206
- if @spec[:"2g"] == "1" then "2G"
207
- elsif @spec[:"3g"] == "1" then "3G"
208
- elsif @spec[:LTE] == "1" then "LTE"
209
- elsif @spec[:"5G"] == "1" then "5G"
202
+ case @row[:"WPM Code 3G"]
203
+ when /5G/ then "5G"
204
+ when /4G/ then "LTE"
205
+ when /3G/ then "3G"
206
+ else @row[:"WPM Code 2G"] && "2G"
210
207
  end
211
208
  end
212
209
 
@@ -216,24 +213,22 @@ module Relaton3gpp
216
213
  # @return [Relaton3gpp::Release, nil] release
217
214
  #
218
215
  def parse_release # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
219
- if @rel
220
- project_start = Date.parse(@rel[:"rel-proj-start"]).to_s if @rel[:"rel-proj-start"]
221
- project_end = Date.parse(@rel[:"rel-proj-end"]).to_s if @rel[:"rel-proj-end"]
222
- Release.new(
223
- version2g: @rel[:version_2g],
224
- version3g: @rel[:version_3g],
225
- defunct: @rel[:defunct] == "1",
226
- wpm_code_2g: @rel[:wpm_code_2g],
227
- wpm_code_3g: @rel[:wpm_code_3g],
228
- freeze_meeting: @rel[:"freeze meeting"],
229
- freeze_stage1_meeting: @rel[:Stage1_freeze],
230
- freeze_stage2_meeting: @rel[:Stage2_freeze],
231
- freeze_stage3_meeting: @rel[:Stage3_freeze],
232
- close_meeting: @rel[:Closed],
233
- project_start: project_start,
234
- project_end: project_end,
235
- )
236
- end
216
+ project_start = Date.parse(@row["Project Start"]).to_s if @row["Project Start"]
217
+ project_end = Date.parse(@row["Project End"]).to_s if @row["Project End"]
218
+ Release.new(
219
+ # version2g: @rel[:version_2g],
220
+ # version3g: @rel[:version_3g],
221
+ # defunct: @rel[:defunct] == "1",
222
+ wpm_code_2g: @row["WPM Code 2G"],
223
+ wpm_code_3g: @row["WPM Code 3G"],
224
+ # freeze_meeting: @rel[:"freeze meeting"],
225
+ freeze_stage1_meeting: @row["Stage 1 Freeze"],
226
+ freeze_stage2_meeting: @row["Stage 2 Freeze"],
227
+ freeze_stage3_meeting: @row["Stage 3 Freeze"],
228
+ close_meeting: @row["Close Meeting"],
229
+ project_start: project_start,
230
+ project_end: project_end,
231
+ )
237
232
  end
238
233
 
239
234
  #
@@ -251,15 +246,16 @@ module Relaton3gpp
251
246
  )
252
247
  roles = [{ type: "author" }, { type: "publisher" }]
253
248
  contribs = [RelatonBib::ContributionInfo.new(entity: org, role: roles)]
254
- return contribs unless @tstatus && @tstatus[:rapporteur]
249
+ return contribs unless @row["Last Name"] && @row["Last Name"] != "Vacant"
255
250
 
256
251
  aff = []
257
- if @tstatus[:"rapp org"]
258
- org = RelatonBib::Organization.new(name: @tstatus[:"rapp org"])
259
- cn = RelatonBib::LocalizedString.new @tstatus[:rapporteur], "en", "Latn"
260
- name = RelatonBib::FullName.new(completename: cn)
252
+ if @row["Organisation"]
253
+ org = RelatonBib::Organization.new(name: @row["Organisation"])
261
254
  aff << RelatonBib::Affiliation.new(organization: org)
262
255
  end
256
+ surname = RelatonBib::LocalizedString.new @row["Last Name"], "en", "Latn"
257
+ forename = RelatonBib::LocalizedString.new @row["First Name"], "en", "Latn"
258
+ name = RelatonBib::FullName.new(surname: surname, forename: [forename])
263
259
  person = RelatonBib::Person.new(name: name, affiliation: aff)
264
260
  role = { type: "author" }
265
261
  contribs << RelatonBib::ContributionInfo.new(entity: person, role: [role])
@@ -1,9 +1,6 @@
1
1
  module Relaton3gpp
2
2
  module Util
3
3
  extend RelatonBib::Util
4
-
5
- def self.logger
6
- Relaton3gpp.configuration.logger
7
- end
4
+ PROGNAME = "relaton-3gpp".freeze
8
5
  end
9
6
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Relaton3gpp
4
- VERSION = "1.18.0"
4
+ VERSION = "1.19.0"
5
5
  end
@@ -53,6 +53,10 @@ module Relaton3gpp
53
53
  def bib_item(item_hash)
54
54
  BibliographicItem.new(**item_hash)
55
55
  end
56
+
57
+ def create_doctype(type)
58
+ DocumentType.new type: type.text, abbreviation: type[:abbreviation]
59
+ end
56
60
  end
57
61
  end
58
62
  end
data/lib/relaton_3gpp.rb CHANGED
@@ -4,7 +4,6 @@ require "net/http"
4
4
  require "relaton/index"
5
5
  require "relaton_bib"
6
6
  require_relative "relaton_3gpp/version"
7
- require_relative "relaton_3gpp/config"
8
7
  require_relative "relaton_3gpp/util"
9
8
  require_relative "relaton_3gpp/document_type"
10
9
  require_relative "relaton_3gpp/release"
data/relaton_3gpp.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  require_relative "lib/relaton_3gpp/version"
4
4
 
5
- Gem::Specification.new do |spec|
5
+ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength
6
6
  spec.name = "relaton-3gpp"
7
7
  spec.version = Relaton3gpp::VERSION
8
8
  spec.authors = ["Ribose Inc."]
@@ -36,9 +36,7 @@ Gem::Specification.new do |spec|
36
36
  # For more information and examples about making a new gem, checkout our
37
37
  # guide at: https://bundler.io/guides/creating_gem.html
38
38
 
39
- spec.add_dependency "mdb", "~> 0.5.0"
40
39
  spec.add_dependency "net-ftp", "~> 0.1.0"
41
- spec.add_dependency "relaton-bib", "~> 1.18.0"
40
+ spec.add_dependency "relaton-bib", "~> 1.19.0"
42
41
  spec.add_dependency "relaton-index", "~> 0.2.0"
43
- spec.add_dependency "rubyzip", "~> 2.3.0"
44
42
  end
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-3gpp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.18.0
4
+ version: 1.19.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: 2024-01-06 00:00:00.000000000 Z
11
+ date: 2024-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: mdb
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: 0.5.0
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: 0.5.0
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: net-ftp
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -44,14 +30,14 @@ dependencies:
44
30
  requirements:
45
31
  - - "~>"
46
32
  - !ruby/object:Gem::Version
47
- version: 1.18.0
33
+ version: 1.19.0
48
34
  type: :runtime
49
35
  prerelease: false
50
36
  version_requirements: !ruby/object:Gem::Requirement
51
37
  requirements:
52
38
  - - "~>"
53
39
  - !ruby/object:Gem::Version
54
- version: 1.18.0
40
+ version: 1.19.0
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: relaton-index
57
43
  requirement: !ruby/object:Gem::Requirement
@@ -66,20 +52,6 @@ dependencies:
66
52
  - - "~>"
67
53
  - !ruby/object:Gem::Version
68
54
  version: 0.2.0
69
- - !ruby/object:Gem::Dependency
70
- name: rubyzip
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: 2.3.0
76
- type: :runtime
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: 2.3.0
83
55
  description: 'Relaton3gpp: Ruby XMLDOC impementation.'
84
56
  email:
85
57
  - open.source@ribose.com
@@ -107,7 +79,6 @@ files:
107
79
  - lib/relaton_3gpp.rb
108
80
  - lib/relaton_3gpp/bibliographic_item.rb
109
81
  - lib/relaton_3gpp/bibliography.rb
110
- - lib/relaton_3gpp/config.rb
111
82
  - lib/relaton_3gpp/data_fetcher.rb
112
83
  - lib/relaton_3gpp/document_type.rb
113
84
  - lib/relaton_3gpp/hash_converter.rb
@@ -138,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
109
  - !ruby/object:Gem::Version
139
110
  version: '0'
140
111
  requirements: []
141
- rubygems_version: 3.3.26
112
+ rubygems_version: 3.3.27
142
113
  signing_key:
143
114
  specification_version: 4
144
115
  summary: 'Relaton3gpp: Ruby XMLDOC impementation.'
@@ -1,10 +0,0 @@
1
- module Relaton3gpp
2
- module Config
3
- include RelatonBib::Config
4
- end
5
- extend Config
6
-
7
- class Configuration < RelatonBib::Configuration
8
- PROGNAME = "relaton-3gpp".freeze
9
- end
10
- end