grpc 1.0.0-universal-darwin → 1.0.1.pre1-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.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e07c99819c80986c23436ed3d3d519228a61b76a
4
- data.tar.gz: 185464167b1e96aa41c8ffadeca2d01c249f5723
3
+ metadata.gz: 47d6d3b126c190bd6513daf28af4517e57bc97ba
4
+ data.tar.gz: 301bf864ea924f1884e38edf4ec744e6f096a453
5
5
  SHA512:
6
- metadata.gz: 8ca4b371c657c4816691a8cbae227fa61bc5dc95a1b79d9d6643b369e1d64906a6a6511b2e714b4474c4ba28b0bb9cca706d0439e30d24909363e431e7330b89
7
- data.tar.gz: 1cccc9b1911dd4ab294d40c1aa31996d8ad0f876f265c313dd59f747816e8aba68a420fb0493534f8c51d03d366fc061d09668495472f12906f179f8dd8de69d
6
+ metadata.gz: c398b170e8416ef8cd282a11a4f199cda74eb0025a7749ed4133e6f1866a0b5fb0a5b1ea6ceceecf0dda65f9bf0d0e6e98d66513d4f48cdc89a578a14bc4ef22
7
+ data.tar.gz: f6a1b15c173315dd7fb7e17a8a156a1755dc2075e764dbd8da42e683acc58729641c90a780bc76315908d8c2289721d85fc054aa1808c36bcd0ff7b42a4dee10
@@ -91,6 +91,10 @@ if grpc_config == 'gcov'
91
91
  $LDFLAGS << ' -fprofile-arcs -ftest-coverage -rdynamic'
92
92
  end
93
93
 
94
+ if grpc_config == 'dbg'
95
+ $CFLAGS << ' -O0'
96
+ end
97
+
94
98
  $LDFLAGS << ' -Wl,-wrap,memcpy' if RUBY_PLATFORM =~ /linux/
95
99
  $LDFLAGS << ' -static' if windows
96
100
 
Binary file
Binary file
Binary file
Binary file
@@ -188,7 +188,6 @@ module GRPC
188
188
  # marshalled.
189
189
  def remote_send(req, marshalled = false)
190
190
  # TODO(murgatroid99): ensure metadata was sent
191
- GRPC.logger.debug("sending #{req}, marshalled? #{marshalled}")
192
191
  payload = marshalled ? req : @marshal.call(req)
193
192
  @call.run_batch(SEND_MESSAGE => payload)
194
193
  end
@@ -225,11 +224,8 @@ module GRPC
225
224
  @call.metadata = batch_result.metadata
226
225
  @metadata_received = true
227
226
  end
228
- GRPC.logger.debug("received req: #{batch_result}")
229
227
  unless batch_result.nil? || batch_result.message.nil?
230
- GRPC.logger.debug("received req.to_s: #{batch_result.message}")
231
228
  res = @unmarshal.call(batch_result.message)
232
- GRPC.logger.debug("received_req (unmarshalled): #{res.inspect}")
233
229
  return res
234
230
  end
235
231
  GRPC.logger.debug('found nil; the final response has been sent')
@@ -391,7 +391,6 @@ module GRPC
391
391
 
392
392
  # allow the metadata to be accessed from the call
393
393
  an_rpc.call.metadata = an_rpc.metadata # attaches md to call for handlers
394
- GRPC.logger.debug("call md is #{an_rpc.metadata}")
395
394
  connect_md = nil
396
395
  unless @connect_md_proc.nil?
397
396
  connect_md = @connect_md_proc.call(an_rpc.method, an_rpc.metadata)
@@ -28,7 +28,12 @@
28
28
  # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
29
 
30
30
  begin
31
- require_relative "#{RUBY_VERSION.sub(/\.\d$/, '')}/grpc_c"
32
- rescue LoadError
33
- require_relative 'grpc_c'
31
+ ruby_version_dirname = /(\d+\.\d+)/.match(RUBY_VERSION).to_s
32
+ distrib_lib_dir = File.expand_path(ruby_version_dirname,
33
+ File.dirname(__FILE__))
34
+ if File.directory?(distrib_lib_dir)
35
+ require_relative "#{distrib_lib_dir}/grpc_c"
36
+ else
37
+ require_relative 'grpc_c'
38
+ end
34
39
  end
@@ -29,5 +29,5 @@
29
29
 
30
30
  # GRPC contains the General RPC module.
31
31
  module GRPC
32
- VERSION = '1.0.0'
32
+ VERSION = '1.0.1.pre1'
33
33
  end
@@ -129,27 +129,36 @@ def nulls(l)
129
129
  [].pack('x' * l).force_encoding('ascii-8bit')
130
130
  end
131
131
 
132
- # A EnumeratorQueue wraps a Queue yielding the items added to it via each_item.
133
- class EnumeratorQueue
134
- extend Forwardable
135
- def_delegators :@q, :push
136
-
137
- def initialize(sentinel)
138
- @q = Queue.new
139
- @sentinel = sentinel
140
- end
132
+ # A FullDuplexEnumerator passes requests to a block and yields generated responses
133
+ class FullDuplexEnumerator
134
+ include Grpc::Testing
135
+ include Grpc::Testing::PayloadType
141
136
 
137
+ def initialize(requests)
138
+ @requests = requests
139
+ end
142
140
  def each_item
143
141
  return enum_for(:each_item) unless block_given?
144
- loop do
145
- r = @q.pop
146
- break if r.equal?(@sentinel)
147
- fail r if r.is_a? Exception
148
- yield r
142
+ GRPC.logger.info('interop-server: started receiving')
143
+ begin
144
+ cls = StreamingOutputCallResponse
145
+ @requests.each do |req|
146
+ req.response_parameters.each do |params|
147
+ resp_size = params.size
148
+ GRPC.logger.info("read a req, response size is #{resp_size}")
149
+ yield cls.new(payload: Payload.new(type: req.response_type,
150
+ body: nulls(resp_size)))
151
+ end
152
+ end
153
+ GRPC.logger.info('interop-server: finished receiving')
154
+ rescue StandardError => e
155
+ GRPC.logger.info('interop-server: failed')
156
+ GRPC.logger.warn(e)
157
+ fail e
149
158
  end
150
159
  end
151
160
  end
152
-
161
+
153
162
  # A runnable implementation of the schema-specified testing service, with each
154
163
  # service method implemented as required by the interop testing spec.
155
164
  class TestTarget < Grpc::Testing::TestService::Service
@@ -182,31 +191,9 @@ class TestTarget < Grpc::Testing::TestService::Service
182
191
 
183
192
  def full_duplex_call(reqs)
184
193
  # reqs is a lazy Enumerator of the requests sent by the client.
185
- q = EnumeratorQueue.new(self)
186
- cls = StreamingOutputCallResponse
187
- Thread.new do
188
- begin
189
- GRPC.logger.info('interop-server: started receiving')
190
- reqs.each do |req|
191
- req.response_parameters.each do |params|
192
- resp_size = params.size
193
- GRPC.logger.info("read a req, response size is #{resp_size}")
194
- resp = cls.new(payload: Payload.new(type: req.response_type,
195
- body: nulls(resp_size)))
196
- q.push(resp)
197
- end
198
- end
199
- GRPC.logger.info('interop-server: finished receiving')
200
- q.push(self)
201
- rescue StandardError => e
202
- GRPC.logger.info('interop-server: failed')
203
- GRPC.logger.warn(e)
204
- q.push(e) # share the exception with the enumerator
205
- end
206
- end
207
- q.each_item
194
+ FullDuplexEnumerator.new(reqs).each_item
208
195
  end
209
-
196
+
210
197
  def half_duplex_call(reqs)
211
198
  # TODO: update with unique behaviour of the half_duplex_call if that's
212
199
  # ever required by any of the tests.
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.0
4
+ version: 1.0.1.pre1
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-08-18 00:00:00.000000000 Z
11
+ date: 2016-10-06 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'
19
+ version: 3.0.2
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'
26
+ version: 3.0.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: googleauth
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -293,9 +293,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
293
293
  version: 2.0.0
294
294
  required_rubygems_version: !ruby/object:Gem::Requirement
295
295
  requirements:
296
- - - ">="
296
+ - - ">"
297
297
  - !ruby/object:Gem::Version
298
- version: '0'
298
+ version: 1.3.1
299
299
  requirements: []
300
300
  rubyforge_project:
301
301
  rubygems_version: 2.4.3