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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ee60435b3b83e338ef45457f0ac6c809dac4e7b6efad9e96ee9f3ffc66363c76
4
- data.tar.gz: eed51e44fcfe2ee9939e0201ffb768e259acfdbbc60c9701efc5e0ce147c215d
3
+ metadata.gz: 8f71af11a2042ea1bcbb5eb1c38c535fd778f9f9a1d2ce6ffdb33f07b2feacd3
4
+ data.tar.gz: 6d3936a73bfa2da29c646754c46344eee5dcc6cdc60e1e4729f7a321902ce3e4
5
5
  SHA512:
6
- metadata.gz: 3b7183db1c922b54d8d8e44089c011df900c9c9652d1f444eff139478c5dcbf14b01d91c3cbc6c37b8c5e514e2ef616336c76cc7c507773f1526ac0838b1664d
7
- data.tar.gz: 490f323db0aae6c4bc6c6217de1f5eb05747da04c6ee6cfe46ed20c7a7e0aa89d7bf098f499bdea373b185d0de385a0e23caaca8c3d6b61a9af965650b4a03a3
6
+ metadata.gz: 844f7e16ff5ca90d717d5a8f3fbc5ecdae027f9d3790d82e8b80bd0eab6882e51f9a919c84489ce56cc4580d6034f783a62ecbac590232fbceedf6ba2e60aa01
7
+ data.tar.gz: 708de49244b67e9c8c464351e43d649d63fa0cdb052f241d5ad8fd41cf148c0f73977054135faf5779aa5d1e8073b4e9c487e94fa71f2333a9b34e89387cefa7
data/.rubocop.yml CHANGED
@@ -1,5 +1,6 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.5
2
+ TargetRubyVersion: 2.6
3
+ NewCops: disable
3
4
  Exclude:
4
5
  - 'lib/gnparser_pb.rb'
5
6
  - 'lib/gnparser_services_pb.rb'
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.5'
24
- gem.add_dependency 'grpc', '~> 1.15'
25
- gem.add_dependency 'grpc-tools', '~> 1.15'
26
- gem.add_development_dependency 'bundler', '~> 2.0'
27
- gem.add_development_dependency 'byebug', '~> 10.0'
28
- gem.add_development_dependency 'rake', '~> 12.3'
29
- gem.add_development_dependency 'rspec', '~> 3.8'
30
- gem.add_development_dependency 'rubocop', '~> 0.59'
31
- gem.add_development_dependency 'solargraph', '~> 0.38.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
@@ -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.9.0'
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
- def supported_parser(ver_str)
19
- return true if ver_str == PARSER_MIN_VERSION
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 = ver_str[1..-1].split('.')
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
@@ -2,7 +2,7 @@
2
2
 
3
3
  # GNparser is a namespace module for gnparser gem.
4
4
  module GNparser
5
- VERSION = '0.5.0'
5
+ VERSION = '0.14.1'
6
6
 
7
7
  def self.version
8
8
  VERSION
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.5.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-02-18 00:00:00.000000000 Z
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.15'
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.15'
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.15'
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.15'
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.0'
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.0'
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: '10.0'
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: '10.0'
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: '12.3'
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: '12.3'
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.8'
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.8'
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.59'
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.59'
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.38.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.38.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.5'
160
+ version: '2.6'
161
161
  required_rubygems_version: !ruby/object:Gem::Requirement
162
162
  requirements:
163
163
  - - ">="