google-cloud-pubsub 1.0.2 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +19 -0
- data/CONTRIBUTING.md +1 -1
- data/OVERVIEW.md +83 -1
- data/lib/google-cloud-pubsub.rb +6 -14
- data/lib/google/cloud/pubsub.rb +5 -12
- data/lib/google/cloud/pubsub/async_publisher.rb +164 -132
- data/lib/google/cloud/pubsub/async_publisher/batch.rb +309 -0
- data/lib/google/cloud/pubsub/batch_publisher.rb +2 -4
- data/lib/google/cloud/pubsub/convert.rb +33 -7
- data/lib/google/cloud/pubsub/errors.rb +85 -0
- data/lib/google/cloud/pubsub/message.rb +42 -0
- data/lib/google/cloud/pubsub/project.rb +2 -5
- data/lib/google/cloud/pubsub/publish_result.rb +6 -1
- data/lib/google/cloud/pubsub/received_message.rb +42 -0
- data/lib/google/cloud/pubsub/service.rb +11 -18
- data/lib/google/cloud/pubsub/snapshot/list.rb +2 -4
- data/lib/google/cloud/pubsub/subscriber.rb +9 -5
- data/lib/google/cloud/pubsub/subscriber/inventory.rb +14 -16
- data/lib/google/cloud/pubsub/subscriber/sequencer.rb +115 -0
- data/lib/google/cloud/pubsub/subscriber/stream.rb +50 -26
- data/lib/google/cloud/pubsub/subscriber/timed_unary_buffer.rb +10 -15
- data/lib/google/cloud/pubsub/subscription.rb +90 -29
- data/lib/google/cloud/pubsub/subscription/list.rb +2 -4
- data/lib/google/cloud/pubsub/topic.rb +109 -17
- data/lib/google/cloud/pubsub/topic/list.rb +2 -4
- data/lib/google/cloud/pubsub/version.rb +1 -1
- metadata +39 -36
@@ -126,15 +126,13 @@ module Google
|
|
126
126
|
#
|
127
127
|
def all request_limit: nil
|
128
128
|
request_limit = request_limit.to_i if request_limit
|
129
|
-
unless block_given?
|
130
|
-
return enum_for :all, request_limit: request_limit
|
131
|
-
end
|
129
|
+
return enum_for :all, request_limit: request_limit unless block_given?
|
132
130
|
results = self
|
133
131
|
loop do
|
134
132
|
results.each { |r| yield r }
|
135
133
|
if request_limit
|
136
134
|
request_limit -= 1
|
137
|
-
break if request_limit
|
135
|
+
break if request_limit.negative?
|
138
136
|
end
|
139
137
|
break unless results.next?
|
140
138
|
results = results.next
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-pubsub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Moore
|
@@ -9,8 +9,22 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-10-
|
12
|
+
date: 2019-10-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: concurrent-ruby
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - "~>"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '1.1'
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - "~>"
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '1.1'
|
14
28
|
- !ruby/object:Gem::Dependency
|
15
29
|
name: google-cloud-core
|
16
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -31,14 +45,14 @@ dependencies:
|
|
31
45
|
requirements:
|
32
46
|
- - "~>"
|
33
47
|
- !ruby/object:Gem::Version
|
34
|
-
version: '1.
|
48
|
+
version: '1.8'
|
35
49
|
type: :runtime
|
36
50
|
prerelease: false
|
37
51
|
version_requirements: !ruby/object:Gem::Requirement
|
38
52
|
requirements:
|
39
53
|
- - "~>"
|
40
54
|
- !ruby/object:Gem::Version
|
41
|
-
version: '1.
|
55
|
+
version: '1.8'
|
42
56
|
- !ruby/object:Gem::Dependency
|
43
57
|
name: googleapis-common-protos
|
44
58
|
requirement: !ruby/object:Gem::Requirement
|
@@ -74,19 +88,33 @@ dependencies:
|
|
74
88
|
- !ruby/object:Gem::Version
|
75
89
|
version: 0.6.9
|
76
90
|
- !ruby/object:Gem::Dependency
|
77
|
-
name:
|
91
|
+
name: autotest-suffix
|
78
92
|
requirement: !ruby/object:Gem::Requirement
|
79
93
|
requirements:
|
80
94
|
- - "~>"
|
81
95
|
- !ruby/object:Gem::Version
|
82
96
|
version: '1.1'
|
83
|
-
type: :
|
97
|
+
type: :development
|
84
98
|
prerelease: false
|
85
99
|
version_requirements: !ruby/object:Gem::Requirement
|
86
100
|
requirements:
|
87
101
|
- - "~>"
|
88
102
|
- !ruby/object:Gem::Version
|
89
103
|
version: '1.1'
|
104
|
+
- !ruby/object:Gem::Dependency
|
105
|
+
name: google-style
|
106
|
+
requirement: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 1.24.0
|
111
|
+
type: :development
|
112
|
+
prerelease: false
|
113
|
+
version_requirements: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 1.24.0
|
90
118
|
- !ruby/object:Gem::Dependency
|
91
119
|
name: minitest
|
92
120
|
requirement: !ruby/object:Gem::Requirement
|
@@ -143,20 +171,6 @@ dependencies:
|
|
143
171
|
- - "~>"
|
144
172
|
- !ruby/object:Gem::Version
|
145
173
|
version: '5.2'
|
146
|
-
- !ruby/object:Gem::Dependency
|
147
|
-
name: autotest-suffix
|
148
|
-
requirement: !ruby/object:Gem::Requirement
|
149
|
-
requirements:
|
150
|
-
- - "~>"
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: '1.1'
|
153
|
-
type: :development
|
154
|
-
prerelease: false
|
155
|
-
version_requirements: !ruby/object:Gem::Requirement
|
156
|
-
requirements:
|
157
|
-
- - "~>"
|
158
|
-
- !ruby/object:Gem::Version
|
159
|
-
version: '1.1'
|
160
174
|
- !ruby/object:Gem::Dependency
|
161
175
|
name: redcarpet
|
162
176
|
requirement: !ruby/object:Gem::Requirement
|
@@ -171,20 +185,6 @@ dependencies:
|
|
171
185
|
- - "~>"
|
172
186
|
- !ruby/object:Gem::Version
|
173
187
|
version: '3.0'
|
174
|
-
- !ruby/object:Gem::Dependency
|
175
|
-
name: rubocop
|
176
|
-
requirement: !ruby/object:Gem::Requirement
|
177
|
-
requirements:
|
178
|
-
- - "~>"
|
179
|
-
- !ruby/object:Gem::Version
|
180
|
-
version: 0.64.0
|
181
|
-
type: :development
|
182
|
-
prerelease: false
|
183
|
-
version_requirements: !ruby/object:Gem::Requirement
|
184
|
-
requirements:
|
185
|
-
- - "~>"
|
186
|
-
- !ruby/object:Gem::Version
|
187
|
-
version: 0.64.0
|
188
188
|
- !ruby/object:Gem::Dependency
|
189
189
|
name: simplecov
|
190
190
|
requirement: !ruby/object:Gem::Requirement
|
@@ -248,9 +248,11 @@ files:
|
|
248
248
|
- lib/google-cloud-pubsub.rb
|
249
249
|
- lib/google/cloud/pubsub.rb
|
250
250
|
- lib/google/cloud/pubsub/async_publisher.rb
|
251
|
+
- lib/google/cloud/pubsub/async_publisher/batch.rb
|
251
252
|
- lib/google/cloud/pubsub/batch_publisher.rb
|
252
253
|
- lib/google/cloud/pubsub/convert.rb
|
253
254
|
- lib/google/cloud/pubsub/credentials.rb
|
255
|
+
- lib/google/cloud/pubsub/errors.rb
|
254
256
|
- lib/google/cloud/pubsub/message.rb
|
255
257
|
- lib/google/cloud/pubsub/policy.rb
|
256
258
|
- lib/google/cloud/pubsub/project.rb
|
@@ -262,6 +264,7 @@ files:
|
|
262
264
|
- lib/google/cloud/pubsub/subscriber.rb
|
263
265
|
- lib/google/cloud/pubsub/subscriber/enumerator_queue.rb
|
264
266
|
- lib/google/cloud/pubsub/subscriber/inventory.rb
|
267
|
+
- lib/google/cloud/pubsub/subscriber/sequencer.rb
|
265
268
|
- lib/google/cloud/pubsub/subscriber/stream.rb
|
266
269
|
- lib/google/cloud/pubsub/subscriber/timed_unary_buffer.rb
|
267
270
|
- lib/google/cloud/pubsub/subscription.rb
|
@@ -299,14 +302,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
299
302
|
requirements:
|
300
303
|
- - ">="
|
301
304
|
- !ruby/object:Gem::Version
|
302
|
-
version: 2.
|
305
|
+
version: '2.4'
|
303
306
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
304
307
|
requirements:
|
305
308
|
- - ">="
|
306
309
|
- !ruby/object:Gem::Version
|
307
310
|
version: '0'
|
308
311
|
requirements: []
|
309
|
-
rubygems_version: 3.0.
|
312
|
+
rubygems_version: 3.0.6
|
310
313
|
signing_key:
|
311
314
|
specification_version: 4
|
312
315
|
summary: API Client library for Google Cloud Pub/Sub
|