grpc 1.0.1-universal-darwin → 1.1.2-universal-darwin

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of grpc might be problematic. Click here for more details.

Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/etc/roots.pem +39 -111
  3. data/src/ruby/ext/grpc/extconf.rb +0 -1
  4. data/src/ruby/ext/grpc/rb_byte_buffer.c +8 -7
  5. data/src/ruby/ext/grpc/rb_call.c +15 -5
  6. data/src/ruby/ext/grpc/rb_channel.c +1 -1
  7. data/src/ruby/ext/grpc/rb_compression_options.c +466 -0
  8. data/src/ruby/ext/grpc/rb_compression_options.h +44 -0
  9. data/src/ruby/ext/grpc/rb_grpc.c +3 -1
  10. data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +198 -190
  11. data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +306 -294
  12. data/src/ruby/ext/grpc/rb_server.c +18 -12
  13. data/src/ruby/lib/grpc/2.0/grpc_c.bundle +0 -0
  14. data/src/ruby/lib/grpc/2.1/grpc_c.bundle +0 -0
  15. data/src/ruby/lib/grpc/2.2/grpc_c.bundle +0 -0
  16. data/src/ruby/lib/grpc/2.3/grpc_c.bundle +0 -0
  17. data/src/ruby/lib/grpc/2.4/grpc_c.bundle +0 -0
  18. data/src/ruby/lib/grpc/errors.rb +154 -2
  19. data/src/ruby/lib/grpc/generic/active_call.rb +144 -63
  20. data/src/ruby/lib/grpc/generic/bidi_call.rb +18 -2
  21. data/src/ruby/lib/grpc/generic/client_stub.rb +7 -5
  22. data/src/ruby/lib/grpc/generic/rpc_desc.rb +39 -13
  23. data/src/ruby/lib/grpc/generic/rpc_server.rb +51 -24
  24. data/src/ruby/lib/grpc/generic/service.rb +3 -2
  25. data/src/ruby/lib/grpc/version.rb +1 -1
  26. data/src/ruby/pb/grpc/health/checker.rb +3 -1
  27. data/src/ruby/pb/src/proto/grpc/testing/test_services_pb.rb +7 -0
  28. data/src/ruby/pb/test/client.rb +307 -7
  29. data/src/ruby/pb/test/server.rb +26 -1
  30. data/src/ruby/spec/compression_options_spec.rb +164 -0
  31. data/src/ruby/spec/error_sanity_spec.rb +64 -0
  32. data/src/ruby/spec/generic/active_call_spec.rb +290 -12
  33. data/src/ruby/spec/generic/client_stub_spec.rb +91 -41
  34. data/src/ruby/spec/generic/rpc_desc_spec.rb +36 -16
  35. data/src/ruby/spec/generic/rpc_server_pool_spec.rb +22 -28
  36. data/src/ruby/spec/generic/rpc_server_spec.rb +6 -6
  37. data/src/ruby/spec/pb/health/checker_spec.rb +27 -19
  38. data/src/ruby/spec/spec_helper.rb +2 -0
  39. metadata +18 -8
@@ -97,15 +97,17 @@ describe Grpc::Health::Checker do
97
97
 
98
98
  context 'initialization' do
99
99
  it 'can be constructed with no args' do
100
- expect(subject).to_not be(nil)
100
+ checker = Grpc::Health::Checker.new
101
+ expect(checker).to_not be(nil)
101
102
  end
102
103
  end
103
104
 
104
105
  context 'method `add_status` and `check`' do
105
106
  success_tests.each do |t|
106
107
  it "should succeed when #{t[:desc]}" do
107
- subject.add_status(t[:service], ServingStatus::NOT_SERVING)
108
- got = subject.check(HCReq.new(service: t[:service]), nil)
108
+ checker = Grpc::Health::Checker.new
109
+ checker.add_status(t[:service], ServingStatus::NOT_SERVING)
110
+ got = checker.check(HCReq.new(service: t[:service]), nil)
109
111
  want = HCResp.new(status: ServingStatus::NOT_SERVING)
110
112
  expect(got).to eq(want)
111
113
  end
@@ -115,11 +117,12 @@ describe Grpc::Health::Checker do
115
117
  context 'method `check`' do
116
118
  success_tests.each do |t|
117
119
  it "should fail with NOT_FOUND when #{t[:desc]}" do
120
+ checker = Grpc::Health::Checker.new
118
121
  blk = proc do
119
- subject.check(HCReq.new(service: t[:service]), nil)
122
+ checker.check(HCReq.new(service: t[:service]), nil)
120
123
  end
121
124
  expected_msg = /#{StatusCodes::NOT_FOUND}/
122
- expect(&blk).to raise_error GRPC::BadStatus, expected_msg
125
+ expect(&blk).to raise_error GRPC::NotFound, expected_msg
123
126
  end
124
127
  end
125
128
  end
@@ -127,38 +130,40 @@ describe Grpc::Health::Checker do
127
130
  context 'method `clear_status`' do
128
131
  success_tests.each do |t|
129
132
  it "should fail after clearing status when #{t[:desc]}" do
130
- subject.add_status(t[:service], ServingStatus::NOT_SERVING)
131
- got = subject.check(HCReq.new(service: t[:service]), nil)
133
+ checker = Grpc::Health::Checker.new
134
+ checker.add_status(t[:service], ServingStatus::NOT_SERVING)
135
+ got = checker.check(HCReq.new(service: t[:service]), nil)
132
136
  want = HCResp.new(status: ServingStatus::NOT_SERVING)
133
137
  expect(got).to eq(want)
134
138
 
135
- subject.clear_status(t[:service])
139
+ checker.clear_status(t[:service])
136
140
  blk = proc do
137
- subject.check(HCReq.new(service: t[:service]), nil)
141
+ checker.check(HCReq.new(service: t[:service]), nil)
138
142
  end
139
143
  expected_msg = /#{StatusCodes::NOT_FOUND}/
140
- expect(&blk).to raise_error GRPC::BadStatus, expected_msg
144
+ expect(&blk).to raise_error GRPC::NotFound, expected_msg
141
145
  end
142
146
  end
143
147
  end
144
148
 
145
149
  context 'method `clear_all`' do
146
150
  it 'should return NOT_FOUND after being invoked' do
151
+ checker = Grpc::Health::Checker.new
147
152
  success_tests.each do |t|
148
- subject.add_status(t[:service], ServingStatus::NOT_SERVING)
149
- got = subject.check(HCReq.new(service: t[:service]), nil)
153
+ checker.add_status(t[:service], ServingStatus::NOT_SERVING)
154
+ got = checker.check(HCReq.new(service: t[:service]), nil)
150
155
  want = HCResp.new(status: ServingStatus::NOT_SERVING)
151
156
  expect(got).to eq(want)
152
157
  end
153
158
 
154
- subject.clear_all
159
+ checker.clear_all
155
160
 
156
161
  success_tests.each do |t|
157
162
  blk = proc do
158
- subject.check(HCReq.new(service: t[:service]), nil)
163
+ checker.check(HCReq.new(service: t[:service]), nil)
159
164
  end
160
165
  expected_msg = /#{StatusCodes::NOT_FOUND}/
161
- expect(&blk).to raise_error GRPC::BadStatus, expected_msg
166
+ expect(&blk).to raise_error GRPC::NotFound, expected_msg
162
167
  end
163
168
  end
164
169
  end
@@ -184,8 +189,10 @@ describe Grpc::Health::Checker do
184
189
  end
185
190
 
186
191
  it 'should receive the correct status', server: true do
187
- @srv.handle(subject)
188
- subject.add_status('', ServingStatus::NOT_SERVING)
192
+ Thread.abort_on_exception = true
193
+ checker = Grpc::Health::Checker.new
194
+ @srv.handle(checker)
195
+ checker.add_status('', ServingStatus::NOT_SERVING)
189
196
  t = Thread.new { @srv.run }
190
197
  @srv.wait_till_running
191
198
 
@@ -198,7 +205,8 @@ describe Grpc::Health::Checker do
198
205
  end
199
206
 
200
207
  it 'should fail on unknown services', server: true do
201
- @srv.handle(subject)
208
+ checker = Grpc::Health::Checker.new
209
+ @srv.handle(checker)
202
210
  t = Thread.new { @srv.run }
203
211
  @srv.wait_till_running
204
212
  blk = proc do
@@ -206,7 +214,7 @@ describe Grpc::Health::Checker do
206
214
  stub.check(HCReq.new(service: 'unknown'))
207
215
  end
208
216
  expected_msg = /#{StatusCodes::NOT_FOUND}/
209
- expect(&blk).to raise_error GRPC::BadStatus, expected_msg
217
+ expect(&blk).to raise_error GRPC::NotFound, expected_msg
210
218
  @srv.stop
211
219
  t.join
212
220
  end
@@ -67,3 +67,5 @@ RSpec.configure do |config|
67
67
  end
68
68
 
69
69
  RSpec::Expectations.configuration.warn_about_potential_false_positives = false
70
+
71
+ Thread.abort_on_exception = true
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grpc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.2
5
5
  platform: universal-darwin
6
6
  authors:
7
7
  - gRPC Authors
8
8
  autorequire:
9
9
  bindir: src/ruby/bin
10
10
  cert_chain: []
11
- date: 2016-10-27 00:00:00.000000000 Z
11
+ date: 2017-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-protobuf
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 3.0.2
19
+ version: '3.1'
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: 3.0.2
26
+ version: '3.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: googleauth
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -114,14 +114,14 @@ dependencies:
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '0.9'
117
+ version: '1.0'
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.9'
124
+ version: '1.0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rake-compiler-dock
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -212,6 +212,8 @@ files:
212
212
  - src/ruby/ext/grpc/rb_channel_credentials.h
213
213
  - src/ruby/ext/grpc/rb_completion_queue.c
214
214
  - src/ruby/ext/grpc/rb_completion_queue.h
215
+ - src/ruby/ext/grpc/rb_compression_options.c
216
+ - src/ruby/ext/grpc/rb_compression_options.h
215
217
  - src/ruby/ext/grpc/rb_event_thread.c
216
218
  - src/ruby/ext/grpc/rb_event_thread.h
217
219
  - src/ruby/ext/grpc/rb_grpc.c
@@ -229,6 +231,7 @@ files:
229
231
  - src/ruby/lib/grpc/2.1/grpc_c.bundle
230
232
  - src/ruby/lib/grpc/2.2/grpc_c.bundle
231
233
  - src/ruby/lib/grpc/2.3/grpc_c.bundle
234
+ - src/ruby/lib/grpc/2.4/grpc_c.bundle
232
235
  - src/ruby/lib/grpc/core/time_consts.rb
233
236
  - src/ruby/lib/grpc/errors.rb
234
237
  - src/ruby/lib/grpc/generic/active_call.rb
@@ -260,6 +263,8 @@ files:
260
263
  - src/ruby/spec/channel_credentials_spec.rb
261
264
  - src/ruby/spec/channel_spec.rb
262
265
  - src/ruby/spec/client_server_spec.rb
266
+ - src/ruby/spec/compression_options_spec.rb
267
+ - src/ruby/spec/error_sanity_spec.rb
263
268
  - src/ruby/spec/generic/active_call_spec.rb
264
269
  - src/ruby/spec/generic/client_stub_spec.rb
265
270
  - src/ruby/spec/generic/rpc_desc_spec.rb
@@ -290,7 +295,10 @@ required_ruby_version: !ruby/object:Gem::Requirement
290
295
  requirements:
291
296
  - - ">="
292
297
  - !ruby/object:Gem::Version
293
- version: 2.0.0
298
+ version: '2.0'
299
+ - - "<"
300
+ - !ruby/object:Gem::Version
301
+ version: '2.5'
294
302
  required_rubygems_version: !ruby/object:Gem::Requirement
295
303
  requirements:
296
304
  - - ">="
@@ -298,7 +306,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
298
306
  version: '0'
299
307
  requirements: []
300
308
  rubyforge_project:
301
- rubygems_version: 2.6.7
309
+ rubygems_version: 2.6.10
302
310
  signing_key:
303
311
  specification_version: 4
304
312
  summary: GRPC system in Ruby
@@ -308,6 +316,8 @@ test_files:
308
316
  - src/ruby/spec/channel_credentials_spec.rb
309
317
  - src/ruby/spec/channel_spec.rb
310
318
  - src/ruby/spec/client_server_spec.rb
319
+ - src/ruby/spec/compression_options_spec.rb
320
+ - src/ruby/spec/error_sanity_spec.rb
311
321
  - src/ruby/spec/generic/active_call_spec.rb
312
322
  - src/ruby/spec/generic/client_stub_spec.rb
313
323
  - src/ruby/spec/generic/rpc_desc_spec.rb