grpcx 0.3.1 → 0.3.3

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: c1a29ef56f02c4f3c6b9e5619371f91323bf4936c68f005b5d5ff4a4e1d5ade2
4
- data.tar.gz: e397ccb4be91b3d9b7fadba057d2882cdbe7b0bebe6e9d5039daf1b76331cea6
3
+ metadata.gz: 75e3047e483e79cbc6aad9290d8b7f502dbf7b4ab562a5826ffa0d1ec8c4c471
4
+ data.tar.gz: 39a32bc32c1f946e45a759bf362b57fbd42172dcec1e7fb0076ec4f78a7de0de
5
5
  SHA512:
6
- metadata.gz: 1f5791ed4d2a2ea9c12a140422635a50635adaaa3677cc52deaff74c38e48115569ba6f3ba34bb6efdaa1bbd7bb3aad6fdfa095ef82734b0404de969f1376aef
7
- data.tar.gz: 22dbbb57b6a72bb376afd1709645dce56a765eb2ac75ebe796277561ed9622644637e3c74950a464f6a6ede49bd10dd92d72f5da958488cdfeaa6e362c62822c
6
+ metadata.gz: 0dd0fef2128a38e6c4d19143fa9425e68584f48987badab945f4cfb8bd7a9e917e361e96317f3baf0a0b9dc2a1335df35072966a016b5430103f6cdffc6a1161
7
+ data.tar.gz: 85857f27c9e7be71ac994e2546d34fd748d819a7062dc615b9502faeab07940461f8e2e518a55557178c858499655cc21e5ff99b60b32489c219239a7caa374d
@@ -11,9 +11,9 @@ jobs:
11
11
  runs-on: ubuntu-latest
12
12
  strategy:
13
13
  matrix:
14
- ruby-version: ["2.5", "2.6", "2.7", "3.0"]
14
+ ruby-version: ["2.7", "3.0", "3.1", "3.2"]
15
15
  steps:
16
- - uses: actions/checkout@v2
16
+ - uses: actions/checkout@v3
17
17
  - uses: ruby/setup-ruby@v1
18
18
  with:
19
19
  ruby-version: ${{ matrix.ruby-version }}
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
1
  .rubocop-*
2
2
  .rake_tasks~
3
3
  pkg/
4
+ *~
data/.rubocop.yml CHANGED
@@ -6,7 +6,7 @@ inherit_mode:
6
6
  - Exclude
7
7
 
8
8
  AllCops:
9
- TargetRubyVersion: "2.5"
9
+ TargetRubyVersion: "2.7"
10
10
 
11
11
  RSpec/FilePath:
12
12
  Enabled: false
data/Gemfile CHANGED
@@ -1,2 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
  gemspec
3
+
4
+ gem 'activerecord'
5
+ gem 'rake'
6
+ gem 'rspec'
7
+ gem 'rubocop-bsm'
data/Gemfile.lock CHANGED
@@ -1,91 +1,87 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- grpcx (0.3.1)
4
+ grpcx (0.3.3)
5
5
  activesupport (>= 5.0)
6
6
  grpc (>= 1.8.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activemodel (6.1.3.1)
12
- activesupport (= 6.1.3.1)
13
- activerecord (6.1.3.1)
14
- activemodel (= 6.1.3.1)
15
- activesupport (= 6.1.3.1)
16
- activesupport (6.1.3.1)
11
+ activemodel (7.0.4.2)
12
+ activesupport (= 7.0.4.2)
13
+ activerecord (7.0.4.2)
14
+ activemodel (= 7.0.4.2)
15
+ activesupport (= 7.0.4.2)
16
+ activesupport (7.0.4.2)
17
17
  concurrent-ruby (~> 1.0, >= 1.0.2)
18
18
  i18n (>= 1.6, < 2)
19
19
  minitest (>= 5.1)
20
20
  tzinfo (~> 2.0)
21
- zeitwerk (~> 2.3)
22
21
  ast (2.4.2)
23
- concurrent-ruby (1.1.8)
24
- diff-lcs (1.4.4)
25
- google-protobuf (3.15.8)
26
- googleapis-common-protos-types (1.0.6)
22
+ concurrent-ruby (1.2.0)
23
+ diff-lcs (1.5.0)
24
+ google-protobuf (3.21.12)
25
+ googleapis-common-protos-types (1.5.0)
27
26
  google-protobuf (~> 3.14)
28
- grpc (1.37.1)
29
- google-protobuf (~> 3.15)
27
+ grpc (1.52.0)
28
+ google-protobuf (~> 3.21)
30
29
  googleapis-common-protos-types (~> 1.0)
31
- i18n (1.8.10)
30
+ i18n (1.12.0)
32
31
  concurrent-ruby (~> 1.0)
33
- minitest (5.14.4)
34
- parallel (1.20.1)
35
- parser (3.0.1.1)
32
+ json (2.6.3)
33
+ minitest (5.17.0)
34
+ parallel (1.22.1)
35
+ parser (3.2.0.0)
36
36
  ast (~> 2.4.1)
37
- rack (2.2.3)
38
- rainbow (3.0.0)
39
- rake (13.0.3)
40
- regexp_parser (2.1.1)
37
+ rainbow (3.1.1)
38
+ rake (13.0.6)
39
+ regexp_parser (2.6.2)
41
40
  rexml (3.2.5)
42
- rspec (3.10.0)
43
- rspec-core (~> 3.10.0)
44
- rspec-expectations (~> 3.10.0)
45
- rspec-mocks (~> 3.10.0)
46
- rspec-core (3.10.1)
47
- rspec-support (~> 3.10.0)
48
- rspec-expectations (3.10.1)
41
+ rspec (3.12.0)
42
+ rspec-core (~> 3.12.0)
43
+ rspec-expectations (~> 3.12.0)
44
+ rspec-mocks (~> 3.12.0)
45
+ rspec-core (3.12.1)
46
+ rspec-support (~> 3.12.0)
47
+ rspec-expectations (3.12.2)
49
48
  diff-lcs (>= 1.2.0, < 2.0)
50
- rspec-support (~> 3.10.0)
51
- rspec-mocks (3.10.2)
49
+ rspec-support (~> 3.12.0)
50
+ rspec-mocks (3.12.3)
52
51
  diff-lcs (>= 1.2.0, < 2.0)
53
- rspec-support (~> 3.10.0)
54
- rspec-support (3.10.2)
55
- rubocop (1.13.0)
52
+ rspec-support (~> 3.12.0)
53
+ rspec-support (3.12.0)
54
+ rubocop (1.44.1)
55
+ json (~> 2.3)
56
56
  parallel (~> 1.10)
57
- parser (>= 3.0.0.0)
57
+ parser (>= 3.2.0.0)
58
58
  rainbow (>= 2.2.2, < 4.0)
59
59
  regexp_parser (>= 1.8, < 3.0)
60
- rexml
61
- rubocop-ast (>= 1.2.0, < 2.0)
60
+ rexml (>= 3.2.5, < 4.0)
61
+ rubocop-ast (>= 1.24.1, < 2.0)
62
62
  ruby-progressbar (~> 1.7)
63
- unicode-display_width (>= 1.4.0, < 3.0)
64
- rubocop-ast (1.5.0)
65
- parser (>= 3.0.1.1)
66
- rubocop-bsm (0.5.9)
63
+ unicode-display_width (>= 2.4.0, < 3.0)
64
+ rubocop-ast (1.24.1)
65
+ parser (>= 3.1.1.0)
66
+ rubocop-bsm (0.6.1)
67
67
  rubocop (~> 1.0)
68
68
  rubocop-performance
69
- rubocop-rails
70
69
  rubocop-rake
71
70
  rubocop-rspec
72
- rubocop-performance (1.11.1)
71
+ rubocop-capybara (2.17.0)
72
+ rubocop (~> 1.41)
73
+ rubocop-performance (1.16.0)
73
74
  rubocop (>= 1.7.0, < 2.0)
74
75
  rubocop-ast (>= 0.4.0)
75
- rubocop-rails (2.9.1)
76
- activesupport (>= 4.2.0)
77
- rack (>= 1.1)
78
- rubocop (>= 0.90.0, < 2.0)
79
- rubocop-rake (0.5.1)
80
- rubocop
81
- rubocop-rspec (2.3.0)
76
+ rubocop-rake (0.6.0)
82
77
  rubocop (~> 1.0)
83
- rubocop-ast (>= 1.1.0)
78
+ rubocop-rspec (2.18.1)
79
+ rubocop (~> 1.33)
80
+ rubocop-capybara (~> 2.17)
84
81
  ruby-progressbar (1.11.0)
85
- tzinfo (2.0.4)
82
+ tzinfo (2.0.6)
86
83
  concurrent-ruby (~> 1.0)
87
- unicode-display_width (2.0.0)
88
- zeitwerk (2.4.2)
84
+ unicode-display_width (2.4.2)
89
85
 
90
86
  PLATFORMS
91
87
  ruby
@@ -99,4 +95,4 @@ DEPENDENCIES
99
95
  rubocop-bsm
100
96
 
101
97
  BUNDLED WITH
102
- 2.1.4
98
+ 2.3.16
data/grpcx.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'grpcx'
3
- s.version = '0.3.1'
3
+ s.version = '0.3.3'
4
4
  s.authors = ['Black Square Media Ltd']
5
5
  s.email = ['info@blacksquaremedia.com']
6
6
  s.summary = %(gRPC extensions/helpers)
@@ -9,16 +9,13 @@ Gem::Specification.new do |s|
9
9
  s.license = 'MIT'
10
10
 
11
11
  s.files = `git ls-files -z`.split("\x0").reject {|f| f.match(%r{^spec/}) }
12
- s.test_files = `git ls-files -z -- spec/*`.split("\x0")
13
12
  s.require_paths = ['lib']
14
- s.required_ruby_version = '>= 2.5'
13
+ s.required_ruby_version = '>= 2.7'
15
14
 
16
15
  s.add_dependency 'activesupport', '>= 5.0'
17
16
  s.add_dependency 'grpc', '>= 1.8.0'
18
17
 
19
- s.add_development_dependency 'activerecord'
20
18
  s.add_development_dependency 'bundler'
21
- s.add_development_dependency 'rake'
22
- s.add_development_dependency 'rspec'
23
- s.add_development_dependency 'rubocop-bsm'
19
+
20
+ s.metadata['rubygems_mfa_required'] = 'true'
24
21
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grpcx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Black Square Media Ltd
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-04 00:00:00.000000000 Z
11
+ date: 2023-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -38,20 +38,6 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: 1.8.0
41
- - !ruby/object:Gem::Dependency
42
- name: activerecord
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: bundler
57
43
  requirement: !ruby/object:Gem::Requirement
@@ -66,48 +52,6 @@ dependencies:
66
52
  - - ">="
67
53
  - !ruby/object:Gem::Version
68
54
  version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: rake
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: rspec
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
- - !ruby/object:Gem::Dependency
98
- name: rubocop-bsm
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '0'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: '0'
111
55
  description: ''
112
56
  email:
113
57
  - info@blacksquaremedia.com
@@ -131,13 +75,11 @@ files:
131
75
  - lib/grpcx/server/interceptors/active_record.rb
132
76
  - lib/grpcx/server/interceptors/instrumentation.rb
133
77
  - lib/grpcx/server/interceptors/rescue.rb
134
- - spec/lib/entity_spec.rb
135
- - spec/lib/server_spec.rb
136
- - spec/spec_helper.rb
137
78
  homepage: https://github.com/bsm/grpcx
138
79
  licenses:
139
80
  - MIT
140
- metadata: {}
81
+ metadata:
82
+ rubygems_mfa_required: 'true'
141
83
  post_install_message:
142
84
  rdoc_options: []
143
85
  require_paths:
@@ -146,18 +88,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
146
88
  requirements:
147
89
  - - ">="
148
90
  - !ruby/object:Gem::Version
149
- version: '2.5'
91
+ version: '2.7'
150
92
  required_rubygems_version: !ruby/object:Gem::Requirement
151
93
  requirements:
152
94
  - - ">="
153
95
  - !ruby/object:Gem::Version
154
96
  version: '0'
155
97
  requirements: []
156
- rubygems_version: 3.1.4
98
+ rubygems_version: 3.4.6
157
99
  signing_key:
158
100
  specification_version: 4
159
101
  summary: gRPC extensions/helpers
160
- test_files:
161
- - spec/lib/entity_spec.rb
162
- - spec/lib/server_spec.rb
163
- - spec/spec_helper.rb
102
+ test_files: []
@@ -1,24 +0,0 @@
1
- require 'spec_helper'
2
-
3
- RSpec.describe Grpcx::Entity do
4
- it 'builds messages' do
5
- msg = described_class.build Grpcx::Spec::Message,
6
- name: 'Name',
7
- version: 1,
8
- types: {
9
- num: 8,
10
- truth: [1, 0, true, 'true'],
11
- decimal: '1.2',
12
- }
13
-
14
- expect(msg.to_h).to eq(
15
- name: 'Name',
16
- version: :V1,
17
- types: {
18
- num: 8,
19
- truth: [true, false, true, true],
20
- decimal: 1.2,
21
- },
22
- )
23
- end
24
- end
@@ -1,33 +0,0 @@
1
- require 'spec_helper'
2
-
3
- RSpec.describe Grpcx::Server do
4
- subject do
5
- s = Grpcx::Spec::Server.new
6
- s.handle Grpcx::Spec::Service::V1
7
- s
8
- end
9
-
10
- it 'has a health-check' do
11
- expect(subject.health).to be_a(Grpc::Health::Checker)
12
- expect(subject.health.instance_variable_get(:@statuses)).to eq(
13
- 'grpcx.spec.service.V1' => 1,
14
- 'grpc.health.v1.Health' => 1,
15
- )
16
- end
17
-
18
- it 'has interceptors' do
19
- expect(subject.interceptors).to be_a(GRPC::InterceptorRegistry)
20
-
21
- registered = subject.interceptors.instance_variable_get(:@interceptors)
22
- expect(registered.size).to eq(3)
23
- end
24
-
25
- it 'has rescue handlers' do
26
- expect(subject.rescue_handlers.size).to eq(3)
27
- expect(subject.rescue_handlers.map(&:first)).to match_array %w[
28
- ActiveRecord::RecordInvalid
29
- ActiveRecord::RecordNotFound
30
- ArgumentError
31
- ]
32
- end
33
- end
data/spec/spec_helper.rb DELETED
@@ -1,53 +0,0 @@
1
- require 'rspec'
2
- require 'grpcx'
3
- require 'active_record'
4
- require 'google/protobuf'
5
-
6
- Google::Protobuf::DescriptorPool.generated_pool.build do
7
- add_message 'grpcx.spec.Message' do
8
- optional :name, :string, 1
9
- optional :version, :enum, 2, 'grpcx.spec.Version'
10
- optional :types, :message, 3, 'grpcx.spec.Types'
11
- end
12
- add_message 'grpcx.spec.Types' do
13
- optional :num, :int64, 1
14
- repeated :truth, :bool, 2
15
- optional :decimal, :double, 3
16
- end
17
- add_enum 'grpcx.spec.Version' do
18
- value :V0, 0
19
- value :V1, 1
20
- value :V2, 2
21
- end
22
- add_message 'grpcx.spec.GetMessageRequest' do
23
- end
24
- end
25
-
26
- module Grpcx::Spec
27
- Message = Google::Protobuf::DescriptorPool.generated_pool.lookup('grpcx.spec.Message').msgclass
28
- Version = Google::Protobuf::DescriptorPool.generated_pool.lookup('grpcx.spec.Version').enummodule
29
- Types = Google::Protobuf::DescriptorPool.generated_pool.lookup('grpcx.spec.Types').msgclass
30
- GetMessageRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup('grpcx.spec.GetMessageRequest').msgclass
31
-
32
- module Service
33
- class V1
34
- include GRPC::GenericService
35
-
36
- self.marshal_class_method = :encode
37
- self.unmarshal_class_method = :decode
38
- self.service_name = 'grpcx.spec.service.V1'
39
-
40
- rpc :GetMessage, GetMessageRequest, Message
41
- end
42
-
43
- Stub = V1.rpc_stub_class
44
- end
45
-
46
- class Server < GRPC::RpcServer
47
- include Grpcx::Server
48
-
49
- rescue_from 'ArgumentError' do |e|
50
- raise GRPC::InvalidArgument.new(errors: e.to_s)
51
- end
52
- end
53
- end