relaton-3gpp 1.14.3 → 1.14.4
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 +1 -0
- data/.github/workflows/release.yml +3 -2
- data/.gitignore +2 -0
- data/.rubocop.yml +1 -1
- data/Gemfile +8 -2
- data/grammars/basicdoc.rng +0 -1
- data/grammars/biblio.rng +12 -2
- data/lib/relaton_3gpp/bibliography.rb +8 -3
- data/lib/relaton_3gpp/data_fetcher.rb +10 -1
- data/lib/relaton_3gpp/processor.rb +7 -0
- data/lib/relaton_3gpp/version.rb +1 -1
- data/lib/relaton_3gpp.rb +1 -0
- data/relaton_3gpp.gemspec +5 -12
- metadata +21 -119
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 207139041595ff473f6d1372793a3ee8142c6b456d208be33c68f50e1c7b8961
|
4
|
+
data.tar.gz: ff9c7606fcc605644880263e4be2befe1e460a174b6c7ae92d27f12e86b03b14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 203d9cdb69126f86d801f5ed93c2df91af6f876644846d22d79ba749e11b90804f7de660a2ea1b4ec2795866fa15c3670daa911dd915f78cd0696bf7933ab728
|
7
|
+
data.tar.gz: d20cf590d0e16a30475a9a51b5431d6b467e66c490fc32145d46521da56bef995d249de98bb09919e3442fc7f542f9730fc0f9092afd45a8d29f2f913f870b96
|
data/.github/workflows/rake.yml
CHANGED
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
data/Gemfile
CHANGED
@@ -6,7 +6,13 @@ source "https://rubygems.org"
|
|
6
6
|
gemspec
|
7
7
|
|
8
8
|
gem "rake", "~> 13.0"
|
9
|
-
|
10
9
|
gem "rspec", "~> 3.0"
|
11
10
|
|
12
|
-
gem "
|
11
|
+
gem "equivalent-xml", "~> 0.6"
|
12
|
+
gem "rubocop", "~> 1.23.0"
|
13
|
+
gem "rubocop-performance", "~> 1.12.0"
|
14
|
+
gem "rubocop-rails", "~> 2.12.0"
|
15
|
+
gem "ruby-jing", "~> 0.0.2"
|
16
|
+
gem "simplecov", "~> 0.21.2"
|
17
|
+
gem "vcr", "~> 6.1.0"
|
18
|
+
gem "webmock", "~> 3.18.0"
|
data/grammars/basicdoc.rng
CHANGED
data/grammars/biblio.rng
CHANGED
@@ -216,6 +216,9 @@
|
|
216
216
|
<optional>
|
217
217
|
<ref name="fullname"/>
|
218
218
|
</optional>
|
219
|
+
<zeroOrMore>
|
220
|
+
<ref name="credential"/>
|
221
|
+
</zeroOrMore>
|
219
222
|
<zeroOrMore>
|
220
223
|
<ref name="affiliation"/>
|
221
224
|
</zeroOrMore>
|
@@ -232,6 +235,11 @@
|
|
232
235
|
<ref name="FullNameType"/>
|
233
236
|
</element>
|
234
237
|
</define>
|
238
|
+
<define name="credential">
|
239
|
+
<element name="credential">
|
240
|
+
<text/>
|
241
|
+
</element>
|
242
|
+
</define>
|
235
243
|
<define name="FullNameType">
|
236
244
|
<choice>
|
237
245
|
<group>
|
@@ -305,7 +313,9 @@
|
|
305
313
|
<zeroOrMore>
|
306
314
|
<ref name="affiliationdescription"/>
|
307
315
|
</zeroOrMore>
|
308
|
-
<
|
316
|
+
<optional>
|
317
|
+
<ref name="organization"/>
|
318
|
+
</optional>
|
309
319
|
</element>
|
310
320
|
</define>
|
311
321
|
<define name="affiliationname">
|
@@ -1316,7 +1326,7 @@
|
|
1316
1326
|
<value>commentaryOf</value>
|
1317
1327
|
<value>hasCommentary</value>
|
1318
1328
|
<value>related</value>
|
1319
|
-
<value>
|
1329
|
+
<value>hasComplement</value>
|
1320
1330
|
<value>complementOf</value>
|
1321
1331
|
<value>obsoletes</value>
|
1322
1332
|
<value>obsoletedBy</value>
|
@@ -4,13 +4,18 @@ module Relaton3gpp
|
|
4
4
|
# Methods for search IANA standards.
|
5
5
|
module Bibliography
|
6
6
|
# SOURCE = "http://xml2rfc.tools.ietf.org/public/rfc/bibxml-3gpp-new/"
|
7
|
-
SOURCE = "https://raw.githubusercontent.com/relaton/relaton-data-3gpp/main/
|
7
|
+
SOURCE = "https://raw.githubusercontent.com/relaton/relaton-data-3gpp/main/"
|
8
|
+
INDEX_FILE = "index-v1.yaml"
|
8
9
|
|
9
10
|
# @param text [String]
|
10
11
|
# @return [RelatonBib::BibliographicItem]
|
11
12
|
def search(text) # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
|
12
|
-
|
13
|
-
|
13
|
+
index = Relaton::Index.find_or_create "3GPP", url: "#{SOURCE}index-v1.zip", file: INDEX_FILE
|
14
|
+
row = index.search(text.sub(/^3GPP\s/, "")).min_by { |r| r[:id] }
|
15
|
+
return unless row
|
16
|
+
|
17
|
+
# file = text.sub(/^3GPP\s/, "").gsub(/[\s,:\/]/, "_").squeeze("_").upcase
|
18
|
+
url = "#{SOURCE}#{row[:file]}"
|
14
19
|
resp = Net::HTTP.get_response URI(url)
|
15
20
|
return unless resp.code == "200"
|
16
21
|
|
@@ -19,6 +19,10 @@ module Relaton3gpp
|
|
19
19
|
@files = []
|
20
20
|
end
|
21
21
|
|
22
|
+
def index
|
23
|
+
@index ||= Relaton::Index.find_or_create "3gpp", file: "index-v1.yaml"
|
24
|
+
end
|
25
|
+
|
22
26
|
#
|
23
27
|
# Initialize fetcher and run fetch
|
24
28
|
#
|
@@ -56,11 +60,15 @@ module Relaton3gpp
|
|
56
60
|
specrels = dbs["Specs_GSM+3G_release-info"]
|
57
61
|
releases = dbs["Releases"]
|
58
62
|
tstatus = dbs["temp-status"]
|
59
|
-
|
63
|
+
if renewal && dbs["2001-04-25_schedule"].any?
|
64
|
+
FileUtils.rm_f File.join(@output, "/*") # if renewal && dbs["2001-04-25_schedule"].any?
|
65
|
+
index.remove_all # if renewal
|
66
|
+
end
|
60
67
|
dbs["2001-04-25_schedule"].each do |row|
|
61
68
|
fetch_doc row, specs, specrels, releases, tstatus
|
62
69
|
end
|
63
70
|
File.write CURRENT, @current.to_yaml, encoding: "UTF-8"
|
71
|
+
index.save
|
64
72
|
end
|
65
73
|
|
66
74
|
#
|
@@ -136,6 +144,7 @@ module Relaton3gpp
|
|
136
144
|
else
|
137
145
|
@files << file
|
138
146
|
end
|
147
|
+
index.add_or_update bib.docnumber, file
|
139
148
|
File.write file, c, encoding: "UTF-8"
|
140
149
|
end
|
141
150
|
|
@@ -50,5 +50,12 @@ module Relaton3gpp
|
|
50
50
|
def grammar_hash
|
51
51
|
@grammar_hash ||= ::Relaton3gpp.grammar_hash
|
52
52
|
end
|
53
|
+
|
54
|
+
#
|
55
|
+
# Remove index file
|
56
|
+
#
|
57
|
+
def remove_index_file
|
58
|
+
Relaton::Index.find_or_create("3GPP", url: true, file: Bibliography::INDEX_FILE).remove_file
|
59
|
+
end
|
53
60
|
end
|
54
61
|
end
|
data/lib/relaton_3gpp/version.rb
CHANGED
data/lib/relaton_3gpp.rb
CHANGED
data/relaton_3gpp.gemspec
CHANGED
@@ -8,11 +8,11 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.authors = ["Ribose Inc."]
|
9
9
|
spec.email = ["open.source@ribose.com"]
|
10
10
|
|
11
|
-
spec.summary = "
|
12
|
-
spec.description = "
|
13
|
-
spec.homepage = "https://github.com/relaton/relaton-
|
11
|
+
spec.summary = "Relaton3gpp: Ruby XMLDOC impementation."
|
12
|
+
spec.description = "Relaton3gpp: Ruby XMLDOC impementation."
|
13
|
+
spec.homepage = "https://github.com/relaton/relaton-3gpp"
|
14
14
|
spec.license = "BSD-2-Clause"
|
15
|
-
spec.required_ruby_version = ">= 2.
|
15
|
+
spec.required_ruby_version = ">= 2.7.0"
|
16
16
|
|
17
17
|
# spec.metadata["allowed_push_host"] = "TODO: Set to 'https://mygemserver.com'"
|
18
18
|
|
@@ -35,17 +35,10 @@ Gem::Specification.new do |spec|
|
|
35
35
|
|
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
|
-
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
39
|
-
spec.add_development_dependency "rubocop", "~> 1.23.0"
|
40
|
-
spec.add_development_dependency "rubocop-performance", "~> 1.12.0"
|
41
|
-
spec.add_development_dependency "rubocop-rails", "~> 2.12.0"
|
42
|
-
spec.add_development_dependency "ruby-jing", "~> 0.0.2"
|
43
|
-
spec.add_development_dependency "simplecov", "~> 0.21.2"
|
44
|
-
spec.add_development_dependency "vcr", "~> 6.0.0"
|
45
|
-
spec.add_development_dependency "webmock", "~> 3.14.0"
|
46
38
|
|
47
39
|
spec.add_dependency "mdb", "~> 0.5.0"
|
48
40
|
spec.add_dependency "net-ftp", "~> 0.1.0"
|
49
41
|
spec.add_dependency "relaton-bib", "~> 1.14.0"
|
42
|
+
spec.add_dependency "relaton-index", "~> 0.2.0"
|
50
43
|
spec.add_dependency "rubyzip", "~> 2.3.0"
|
51
44
|
end
|
metadata
CHANGED
@@ -1,169 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-3gpp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.14.
|
4
|
+
version: 1.14.4
|
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: 2023-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0.6'
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0.6'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rubocop
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 1.23.0
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: 1.23.0
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: rubocop-performance
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: 1.12.0
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: 1.12.0
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: rubocop-rails
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: 2.12.0
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: 2.12.0
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: ruby-jing
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: 0.0.2
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: 0.0.2
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: simplecov
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - "~>"
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: 0.21.2
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - "~>"
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: 0.21.2
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: vcr
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - "~>"
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: 6.0.0
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - "~>"
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: 6.0.0
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: webmock
|
14
|
+
name: mdb
|
113
15
|
requirement: !ruby/object:Gem::Requirement
|
114
16
|
requirements:
|
115
17
|
- - "~>"
|
116
18
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
118
|
-
type: :
|
19
|
+
version: 0.5.0
|
20
|
+
type: :runtime
|
119
21
|
prerelease: false
|
120
22
|
version_requirements: !ruby/object:Gem::Requirement
|
121
23
|
requirements:
|
122
24
|
- - "~>"
|
123
25
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
26
|
+
version: 0.5.0
|
125
27
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
28
|
+
name: net-ftp
|
127
29
|
requirement: !ruby/object:Gem::Requirement
|
128
30
|
requirements:
|
129
31
|
- - "~>"
|
130
32
|
- !ruby/object:Gem::Version
|
131
|
-
version: 0.
|
33
|
+
version: 0.1.0
|
132
34
|
type: :runtime
|
133
35
|
prerelease: false
|
134
36
|
version_requirements: !ruby/object:Gem::Requirement
|
135
37
|
requirements:
|
136
38
|
- - "~>"
|
137
39
|
- !ruby/object:Gem::Version
|
138
|
-
version: 0.
|
40
|
+
version: 0.1.0
|
139
41
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
42
|
+
name: relaton-bib
|
141
43
|
requirement: !ruby/object:Gem::Requirement
|
142
44
|
requirements:
|
143
45
|
- - "~>"
|
144
46
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
47
|
+
version: 1.14.0
|
146
48
|
type: :runtime
|
147
49
|
prerelease: false
|
148
50
|
version_requirements: !ruby/object:Gem::Requirement
|
149
51
|
requirements:
|
150
52
|
- - "~>"
|
151
53
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
54
|
+
version: 1.14.0
|
153
55
|
- !ruby/object:Gem::Dependency
|
154
|
-
name: relaton-
|
56
|
+
name: relaton-index
|
155
57
|
requirement: !ruby/object:Gem::Requirement
|
156
58
|
requirements:
|
157
59
|
- - "~>"
|
158
60
|
- !ruby/object:Gem::Version
|
159
|
-
version:
|
61
|
+
version: 0.2.0
|
160
62
|
type: :runtime
|
161
63
|
prerelease: false
|
162
64
|
version_requirements: !ruby/object:Gem::Requirement
|
163
65
|
requirements:
|
164
66
|
- - "~>"
|
165
67
|
- !ruby/object:Gem::Version
|
166
|
-
version:
|
68
|
+
version: 0.2.0
|
167
69
|
- !ruby/object:Gem::Dependency
|
168
70
|
name: rubyzip
|
169
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -178,7 +80,7 @@ dependencies:
|
|
178
80
|
- - "~>"
|
179
81
|
- !ruby/object:Gem::Version
|
180
82
|
version: 2.3.0
|
181
|
-
description: '
|
83
|
+
description: 'Relaton3gpp: Ruby XMLDOC impementation.'
|
182
84
|
email:
|
183
85
|
- open.source@ribose.com
|
184
86
|
executables: []
|
@@ -213,11 +115,11 @@ files:
|
|
213
115
|
- lib/relaton_3gpp/version.rb
|
214
116
|
- lib/relaton_3gpp/xml_parser.rb
|
215
117
|
- relaton_3gpp.gemspec
|
216
|
-
homepage: https://github.com/relaton/relaton-
|
118
|
+
homepage: https://github.com/relaton/relaton-3gpp
|
217
119
|
licenses:
|
218
120
|
- BSD-2-Clause
|
219
121
|
metadata:
|
220
|
-
homepage_uri: https://github.com/relaton/relaton-
|
122
|
+
homepage_uri: https://github.com/relaton/relaton-3gpp
|
221
123
|
post_install_message:
|
222
124
|
rdoc_options: []
|
223
125
|
require_paths:
|
@@ -226,15 +128,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
226
128
|
requirements:
|
227
129
|
- - ">="
|
228
130
|
- !ruby/object:Gem::Version
|
229
|
-
version: 2.
|
131
|
+
version: 2.7.0
|
230
132
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
231
133
|
requirements:
|
232
134
|
- - ">="
|
233
135
|
- !ruby/object:Gem::Version
|
234
136
|
version: '0'
|
235
137
|
requirements: []
|
236
|
-
rubygems_version: 3.
|
138
|
+
rubygems_version: 3.3.26
|
237
139
|
signing_key:
|
238
140
|
specification_version: 4
|
239
|
-
summary: '
|
141
|
+
summary: 'Relaton3gpp: Ruby XMLDOC impementation.'
|
240
142
|
test_files: []
|