google-cloud-pubsub 2.16.0 → 2.17.0

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: 35cc037d6f0aede3871e054b4e0b9a1e05cee0423b88bf690fc86b9fc8f1aade
4
- data.tar.gz: 0d2f6d0b84f496f18772b7437e611d0f28c615e063ad6ef2ec7f0d0d5ddb6d13
3
+ metadata.gz: 9baf526a8b94705a0743ca0614706046c014c11e9823a255aef8de94eb927962
4
+ data.tar.gz: b90d14a0b11cbfd8685ed11d631d61ba27032d4a91ee71f5ae245e505c3e755b
5
5
  SHA512:
6
- metadata.gz: 95e2bd59d4810cf9db705f5a3078d75950c2ceae5908a8d43613f1fc0d0dcf68beb8d13fdef39584ef00bd14b3cb1201327a87b07bbbfe9a5d684c12e6902248
7
- data.tar.gz: c50f46c0f07df73a2e3c4490c91a35fae5380c48276bc5513860ec9401dedf7c5ed0415e9375adc7b17259f6e84c0e8f76ede1162f649a7c8cf8b2bf7aceefb3
6
+ metadata.gz: dae5a2eedf9edece6daf5225271961853a1c43490ed64f44ba9f0d2e747cec8eb2943111be2ea608961313697c597e555ceb93fee795e59d992562f0c5fca01a
7
+ data.tar.gz: 5e394bb76ccade24fcb11ac80055cb62fe41f8872e48a2de39ace663e4815aafcee3b977af20dd0ff80f71ad9083c703ef5a3dca4f6606d894f8bf37744c2c1a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Release History
2
2
 
3
+ ### 2.17.0 (2024-03-07)
4
+
5
+ #### Features
6
+
7
+ * Update minimum supported Ruby version to 2.7 ([#25298](https://github.com/googleapis/google-cloud-ruby/issues/25298))
8
+
3
9
  ### 2.16.0 (2024-01-25)
4
10
 
5
11
  #### Features
@@ -69,7 +69,7 @@ module Google
69
69
  data_bytes = String(data).dup.force_encoding(Encoding::ASCII_8BIT).freeze
70
70
 
71
71
  # Convert attributes to strings to match the protobuf definition
72
- attributes = Hash[attributes.map { |k, v| [String(k), String(v)] }]
72
+ attributes = attributes.to_h { |k, v| [String(k), String(v)] }
73
73
 
74
74
  # Ordering Key must always be a string
75
75
  ordering_key = String(ordering_key).freeze
@@ -84,7 +84,6 @@ module Google
84
84
 
85
85
  protected
86
86
 
87
- # rubocop:disable Style/IdenticalConditionalBranches
88
87
  # rubocop:disable Style/GuardClause
89
88
 
90
89
  def acquire_or_wait message_size
@@ -117,7 +116,6 @@ module Google
117
116
  end
118
117
  end
119
118
 
120
- # rubocop:enable Style/IdenticalConditionalBranches
121
119
  # rubocop:enable Style/GuardClause
122
120
 
123
121
  def is_new_and_others_wait? waiter
@@ -62,7 +62,7 @@ module Google
62
62
  # This can be used to publish several messages in bulk.
63
63
  def initialize data = nil, attributes = {}
64
64
  # Convert attributes to strings to match the protobuf definition
65
- attributes = Hash[attributes.map { |k, v| [String(k), String(v)] }]
65
+ attributes = attributes.to_h { |k, v| [String(k), String(v)] }
66
66
 
67
67
  @grpc = Google::Cloud::PubSub::V1::PubsubMessage.new(
68
68
  data: String(data).dup.force_encoding(Encoding::ASCII_8BIT),
@@ -81,8 +81,7 @@ module Google
81
81
  # Optional attributes for the message.
82
82
  def attributes
83
83
  return @grpc.attributes.to_h if @grpc.attributes.respond_to? :to_h
84
- # Enumerable doesn't have to_h on Ruby 2.0, so fallback to this
85
- Hash[@grpc.attributes.to_a]
84
+ @grpc.attributes.to_a.to_h
86
85
  end
87
86
 
88
87
  ##
@@ -262,7 +262,7 @@ module Google
262
262
  # Modifies the PushConfig for a specified subscription.
263
263
  def modify_push_config subscription, endpoint, attributes
264
264
  # Convert attributes to strings to match the protobuf definition
265
- attributes = Hash[attributes.map { |k, v| [String(k), String(v)] }]
265
+ attributes = attributes.to_h { |k, v| [String(k), String(v)] }
266
266
  push_config = Google::Cloud::PubSub::V1::PushConfig.new(
267
267
  push_endpoint: endpoint,
268
268
  attributes: attributes
@@ -246,7 +246,7 @@ module Google
246
246
  break if synchronize { @stopped }
247
247
 
248
248
  begin
249
- # Cannot syncronize the enumerator, causes deadlock
249
+ # Cannot synchronize the enumerator, causes deadlock
250
250
  response = enum.next
251
251
  new_exactly_once_delivery_enabled = response&.subscription_properties&.exactly_once_delivery_enabled
252
252
  received_messages = response.received_messages
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module PubSub
19
- VERSION = "2.16.0".freeze
19
+ VERSION = "2.17.0".freeze
20
20
  end
21
21
 
22
22
  Pubsub = PubSub unless const_defined? :Pubsub
@@ -83,7 +83,7 @@ module Google
83
83
  emulator_host: nil,
84
84
  project: nil,
85
85
  keyfile: nil
86
- project_id ||= (project || default_project_id)
86
+ project_id ||= project || default_project_id
87
87
  scope ||= configure.scope
88
88
  timeout ||= configure.timeout
89
89
  endpoint ||= configure.endpoint
@@ -94,7 +94,7 @@ module Google
94
94
  credentials = :this_channel_is_insecure
95
95
  endpoint = emulator_host
96
96
  else
97
- credentials ||= (keyfile || default_credentials(scope: scope))
97
+ credentials ||= keyfile || default_credentials(scope: scope)
98
98
  unless credentials.is_a? Google::Auth::Credentials
99
99
  credentials = PubSub::Credentials.new credentials, scope: scope
100
100
  end
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: 2.16.0
4
+ version: 2.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Moore
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-01-25 00:00:00.000000000 Z
12
+ date: 2024-03-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: concurrent-ruby
@@ -67,160 +67,6 @@ dependencies:
67
67
  - - "~>"
68
68
  - !ruby/object:Gem::Version
69
69
  version: '3.1'
70
- - !ruby/object:Gem::Dependency
71
- name: autotest-suffix
72
- requirement: !ruby/object:Gem::Requirement
73
- requirements:
74
- - - "~>"
75
- - !ruby/object:Gem::Version
76
- version: '1.1'
77
- type: :development
78
- prerelease: false
79
- version_requirements: !ruby/object:Gem::Requirement
80
- requirements:
81
- - - "~>"
82
- - !ruby/object:Gem::Version
83
- version: '1.1'
84
- - !ruby/object:Gem::Dependency
85
- name: avro
86
- requirement: !ruby/object:Gem::Requirement
87
- requirements:
88
- - - "~>"
89
- - !ruby/object:Gem::Version
90
- version: '1.10'
91
- type: :development
92
- prerelease: false
93
- version_requirements: !ruby/object:Gem::Requirement
94
- requirements:
95
- - - "~>"
96
- - !ruby/object:Gem::Version
97
- version: '1.10'
98
- - !ruby/object:Gem::Dependency
99
- name: google-style
100
- requirement: !ruby/object:Gem::Requirement
101
- requirements:
102
- - - "~>"
103
- - !ruby/object:Gem::Version
104
- version: 1.25.1
105
- type: :development
106
- prerelease: false
107
- version_requirements: !ruby/object:Gem::Requirement
108
- requirements:
109
- - - "~>"
110
- - !ruby/object:Gem::Version
111
- version: 1.25.1
112
- - !ruby/object:Gem::Dependency
113
- name: minitest
114
- requirement: !ruby/object:Gem::Requirement
115
- requirements:
116
- - - "~>"
117
- - !ruby/object:Gem::Version
118
- version: '5.16'
119
- type: :development
120
- prerelease: false
121
- version_requirements: !ruby/object:Gem::Requirement
122
- requirements:
123
- - - "~>"
124
- - !ruby/object:Gem::Version
125
- version: '5.16'
126
- - !ruby/object:Gem::Dependency
127
- name: minitest-autotest
128
- requirement: !ruby/object:Gem::Requirement
129
- requirements:
130
- - - "~>"
131
- - !ruby/object:Gem::Version
132
- version: '1.0'
133
- type: :development
134
- prerelease: false
135
- version_requirements: !ruby/object:Gem::Requirement
136
- requirements:
137
- - - "~>"
138
- - !ruby/object:Gem::Version
139
- version: '1.0'
140
- - !ruby/object:Gem::Dependency
141
- name: minitest-focus
142
- requirement: !ruby/object:Gem::Requirement
143
- requirements:
144
- - - "~>"
145
- - !ruby/object:Gem::Version
146
- version: '1.1'
147
- type: :development
148
- prerelease: false
149
- version_requirements: !ruby/object:Gem::Requirement
150
- requirements:
151
- - - "~>"
152
- - !ruby/object:Gem::Version
153
- version: '1.1'
154
- - !ruby/object:Gem::Dependency
155
- name: minitest-rg
156
- requirement: !ruby/object:Gem::Requirement
157
- requirements:
158
- - - "~>"
159
- - !ruby/object:Gem::Version
160
- version: '5.2'
161
- type: :development
162
- prerelease: false
163
- version_requirements: !ruby/object:Gem::Requirement
164
- requirements:
165
- - - "~>"
166
- - !ruby/object:Gem::Version
167
- version: '5.2'
168
- - !ruby/object:Gem::Dependency
169
- name: redcarpet
170
- requirement: !ruby/object:Gem::Requirement
171
- requirements:
172
- - - "~>"
173
- - !ruby/object:Gem::Version
174
- version: '3.0'
175
- type: :development
176
- prerelease: false
177
- version_requirements: !ruby/object:Gem::Requirement
178
- requirements:
179
- - - "~>"
180
- - !ruby/object:Gem::Version
181
- version: '3.0'
182
- - !ruby/object:Gem::Dependency
183
- name: simplecov
184
- requirement: !ruby/object:Gem::Requirement
185
- requirements:
186
- - - "~>"
187
- - !ruby/object:Gem::Version
188
- version: '0.9'
189
- type: :development
190
- prerelease: false
191
- version_requirements: !ruby/object:Gem::Requirement
192
- requirements:
193
- - - "~>"
194
- - !ruby/object:Gem::Version
195
- version: '0.9'
196
- - !ruby/object:Gem::Dependency
197
- name: yard
198
- requirement: !ruby/object:Gem::Requirement
199
- requirements:
200
- - - "~>"
201
- - !ruby/object:Gem::Version
202
- version: '0.9'
203
- type: :development
204
- prerelease: false
205
- version_requirements: !ruby/object:Gem::Requirement
206
- requirements:
207
- - - "~>"
208
- - !ruby/object:Gem::Version
209
- version: '0.9'
210
- - !ruby/object:Gem::Dependency
211
- name: yard-doctest
212
- requirement: !ruby/object:Gem::Requirement
213
- requirements:
214
- - - "~>"
215
- - !ruby/object:Gem::Version
216
- version: 0.1.13
217
- type: :development
218
- prerelease: false
219
- version_requirements: !ruby/object:Gem::Requirement
220
- requirements:
221
- - - "~>"
222
- - !ruby/object:Gem::Version
223
- version: 0.1.13
224
70
  description: google-cloud-pubsub is the official library for Google Cloud Pub/Sub.
225
71
  email:
226
72
  - mike@blowmage.com
@@ -284,14 +130,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
284
130
  requirements:
285
131
  - - ">="
286
132
  - !ruby/object:Gem::Version
287
- version: '2.5'
133
+ version: '2.7'
288
134
  required_rubygems_version: !ruby/object:Gem::Requirement
289
135
  requirements:
290
136
  - - ">="
291
137
  - !ruby/object:Gem::Version
292
138
  version: '0'
293
139
  requirements: []
294
- rubygems_version: 3.5.3
140
+ rubygems_version: 3.5.6
295
141
  signing_key:
296
142
  specification_version: 4
297
143
  summary: API Client library for Google Cloud Pub/Sub