gnparser 0.5.0 → 0.14.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -1
- data/gnparser.gemspec +9 -9
- data/lib/gnparser/client.rb +8 -8
- data/lib/gnparser/version.rb +1 -1
- data/lib/gnparser_pb.rb +18 -18
- metadata +19 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f71af11a2042ea1bcbb5eb1c38c535fd778f9f9a1d2ce6ffdb33f07b2feacd3
|
4
|
+
data.tar.gz: 6d3936a73bfa2da29c646754c46344eee5dcc6cdc60e1e4729f7a321902ce3e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 844f7e16ff5ca90d717d5a8f3fbc5ecdae027f9d3790d82e8b80bd0eab6882e51f9a919c84489ce56cc4580d6034f783a62ecbac590232fbceedf6ba2e60aa01
|
7
|
+
data.tar.gz: 708de49244b67e9c8c464351e43d649d63fa0cdb052f241d5ad8fd41cf148c0f73977054135faf5779aa5d1e8073b4e9c487e94fa71f2333a9b34e89387cefa7
|
data/.rubocop.yml
CHANGED
data/gnparser.gemspec
CHANGED
@@ -20,13 +20,13 @@ Gem::Specification.new do |gem|
|
|
20
20
|
.reject { |f| f.match(%r{^(test|spec|features)/}) }
|
21
21
|
|
22
22
|
gem.require_paths = ['lib']
|
23
|
-
gem.required_ruby_version = '~> 2.
|
24
|
-
gem.add_dependency 'grpc', '~> 1.
|
25
|
-
gem.add_dependency 'grpc-tools', '~> 1.
|
26
|
-
gem.add_development_dependency 'bundler', '~> 2.
|
27
|
-
gem.add_development_dependency 'byebug', '~>
|
28
|
-
gem.add_development_dependency 'rake', '~>
|
29
|
-
gem.add_development_dependency 'rspec', '~> 3.
|
30
|
-
gem.add_development_dependency 'rubocop', '~> 0.
|
31
|
-
gem.add_development_dependency 'solargraph', '~> 0.
|
23
|
+
gem.required_ruby_version = '~> 2.6'
|
24
|
+
gem.add_dependency 'grpc', '~> 1.28'
|
25
|
+
gem.add_dependency 'grpc-tools', '~> 1.28'
|
26
|
+
gem.add_development_dependency 'bundler', '~> 2.1'
|
27
|
+
gem.add_development_dependency 'byebug', '~> 11.1'
|
28
|
+
gem.add_development_dependency 'rake', '~> 13.0'
|
29
|
+
gem.add_development_dependency 'rspec', '~> 3.9'
|
30
|
+
gem.add_development_dependency 'rubocop', '~> 0.82'
|
31
|
+
gem.add_development_dependency 'solargraph', '~> 0.39'
|
32
32
|
end
|
data/lib/gnparser/client.rb
CHANGED
@@ -3,25 +3,25 @@
|
|
3
3
|
module GNparser
|
4
4
|
# Gnfinder::Client connects to gnfinder server
|
5
5
|
class Client
|
6
|
-
PARSER_MIN_VERSION = 'v0.
|
6
|
+
PARSER_MIN_VERSION = 'v0.14.1'
|
7
7
|
|
8
8
|
def initialize(host = '0.0.0.0', port = '8778')
|
9
9
|
@stub = Pb::GNparser::Stub.new("#{host}:#{port}",
|
10
10
|
:this_channel_is_insecure)
|
11
|
-
return if supported_parser(parser_version.value)
|
11
|
+
return if supported_parser(parser_version.value, PARSER_MIN_VERSION)
|
12
12
|
|
13
13
|
raise 'gRPC server of gnparser should be at least ' \
|
14
14
|
" #{PARSER_MIN_VERSION}.\n Download latest version from " \
|
15
15
|
'https://gitlab/gogna/gnparser/releases. '
|
16
16
|
end
|
17
17
|
|
18
|
-
|
19
|
-
|
18
|
+
# checks if gRPC's gnparser version is compatible
|
19
|
+
def supported_parser(version, min_version)
|
20
|
+
min_ver = min_version[1..].split('.').map(&:to_i)
|
21
|
+
ver = version[1..].split('.').map(&:to_i)
|
22
|
+
return true if ver[0] > min_ver[0] || ver[1] > min_ver[1]
|
20
23
|
|
21
|
-
ver
|
22
|
-
ref = PARSER_MIN_VERSION[1..-1].split('.')
|
23
|
-
return true if ver[0].to_i > ref[0].to_i || ver[1].to_i > ref[1].to_i ||
|
24
|
-
ver[2].to_i > ref[2].to_i
|
24
|
+
return true if ver[2] >= min_ver[2]
|
25
25
|
|
26
26
|
false
|
27
27
|
end
|
data/lib/gnparser/version.rb
CHANGED
data/lib/gnparser_pb.rb
CHANGED
@@ -129,22 +129,22 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
129
129
|
end
|
130
130
|
|
131
131
|
module Pb
|
132
|
-
Version = Google::Protobuf::DescriptorPool.generated_pool.lookup("pb.Version").msgclass
|
133
|
-
Void = Google::Protobuf::DescriptorPool.generated_pool.lookup("pb.Void").msgclass
|
134
|
-
InputArray = Google::Protobuf::DescriptorPool.generated_pool.lookup("pb.InputArray").msgclass
|
135
|
-
OutputArray = Google::Protobuf::DescriptorPool.generated_pool.lookup("pb.OutputArray").msgclass
|
136
|
-
Parsed = Google::Protobuf::DescriptorPool.generated_pool.lookup("pb.Parsed").msgclass
|
137
|
-
HybridFormula = Google::Protobuf::DescriptorPool.generated_pool.lookup("pb.HybridFormula").msgclass
|
138
|
-
Canonical = Google::Protobuf::DescriptorPool.generated_pool.lookup("pb.Canonical").msgclass
|
139
|
-
Position = Google::Protobuf::DescriptorPool.generated_pool.lookup("pb.Position").msgclass
|
140
|
-
QualityWarning = Google::Protobuf::DescriptorPool.generated_pool.lookup("pb.QualityWarning").msgclass
|
141
|
-
Uninomial = Google::Protobuf::DescriptorPool.generated_pool.lookup("pb.Uninomial").msgclass
|
142
|
-
Species = Google::Protobuf::DescriptorPool.generated_pool.lookup("pb.Species").msgclass
|
143
|
-
InfraSpecies = Google::Protobuf::DescriptorPool.generated_pool.lookup("pb.InfraSpecies").msgclass
|
144
|
-
Comparison = Google::Protobuf::DescriptorPool.generated_pool.lookup("pb.Comparison").msgclass
|
145
|
-
Approximation = Google::Protobuf::DescriptorPool.generated_pool.lookup("pb.Approximation").msgclass
|
146
|
-
Authorship = Google::Protobuf::DescriptorPool.generated_pool.lookup("pb.Authorship").msgclass
|
147
|
-
AuthGroup = Google::Protobuf::DescriptorPool.generated_pool.lookup("pb.AuthGroup").msgclass
|
148
|
-
Authors = Google::Protobuf::DescriptorPool.generated_pool.lookup("pb.Authors").msgclass
|
149
|
-
NameType = Google::Protobuf::DescriptorPool.generated_pool.lookup("pb.NameType").enummodule
|
132
|
+
Version = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pb.Version").msgclass
|
133
|
+
Void = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pb.Void").msgclass
|
134
|
+
InputArray = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pb.InputArray").msgclass
|
135
|
+
OutputArray = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pb.OutputArray").msgclass
|
136
|
+
Parsed = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pb.Parsed").msgclass
|
137
|
+
HybridFormula = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pb.HybridFormula").msgclass
|
138
|
+
Canonical = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pb.Canonical").msgclass
|
139
|
+
Position = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pb.Position").msgclass
|
140
|
+
QualityWarning = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pb.QualityWarning").msgclass
|
141
|
+
Uninomial = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pb.Uninomial").msgclass
|
142
|
+
Species = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pb.Species").msgclass
|
143
|
+
InfraSpecies = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pb.InfraSpecies").msgclass
|
144
|
+
Comparison = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pb.Comparison").msgclass
|
145
|
+
Approximation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pb.Approximation").msgclass
|
146
|
+
Authorship = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pb.Authorship").msgclass
|
147
|
+
AuthGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pb.AuthGroup").msgclass
|
148
|
+
Authors = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pb.Authors").msgclass
|
149
|
+
NameType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pb.NameType").enummodule
|
150
150
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gnparser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.14.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitry Mozzherin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: grpc
|
@@ -16,112 +16,112 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.28'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1.
|
26
|
+
version: '1.28'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: grpc-tools
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '1.
|
33
|
+
version: '1.28'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '1.
|
40
|
+
version: '1.28'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '2.
|
47
|
+
version: '2.1'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '2.
|
54
|
+
version: '2.1'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: byebug
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '11.1'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '11.1'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rake
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '13.0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '13.0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rspec
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '3.
|
89
|
+
version: '3.9'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '3.
|
96
|
+
version: '3.9'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rubocop
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '0.
|
103
|
+
version: '0.82'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '0.
|
110
|
+
version: '0.82'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: solargraph
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 0.
|
117
|
+
version: '0.39'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 0.
|
124
|
+
version: '0.39'
|
125
125
|
description: |-
|
126
126
|
The gem parses scientific names into semantic elements
|
127
127
|
using gRPC of gnparser app written in Go.
|
@@ -157,7 +157,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
157
157
|
requirements:
|
158
158
|
- - "~>"
|
159
159
|
- !ruby/object:Gem::Version
|
160
|
-
version: '2.
|
160
|
+
version: '2.6'
|
161
161
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
162
162
|
requirements:
|
163
163
|
- - ">="
|