osgeo-termbase 0.0.3 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +71 -44
- data/lib/osgeo/termbase/term.rb +24 -3
- data/lib/osgeo/termbase/version.rb +1 -1
- data/osgeo-termbase.gemspec +2 -2
- metadata +12 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9f4ed9e79ca3d9827438191d424b1431d428f2991eb96f703fc53a25d9c7840
|
4
|
+
data.tar.gz: eb9be36e8eaa0d23bef4271da50e857a2862974ae6b023ee5c4a739cad47e945
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea314c7183a94e7c76a3e29c65a23a6491541e2f90b0ed83fe10316e423d47a27527ec3007275b874b2da7d4db6a8aa9fb5f860812340039020692151b8d4d41
|
7
|
+
data.tar.gz: '096d933f7afd911e13ab9e8b27c05dad0b9fb48d8fb1024a2a6940d1d3ebd6d88228cb34146b12bbd4d95614fc7589738d2b39c0a48675c005ca0434aadff716'
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
osgeo-termbase (0.0.
|
4
|
+
osgeo-termbase (0.0.3)
|
5
5
|
relaton (~> 0.5)
|
6
6
|
|
7
7
|
GEM
|
@@ -9,86 +9,113 @@ GEM
|
|
9
9
|
specs:
|
10
10
|
addressable (2.7.0)
|
11
11
|
public_suffix (>= 2.0.2, < 5.0)
|
12
|
+
bibtex-ruby (5.1.4)
|
13
|
+
latex-decode (~> 0.0)
|
12
14
|
cnccs (0.1.5)
|
13
15
|
debase (0.2.4.1)
|
14
16
|
debase-ruby_core_source (>= 0.10.2)
|
15
|
-
debase-ruby_core_source (0.10.
|
17
|
+
debase-ruby_core_source (0.10.9)
|
16
18
|
diff-lcs (1.3)
|
17
|
-
|
19
|
+
domain_name (0.5.20190701)
|
20
|
+
unf (>= 0.0.5, < 1.0.0)
|
21
|
+
faraday (1.0.1)
|
18
22
|
multipart-post (>= 1.2, < 3)
|
19
23
|
gb-agencies (0.0.6)
|
24
|
+
http-cookie (1.0.3)
|
25
|
+
domain_name (~> 0.5)
|
26
|
+
iso639 (1.3.2)
|
20
27
|
isoics (0.1.8)
|
28
|
+
latex-decode (0.3.1)
|
21
29
|
mini_portile2 (2.4.0)
|
22
30
|
multipart-post (2.1.1)
|
23
|
-
nokogiri (1.10.
|
31
|
+
nokogiri (1.10.9)
|
24
32
|
mini_portile2 (~> 2.4.0)
|
25
|
-
public_suffix (4.0.
|
26
|
-
rake (
|
27
|
-
relaton (0.
|
28
|
-
relaton-
|
29
|
-
relaton-
|
30
|
-
relaton-
|
31
|
-
relaton-
|
32
|
-
relaton-
|
33
|
-
relaton-
|
34
|
-
relaton-
|
35
|
-
|
33
|
+
public_suffix (4.0.5)
|
34
|
+
rake (13.0.1)
|
35
|
+
relaton (0.11.1)
|
36
|
+
relaton-calconnect (~> 0.7.0)
|
37
|
+
relaton-gb (~> 0.12.0)
|
38
|
+
relaton-iec (~> 0.10.0)
|
39
|
+
relaton-ietf (~> 0.12.0)
|
40
|
+
relaton-iso (~> 0.12.0)
|
41
|
+
relaton-itu (~> 0.9.0)
|
42
|
+
relaton-nist (~> 0.9.0)
|
43
|
+
relaton-ogc (~> 0.7.0)
|
44
|
+
relaton-omg (~> 0.3.0)
|
45
|
+
relaton-un (~> 0.2.0)
|
46
|
+
relaton-w3c (~> 0.1.0)
|
47
|
+
relaton-bib (0.9.2)
|
36
48
|
addressable
|
49
|
+
bibtex-ruby
|
50
|
+
iso639
|
37
51
|
nokogiri
|
38
|
-
relaton-
|
52
|
+
relaton-calconnect (0.7.0)
|
53
|
+
faraday
|
54
|
+
relaton-iso-bib (~> 0.9.0)
|
55
|
+
relaton-gb (0.12.0)
|
39
56
|
cnccs (~> 0.1.1)
|
40
57
|
gb-agencies (~> 0.0.1)
|
41
|
-
relaton-iso-bib (~> 0.
|
42
|
-
relaton-iec (0.
|
58
|
+
relaton-iso-bib (~> 0.9.0)
|
59
|
+
relaton-iec (0.10.0)
|
43
60
|
addressable
|
44
|
-
relaton-iso-bib (~> 0.
|
45
|
-
relaton-ietf (0.
|
46
|
-
relaton-bib (~> 0.
|
47
|
-
relaton-iso (0.
|
48
|
-
relaton-iec (~> 0.
|
49
|
-
relaton-iso-bib (~> 0.
|
50
|
-
relaton-iso-bib (0.
|
61
|
+
relaton-iso-bib (~> 0.9.0)
|
62
|
+
relaton-ietf (0.12.1)
|
63
|
+
relaton-bib (~> 0.9.0)
|
64
|
+
relaton-iso (0.12.1)
|
65
|
+
relaton-iec (~> 0.10.0)
|
66
|
+
relaton-iso-bib (~> 0.9.0)
|
67
|
+
relaton-iso-bib (0.9.2)
|
51
68
|
isoics (~> 0.1.6)
|
52
|
-
relaton-bib (~> 0.
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
relaton-bib (~> 0.3.0)
|
69
|
+
relaton-bib (~> 0.9.0)
|
70
|
+
relaton-itu (0.9.0)
|
71
|
+
relaton-iso-bib (~> 0.9.0)
|
72
|
+
relaton-nist (0.9.1)
|
73
|
+
relaton-bib (~> 0.9.0)
|
58
74
|
rubyzip
|
59
|
-
relaton-ogc (0.
|
75
|
+
relaton-ogc (0.7.3)
|
76
|
+
faraday (~> 1.0.0)
|
77
|
+
relaton-iso-bib (>= 0.9.1)
|
78
|
+
relaton-omg (0.3.0)
|
79
|
+
relaton-bib (~> 0.9.0)
|
80
|
+
relaton-un (0.2.1)
|
60
81
|
faraday
|
61
|
-
|
82
|
+
http-cookie
|
83
|
+
relaton-iso-bib (>= 0.9.2)
|
84
|
+
unf_ext (>= 0.0.7.7)
|
85
|
+
relaton-w3c (0.1.0)
|
86
|
+
relaton-bib (>= 0.9.2)
|
62
87
|
rspec (3.9.0)
|
63
88
|
rspec-core (~> 3.9.0)
|
64
89
|
rspec-expectations (~> 3.9.0)
|
65
90
|
rspec-mocks (~> 3.9.0)
|
66
|
-
rspec-core (3.9.
|
67
|
-
rspec-support (~> 3.9.
|
68
|
-
rspec-expectations (3.9.
|
91
|
+
rspec-core (3.9.2)
|
92
|
+
rspec-support (~> 3.9.3)
|
93
|
+
rspec-expectations (3.9.2)
|
69
94
|
diff-lcs (>= 1.2.0, < 2.0)
|
70
95
|
rspec-support (~> 3.9.0)
|
71
|
-
rspec-mocks (3.9.
|
96
|
+
rspec-mocks (3.9.1)
|
72
97
|
diff-lcs (>= 1.2.0, < 2.0)
|
73
98
|
rspec-support (~> 3.9.0)
|
74
|
-
rspec-support (3.9.
|
75
|
-
ruby-debug-ide (0.7.
|
99
|
+
rspec-support (3.9.3)
|
100
|
+
ruby-debug-ide (0.7.2)
|
76
101
|
rake (>= 0.8.1)
|
77
|
-
|
78
|
-
rubyzip (2.0.0)
|
102
|
+
rubyzip (2.3.0)
|
79
103
|
tsv (1.0.0)
|
104
|
+
unf (0.1.4)
|
105
|
+
unf_ext
|
106
|
+
unf_ext (0.0.7.7)
|
80
107
|
|
81
108
|
PLATFORMS
|
82
109
|
ruby
|
83
110
|
|
84
111
|
DEPENDENCIES
|
85
|
-
bundler (
|
112
|
+
bundler (>= 2.0.1, < 3)
|
86
113
|
debase
|
87
114
|
osgeo-termbase!
|
88
|
-
rake (~>
|
115
|
+
rake (~> 13.0)
|
89
116
|
rspec (~> 3.0)
|
90
117
|
ruby-debug-ide
|
91
118
|
tsv
|
92
119
|
|
93
120
|
BUNDLED WITH
|
94
|
-
2.
|
121
|
+
2.1.4
|
data/lib/osgeo/termbase/term.rb
CHANGED
@@ -2,7 +2,7 @@ module Osgeo::Termbase
|
|
2
2
|
|
3
3
|
class Term
|
4
4
|
|
5
|
-
|
5
|
+
INPUT_ATTRIBS = %i(
|
6
6
|
id
|
7
7
|
term
|
8
8
|
abbrev
|
@@ -35,7 +35,9 @@ class Term
|
|
35
35
|
release
|
36
36
|
)
|
37
37
|
|
38
|
-
|
38
|
+
OUTPUT_ATTRIBS = INPUT_ATTRIBS - %i(term alt classification) + %i(terms)
|
39
|
+
|
40
|
+
attr_accessor *(INPUT_ATTRIBS | OUTPUT_ATTRIBS)
|
39
41
|
|
40
42
|
def initialize(options={})
|
41
43
|
@examples = []
|
@@ -156,7 +158,7 @@ class Term
|
|
156
158
|
end
|
157
159
|
|
158
160
|
def to_hash
|
159
|
-
|
161
|
+
OUTPUT_ATTRIBS.inject({}) do |acc, attrib|
|
160
162
|
value = self.send(attrib)
|
161
163
|
unless value.nil?
|
162
164
|
acc.merge(attrib.to_s => value)
|
@@ -270,6 +272,25 @@ class Term
|
|
270
272
|
release >= 0
|
271
273
|
end
|
272
274
|
|
275
|
+
def terms
|
276
|
+
[primary_term_hash, alt_term_hash].compact
|
277
|
+
end
|
278
|
+
|
279
|
+
def primary_term_hash
|
280
|
+
{
|
281
|
+
"type" => "expression",
|
282
|
+
"designation" => term,
|
283
|
+
"normative_status" => classification,
|
284
|
+
} if term
|
285
|
+
end
|
286
|
+
|
287
|
+
def alt_term_hash
|
288
|
+
{
|
289
|
+
"type" => "expression",
|
290
|
+
"designation" => alt,
|
291
|
+
"normative_status" => classification,
|
292
|
+
} if alt
|
293
|
+
end
|
273
294
|
end
|
274
295
|
|
275
296
|
end
|
data/osgeo-termbase.gemspec
CHANGED
@@ -24,9 +24,9 @@ Gem::Specification.new do |spec|
|
|
24
24
|
|
25
25
|
spec.add_runtime_dependency "relaton", "~> 0.5"
|
26
26
|
|
27
|
-
spec.add_development_dependency "bundler", "
|
27
|
+
spec.add_development_dependency "bundler", ">= 2.0.1", "< 3"
|
28
28
|
spec.add_development_dependency "debase"
|
29
|
-
spec.add_development_dependency "rake", "~>
|
29
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
30
30
|
spec.add_development_dependency "rspec", "~> 3.0"
|
31
31
|
spec.add_development_dependency "ruby-debug-ide"
|
32
32
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: osgeo-termbase
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: relaton
|
@@ -28,16 +28,22 @@ dependencies:
|
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 2.0.1
|
34
|
+
- - "<"
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '3'
|
34
37
|
type: :development
|
35
38
|
prerelease: false
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
37
40
|
requirements:
|
38
|
-
- - "
|
41
|
+
- - ">="
|
39
42
|
- !ruby/object:Gem::Version
|
40
43
|
version: 2.0.1
|
44
|
+
- - "<"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '3'
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: debase
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,14 +64,14 @@ dependencies:
|
|
58
64
|
requirements:
|
59
65
|
- - "~>"
|
60
66
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
67
|
+
version: '13.0'
|
62
68
|
type: :development
|
63
69
|
prerelease: false
|
64
70
|
version_requirements: !ruby/object:Gem::Requirement
|
65
71
|
requirements:
|
66
72
|
- - "~>"
|
67
73
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
74
|
+
version: '13.0'
|
69
75
|
- !ruby/object:Gem::Dependency
|
70
76
|
name: rspec
|
71
77
|
requirement: !ruby/object:Gem::Requirement
|