protobuf 3.10.7 → 3.10.9

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: f345ac51b45d74ca337c48e64d8ffb42e2447827e9fa5b483a7602ef47cc6743
4
- data.tar.gz: d5ac75f75f3e27c75d4ad2066bd5160df7288136fd5c87323a7918034c025adb
3
+ metadata.gz: 6ed2f7beb2186899fa855dcdc852e2ab8d8433f0365d6bfd01bd5ad5d010b189
4
+ data.tar.gz: fe237afa9ce1f42475919b85246f97890343a652b752f82b57863309b314a759
5
5
  SHA512:
6
- metadata.gz: 62c4eb8312892d27bbb8f0f2917a63fd40519c3d6b3e36eb8825128d086d2913fe73f0d3db6acf035086a4b628ffe7ed3d838718f3301061edbf21f5bca81edb
7
- data.tar.gz: 6fa9ec62ef8a47feec93a6b9f6b2c1cad220b1dd2001dd4b96a5ac75c1a3f7b81a2c7ee4342244e61ba649a7d075e572991bb162ff1b85cb6f2d5cf974e63d7c
6
+ metadata.gz: 223ba3d3993ca39c973228c6572d0b15ff21c86967114749fad157d19386ae7e285a6a40ab2a05187108f63f28f1d1242ed6861ac2f4dc456d8e1327cc46974e
7
+ data.tar.gz: 374f7d7484f34098d8d07ede5b08be53842550ec0cc7291410b1d25b85289ffe921d0aa6d4dd55a39cf12005b2374ab4a9dd546f061e3f6e95b55e489f1b7845
data/.rubocop.yml CHANGED
@@ -6,8 +6,11 @@ AllCops:
6
6
  - 'spec/support/protos/*.pb.rb'
7
7
  - 'varint_prof.rb'
8
8
 
9
- Lint/EndAlignment:
10
- AlignWith: keyword
9
+ Bundler/DuplicatedGem:
10
+ Enabled: false
11
+
12
+ Layout/EndAlignment:
13
+ EnforcedStyleAlignWith: keyword
11
14
 
12
15
  Lint/Loop:
13
16
  Enabled: false
@@ -18,25 +21,26 @@ Metrics/ClassLength:
18
21
  Metrics/ModuleLength:
19
22
  Enabled: false
20
23
 
21
- Style/CaseIndentation:
22
- IndentWhenRelativeTo: end
24
+ Layout/CaseIndentation:
25
+ EnforcedStyle: end
23
26
 
24
27
  Style/ClassAndModuleChildren:
25
28
  Exclude:
26
29
  - '**/*.pb.rb'
30
+ - 'spec/**/*.rb'
27
31
 
28
- Style/ClassAndModuleCamelCase:
32
+ Naming/ClassAndModuleCamelCase:
29
33
  Exclude:
30
34
  - '**/*.pb.rb'
31
35
 
32
- Style/EmptyLineBetweenDefs:
36
+ Layout/EmptyLineBetweenDefs:
33
37
  AllowAdjacentOneLineDefs: true
34
38
 
35
- Style/EmptyLines:
39
+ Layout/EmptyLines:
36
40
  Exclude:
37
41
  - '**/*.pb.rb'
38
42
 
39
- Style/FileName:
43
+ Naming/FileName:
40
44
  Exclude:
41
45
  - '**/protoc-gen-ruby*'
42
46
 
@@ -46,7 +50,7 @@ Style/GuardClause:
46
50
  Style/HashSyntax:
47
51
  EnforcedStyle: hash_rockets
48
52
 
49
- Style/IndentHash:
53
+ Layout/FirstHashElementIndentation:
50
54
  EnforcedStyle: consistent
51
55
 
52
56
  Style/Semicolon:
@@ -55,16 +59,23 @@ Style/Semicolon:
55
59
  Style/SingleLineBlockParams:
56
60
  Enabled: false
57
61
 
58
- Style/TrailingBlankLines:
62
+ Layout/TrailingEmptyLines:
59
63
  Exclude:
60
64
  - '**/*.pb.rb'
61
65
 
62
66
  Style/TrailingCommaInArguments:
63
67
  EnforcedStyleForMultiline: comma
64
68
 
65
- Style/TrailingCommaInLiteral:
69
+ Style/TrailingCommaInArrayLiteral:
70
+ EnforcedStyleForMultiline: comma
71
+
72
+ Style/TrailingCommaInHashLiteral:
66
73
  EnforcedStyleForMultiline: comma
67
74
 
68
75
  Style/TrivialAccessors:
69
76
  AllowDSLWriters: true
70
77
  AllowPredicates: true
78
+
79
+ Style/Encoding:
80
+ Exclude:
81
+ - '**/*.pb.rb'
data/.rubocop_todo.yml CHANGED
@@ -1,30 +1,208 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2015-09-25 12:31:31 -0700 using RuboCop version 0.34.2.
3
+ # on 2020-04-13 09:00:39 +0200 using RuboCop version 0.81.0.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 31
9
+ # Offense count: 1
10
+ # Cop supports --auto-correct.
11
+ # Configuration parameters: TreatCommentsAsGroupSeparators, Include.
12
+ # Include: **/*.gemspec
13
+ Gemspec/OrderedDependencies:
14
+ Exclude:
15
+ - 'protobuf.gemspec'
16
+
17
+ # Offense count: 2
18
+ # Configuration parameters: Include.
19
+ # Include: **/*.gemspec
20
+ Gemspec/RubyVersionGlobalsUsage:
21
+ Exclude:
22
+ - 'protobuf.gemspec'
23
+
24
+ # Offense count: 2
25
+ # Cop supports --auto-correct.
26
+ Layout/ClosingParenthesisIndentation:
27
+ Exclude:
28
+ - 'spec/lib/protobuf/generators/base_spec.rb'
29
+ - 'spec/lib/protobuf/rpc/service_spec.rb'
30
+
31
+ # Offense count: 42
32
+ # Cop supports --auto-correct.
33
+ Layout/EmptyLineAfterGuardClause:
34
+ Enabled: false
35
+
36
+ # Offense count: 1
37
+ # Cop supports --auto-correct.
38
+ Layout/EmptyLineAfterMagicComment:
39
+ Exclude:
40
+ - 'protobuf.gemspec'
41
+
42
+ # Offense count: 83
43
+ # Cop supports --auto-correct.
44
+ # Configuration parameters: EnforcedStyle.
45
+ # SupportedStyles: empty_lines, no_empty_lines
46
+ Layout/EmptyLinesAroundBlockBody:
47
+ Enabled: false
48
+
49
+ # Offense count: 75
50
+ # Cop supports --auto-correct.
51
+ # Configuration parameters: EnforcedStyle.
52
+ # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines, beginning_only, ending_only
53
+ Layout/EmptyLinesAroundClassBody:
54
+ Enabled: false
55
+
56
+ # Offense count: 39
57
+ # Cop supports --auto-correct.
58
+ # Configuration parameters: EnforcedStyle.
59
+ # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
60
+ Layout/EmptyLinesAroundModuleBody:
61
+ Enabled: false
62
+
63
+ # Offense count: 30
64
+ # Cop supports --auto-correct.
65
+ # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
66
+ # SupportedHashRocketStyles: key, separator, table
67
+ # SupportedColonStyles: key, separator, table
68
+ # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
69
+ Layout/HashAlignment:
70
+ Exclude:
71
+ - 'Rakefile'
72
+ - 'lib/protobuf/field.rb'
73
+ - 'lib/protobuf/rpc/connectors/base.rb'
74
+ - 'spec/lib/protobuf/enum_spec.rb'
75
+ - 'spec/lib/protobuf/rpc/middleware/response_encoder_spec.rb'
76
+
77
+ # Offense count: 7
78
+ # Cop supports --auto-correct.
79
+ # Configuration parameters: EnforcedStyle.
80
+ # SupportedStyles: squiggly, active_support, powerpack, unindent
81
+ Layout/HeredocIndentation:
82
+ Exclude:
83
+ - 'spec/lib/protobuf/generators/enum_generator_spec.rb'
84
+ - 'spec/lib/protobuf/generators/file_generator_spec.rb'
85
+ - 'spec/lib/protobuf/generators/service_generator_spec.rb'
86
+
87
+ # Offense count: 2
88
+ # Cop supports --auto-correct.
89
+ # Configuration parameters: EnforcedStyle.
90
+ # SupportedStyles: symmetrical, new_line, same_line
91
+ Layout/MultilineArrayBraceLayout:
92
+ Exclude:
93
+ - 'spec/lib/protobuf/generators/field_generator_spec.rb'
94
+ - 'spec/lib/protobuf/message_spec.rb'
95
+
96
+ # Offense count: 10
97
+ # Cop supports --auto-correct.
98
+ # Configuration parameters: EnforcedStyle.
99
+ # SupportedStyles: symmetrical, new_line, same_line
100
+ Layout/MultilineMethodCallBraceLayout:
101
+ Exclude:
102
+ - 'spec/functional/code_generator_spec.rb'
103
+ - 'spec/lib/protobuf/generators/field_generator_spec.rb'
104
+ - 'spec/lib/protobuf/optionable_spec.rb'
105
+
106
+ # Offense count: 1
107
+ # Cop supports --auto-correct.
108
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
109
+ # SupportedStyles: aligned, indented, indented_relative_to_receiver
110
+ Layout/MultilineMethodCallIndentation:
111
+ Exclude:
112
+ - 'spec/lib/protobuf/generators/file_generator_spec.rb'
113
+
114
+ # Offense count: 1
115
+ # Cop supports --auto-correct.
116
+ Layout/RescueEnsureAlignment:
117
+ Exclude:
118
+ - 'lib/protobuf/rpc/servers/socket/server.rb'
119
+
120
+ # Offense count: 5
121
+ # Cop supports --auto-correct.
122
+ Layout/SpaceAfterNot:
123
+ Exclude:
124
+ - 'lib/protobuf/field/base_field.rb'
125
+ - 'lib/protobuf/rpc/connectors/zmq.rb'
126
+ - 'lib/protobuf/rpc/servers/socket/worker.rb'
127
+ - 'lib/protobuf/tasks/compile.rake'
128
+
129
+ # Offense count: 1
130
+ # Cop supports --auto-correct.
131
+ # Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator.
132
+ # SupportedStylesForExponentOperator: space, no_space
133
+ Layout/SpaceAroundOperators:
134
+ Exclude:
135
+ - 'lib/protobuf/field/base_field.rb'
136
+
137
+ # Offense count: 6
138
+ Lint/DuplicateMethods:
139
+ Exclude:
140
+ - 'lib/protobuf/generators/field_generator.rb'
141
+ - 'lib/protobuf/rpc/buffer.rb'
142
+ - 'lib/protobuf/rpc/stat.rb'
143
+
144
+ # Offense count: 1
145
+ Lint/EmptyWhen:
146
+ Exclude:
147
+ - 'lib/protobuf/rpc/servers/socket/server.rb'
148
+
149
+ # Offense count: 1
150
+ Lint/InterpolationCheck:
151
+ Exclude:
152
+ - 'spec/lib/protobuf/message_spec.rb'
153
+
154
+ # Offense count: 1
155
+ # Configuration parameters: MaximumRangeSize.
156
+ Lint/MissingCopEnableDirective:
157
+ Exclude:
158
+ - 'lib/protobuf/message/fields.rb'
159
+
160
+ # Offense count: 4
161
+ # Cop supports --auto-correct.
162
+ Lint/RedundantCopDisableDirective:
163
+ Exclude:
164
+ - 'lib/protobuf.rb'
165
+ - 'lib/protobuf/message/fields.rb'
166
+
167
+ # Offense count: 5
168
+ # Cop supports --auto-correct.
169
+ Lint/RedundantRequireStatement:
170
+ Exclude:
171
+ - 'lib/protobuf/rpc/servers/zmq/broker.rb'
172
+ - 'lib/protobuf/rpc/servers/zmq/server.rb'
173
+ - 'lib/protobuf/rpc/servers/zmq/worker.rb'
174
+ - 'lib/protobuf/rpc/servers/zmq_runner.rb'
175
+ - 'lib/protobuf/rpc/service_directory.rb'
176
+
177
+ # Offense count: 2
178
+ # Configuration parameters: AllowComments.
179
+ Lint/SuppressedException:
180
+ Exclude:
181
+ - 'lib/protobuf.rb'
182
+
183
+ # Offense count: 44
184
+ # Configuration parameters: IgnoredMethods.
10
185
  Metrics/AbcSize:
11
- Max: 59
186
+ Max: 55
187
+
188
+ # Offense count: 116
189
+ # Configuration parameters: CountComments, ExcludedMethods.
190
+ # ExcludedMethods: refine
191
+ Metrics/BlockLength:
192
+ Max: 742
12
193
 
13
194
  # Offense count: 1
195
+ # Configuration parameters: CountBlocks.
14
196
  Metrics/BlockNesting:
15
197
  Max: 5
16
198
 
17
- # Offense count: 6
199
+ # Offense count: 19
200
+ # Configuration parameters: IgnoredMethods.
18
201
  Metrics/CyclomaticComplexity:
19
202
  Max: 12
20
203
 
21
- # Offense count: 493
22
- # Configuration parameters: AllowURI, URISchemes.
23
- Metrics/LineLength:
24
- Max: 199
25
-
26
- # Offense count: 44
27
- # Configuration parameters: CountComments.
204
+ # Offense count: 65
205
+ # Configuration parameters: CountComments, ExcludedMethods.
28
206
  Metrics/MethodLength:
29
207
  Max: 38
30
208
 
@@ -33,21 +211,73 @@ Metrics/MethodLength:
33
211
  Metrics/ParameterLists:
34
212
  Max: 7
35
213
 
36
- # Offense count: 6
214
+ # Offense count: 18
215
+ # Configuration parameters: IgnoredMethods.
37
216
  Metrics/PerceivedComplexity:
38
- Max: 17
217
+ Max: 13
39
218
 
40
- # Offense count: 1
219
+ # Offense count: 5
220
+ # Configuration parameters: ForbiddenDelimiters.
221
+ # ForbiddenDelimiters: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
222
+ Naming/HeredocDelimiterNaming:
223
+ Exclude:
224
+ - 'spec/lib/protobuf/generators/file_generator_spec.rb'
225
+ - 'spec/lib/protobuf/generators/service_generator_spec.rb'
226
+
227
+ # Offense count: 13
228
+ # Configuration parameters: EnforcedStyleForLeadingUnderscores.
229
+ # SupportedStylesForLeadingUnderscores: disallowed, required, optional
230
+ Naming/MemoizedInstanceVariableName:
231
+ Exclude:
232
+ - 'lib/protobuf/field/base_field.rb'
233
+ - 'lib/protobuf/logging.rb'
234
+ - 'lib/protobuf/rpc/client.rb'
235
+ - 'lib/protobuf/rpc/connectors/base.rb'
236
+ - 'lib/protobuf/rpc/connectors/socket.rb'
237
+ - 'lib/protobuf/rpc/connectors/zmq.rb'
238
+ - 'lib/protobuf/rpc/server.rb'
239
+ - 'lib/protobuf/rpc/servers/socket/server.rb'
240
+ - 'lib/protobuf/rpc/servers/socket/worker.rb'
241
+ - 'lib/protobuf/rpc/servers/zmq/server.rb'
242
+ - 'lib/protobuf/rpc/stat.rb'
243
+ - 'spec/support/server.rb'
244
+
245
+ # Offense count: 2
246
+ # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
247
+ # AllowedNames: io, id, to, by, on, in, at, ip, db, os, pp
248
+ Naming/MethodParameterName:
249
+ Exclude:
250
+ - 'lib/protobuf/logging.rb'
251
+ - 'spec/lib/protobuf/rpc/service_filters_spec.rb'
252
+
253
+ # Offense count: 6
41
254
  # Cop supports --auto-correct.
42
- Performance/StringReplacement:
255
+ # Configuration parameters: PreferredName.
256
+ Naming/RescuedExceptionsVariableName:
43
257
  Exclude:
44
- - 'lib/protobuf/rpc/buffer.rb'
258
+ - 'lib/protobuf/rpc/connectors/base.rb'
259
+ - 'lib/protobuf/rpc/middleware/exception_handler.rb'
260
+ - 'lib/protobuf/rpc/middleware/request_decoder.rb'
261
+ - 'lib/protobuf/rpc/middleware/response_encoder.rb'
262
+ - 'lib/protobuf/rpc/service_filters.rb'
45
263
 
46
- Performance/TimesMap:
47
- Enabled: false
264
+ # Offense count: 6
265
+ # Cop supports --auto-correct.
266
+ # Configuration parameters: AutoCorrect, EnforcedStyle.
267
+ # SupportedStyles: nested, compact
268
+ Style/ClassAndModuleChildren:
269
+ Exclude:
270
+ - '**/*.pb.rb'
271
+ - 'spec/lib/protobuf/generators/field_generator_spec.rb'
272
+ - 'spec/lib/protobuf/generators/service_generator_spec.rb'
273
+
274
+ # Offense count: 2
275
+ Style/CommentedKeyword:
276
+ Exclude:
277
+ - 'lib/protobuf/rpc/servers/socket_runner.rb'
278
+ - 'lib/protobuf/rpc/servers/zmq_runner.rb'
48
279
 
49
- # Offense count: 127
50
- # Configuration parameters: Exclude.
280
+ # Offense count: 203
51
281
  Style/Documentation:
52
282
  Enabled: false
53
283
 
@@ -62,84 +292,250 @@ Style/DoubleNegation:
62
292
  - 'lib/protobuf/rpc/servers/zmq/worker.rb'
63
293
  - 'lib/protobuf/rpc/service_directory.rb'
64
294
 
295
+ # Offense count: 9
296
+ # Cop supports --auto-correct.
297
+ Style/EmptyCaseCondition:
298
+ Exclude:
299
+ - 'lib/protobuf/enum.rb'
300
+ - 'lib/protobuf/field/base_field.rb'
301
+ - 'lib/protobuf/rpc/connectors/zmq.rb'
302
+ - 'lib/protobuf/rpc/servers/socket/server.rb'
303
+ - 'lib/protobuf/rpc/servers/socket_runner.rb'
304
+ - 'lib/protobuf/rpc/servers/zmq_runner.rb'
305
+
65
306
  # Offense count: 2
66
307
  # Cop supports --auto-correct.
67
- # Configuration parameters: EnforcedStyle, SupportedStyles.
308
+ # Configuration parameters: EnforcedStyle.
309
+ # SupportedStyles: empty, nil, both
68
310
  Style/EmptyElse:
69
311
  Exclude:
70
312
  - 'lib/protobuf/enum.rb'
71
313
  - 'lib/protobuf/message/fields.rb'
72
314
 
73
- # Offense count: 77
315
+ # Offense count: 1
74
316
  # Cop supports --auto-correct.
75
- # Configuration parameters: EnforcedStyle, SupportedStyles.
76
- Style/EmptyLinesAroundBlockBody:
77
- Enabled: false
317
+ # Configuration parameters: EnforcedStyle.
318
+ # SupportedStyles: compact, expanded
319
+ Style/EmptyMethod:
320
+ Exclude:
321
+ - 'lib/protobuf/code_generator.rb'
322
+
323
+ # Offense count: 3
324
+ # Cop supports --auto-correct.
325
+ Style/Encoding:
326
+ Exclude:
327
+ - '**/*.pb.rb'
328
+ - 'protobuf.gemspec'
329
+ - 'spec/lib/protobuf/field/string_field_spec.rb'
330
+ - 'spec/lib/protobuf/message_spec.rb'
78
331
 
79
- # Offense count: 90
332
+ # Offense count: 1
333
+ Style/EvalWithLocation:
334
+ Exclude:
335
+ - 'lib/protobuf/message/fields.rb'
336
+
337
+ # Offense count: 2
80
338
  # Cop supports --auto-correct.
81
- # Configuration parameters: EnforcedStyle, SupportedStyles.
82
- Style/EmptyLinesAroundClassBody:
339
+ Style/ExpandPathArguments:
340
+ Exclude:
341
+ - 'spec/benchmark/tasks.rb'
342
+ - 'spec/lib/protobuf/cli_spec.rb'
343
+
344
+ # Offense count: 167
345
+ # Cop supports --auto-correct.
346
+ # Configuration parameters: EnforcedStyle.
347
+ # SupportedStyles: always, always_true, never
348
+ Style/FrozenStringLiteralComment:
83
349
  Enabled: false
84
350
 
85
- # Offense count: 50
351
+ # Offense count: 1
352
+ # Configuration parameters: MinBodyLength.
353
+ Style/GuardClause:
354
+ Exclude:
355
+ - 'lib/protobuf/generators/base.rb'
356
+
357
+ # Offense count: 22
86
358
  # Cop supports --auto-correct.
87
- # Configuration parameters: EnforcedStyle, SupportedStyles.
88
- Style/EmptyLinesAroundModuleBody:
359
+ Style/IfUnlessModifier:
89
360
  Enabled: false
90
361
 
91
- # Offense count: 2
92
- Style/IndentationWidth:
362
+ # Offense count: 1
363
+ Style/MethodMissingSuper:
93
364
  Exclude:
94
- - 'protobuf.gemspec'
95
- - 'lib/protobuf/cli.rb'
365
+ - 'lib/protobuf/rpc/client.rb'
96
366
 
97
- # Offense count: 3
98
- Style/ElseAlignment:
367
+ # Offense count: 1
368
+ Style/MissingRespondToMissing:
99
369
  Exclude:
100
- - 'protobuf.gemspec'
101
- - 'lib/protobuf/cli.rb'
370
+ - 'lib/protobuf/rpc/client.rb'
102
371
 
103
- # Offense count: 8
372
+ # Offense count: 17
104
373
  # Cop supports --auto-correct.
105
- # Configuration parameters: AllowForAlignment.
106
- Style/ExtraSpacing:
374
+ Style/MultilineWhenThen:
107
375
  Exclude:
108
- - 'lib/protobuf/rpc/connectors/common.rb'
109
- - 'lib/protobuf/rpc/connectors/socket.rb'
376
+ - 'lib/protobuf/generators/field_generator.rb'
377
+ - 'lib/protobuf/generators/printable.rb'
110
378
  - 'lib/protobuf/rpc/connectors/zmq.rb'
111
- - 'lib/protobuf/rpc/servers/socket/server.rb'
112
- - 'spec/lib/protobuf/rpc/service_directory_spec.rb'
379
+ - 'lib/protobuf/rpc/servers/socket_runner.rb'
380
+ - 'lib/protobuf/rpc/servers/zmq_runner.rb'
381
+
382
+ # Offense count: 1
383
+ Style/MultipleComparison:
384
+ Exclude:
385
+ - 'lib/protobuf/generators/group_generator.rb'
386
+
387
+ # Offense count: 5
388
+ # Cop supports --auto-correct.
389
+ # Configuration parameters: EnforcedStyle.
390
+ # SupportedStyles: literals, strict
391
+ Style/MutableConstant:
392
+ Exclude:
393
+ - 'lib/protobuf/generators/field_generator.rb'
394
+ - 'lib/protobuf/rpc/buffer.rb'
395
+ - 'lib/protobuf/rpc/servers/zmq/util.rb'
113
396
 
114
- # Offense count: 46
397
+ # Offense count: 51
115
398
  # Cop supports --auto-correct.
399
+ # Configuration parameters: Strict.
116
400
  Style/NumericLiterals:
117
401
  MinDigits: 21
118
402
 
403
+ # Offense count: 10
404
+ # Cop supports --auto-correct.
405
+ # Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
406
+ # SupportedStyles: predicate, comparison
407
+ Style/NumericPredicate:
408
+ Exclude:
409
+ - 'spec/**/*'
410
+ - 'lib/protobuf/generators/file_generator.rb'
411
+ - 'lib/protobuf/generators/message_generator.rb'
412
+ - 'lib/protobuf/rpc/buffer.rb'
413
+ - 'lib/protobuf/rpc/servers/socket/server.rb'
414
+ - 'lib/protobuf/rpc/servers/zmq/broker.rb'
415
+ - 'lib/protobuf/rpc/servers/zmq/server.rb'
416
+ - 'lib/protobuf/rpc/servers/zmq/worker.rb'
417
+
418
+ # Offense count: 15
419
+ # Cop supports --auto-correct.
420
+ # Configuration parameters: PreferredDelimiters.
421
+ Style/PercentLiteralDelimiters:
422
+ Exclude:
423
+ - 'lib/protobuf/cli.rb'
424
+ - 'spec/lib/protobuf/field/field_array_spec.rb'
425
+ - 'spec/lib/protobuf/rpc/service_directory_spec.rb'
426
+
427
+ # Offense count: 3
428
+ # Cop supports --auto-correct.
429
+ Style/RedundantBegin:
430
+ Exclude:
431
+ - 'lib/protobuf/message/fields.rb'
432
+ - 'lib/protobuf/rpc/servers/zmq/server.rb'
433
+
434
+ # Offense count: 1
435
+ # Cop supports --auto-correct.
436
+ Style/RedundantCondition:
437
+ Exclude:
438
+ - 'lib/protobuf/rpc/connectors/base.rb'
439
+
440
+ # Offense count: 1
441
+ # Cop supports --auto-correct.
442
+ Style/RedundantInterpolation:
443
+ Exclude:
444
+ - 'lib/protobuf.rb'
445
+
446
+ # Offense count: 3
447
+ # Cop supports --auto-correct.
448
+ # Configuration parameters: AllowMultipleReturnValues.
449
+ Style/RedundantReturn:
450
+ Exclude:
451
+ - 'lib/protobuf/field/int64_field.rb'
452
+ - 'lib/protobuf/rpc/connectors/base.rb'
453
+ - 'lib/protobuf/rpc/connectors/zmq.rb'
454
+
455
+ # Offense count: 23
456
+ # Cop supports --auto-correct.
457
+ # Configuration parameters: EnforcedStyle.
458
+ # SupportedStyles: implicit, explicit
459
+ Style/RescueStandardError:
460
+ Exclude:
461
+ - 'lib/protobuf/cli.rb'
462
+ - 'lib/protobuf/field/int64_field.rb'
463
+ - 'lib/protobuf/field/varint_field.rb'
464
+ - 'lib/protobuf/generators/file_generator.rb'
465
+ - 'lib/protobuf/message.rb'
466
+ - 'lib/protobuf/rpc/connectors/base.rb'
467
+ - 'lib/protobuf/rpc/connectors/ping.rb'
468
+ - 'lib/protobuf/rpc/connectors/socket.rb'
469
+ - 'lib/protobuf/rpc/middleware/exception_handler.rb'
470
+ - 'lib/protobuf/rpc/middleware/request_decoder.rb'
471
+ - 'lib/protobuf/rpc/middleware/response_encoder.rb'
472
+ - 'lib/protobuf/rpc/servers/zmq/broker.rb'
473
+ - 'lib/protobuf/rpc/servers/zmq/server.rb'
474
+ - 'lib/protobuf/rpc/servers/zmq/worker.rb'
475
+ - 'lib/protobuf/rpc/service_directory.rb'
476
+
477
+ # Offense count: 9
478
+ # Cop supports --auto-correct.
479
+ # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods.
480
+ # AllowedMethods: present?, blank?, presence, try, try!
481
+ Style/SafeNavigation:
482
+ Exclude:
483
+ - 'lib/protobuf/generators/field_generator.rb'
484
+ - 'lib/protobuf/generators/service_generator.rb'
485
+ - 'lib/protobuf/message/serialization.rb'
486
+ - 'lib/protobuf/rpc/connectors/base.rb'
487
+ - 'lib/protobuf/rpc/connectors/ping.rb'
488
+ - 'lib/protobuf/rpc/servers/zmq/server.rb'
489
+
490
+ # Offense count: 71
491
+ # Cop supports --auto-correct.
492
+ # Configuration parameters: EnforcedStyle.
493
+ # SupportedStyles: only_raise, only_fail, semantic
119
494
  Style/SignalException:
120
495
  Enabled: false
121
496
 
122
- # Offense count: 473
497
+ # Offense count: 6
498
+ # Cop supports --auto-correct.
499
+ Style/StderrPuts:
500
+ Exclude:
501
+ - 'lib/protobuf/cli.rb'
502
+ - 'lib/protobuf/code_generator.rb'
503
+ - 'lib/protobuf/rpc/servers/zmq/server.rb'
504
+
505
+ # Offense count: 627
123
506
  # Cop supports --auto-correct.
124
- # Configuration parameters: EnforcedStyle, SupportedStyles.
507
+ # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
508
+ # SupportedStyles: single_quotes, double_quotes
125
509
  Style/StringLiterals:
126
510
  Enabled: false
127
511
 
128
- # Offense count: 7
512
+ # Offense count: 26
129
513
  # Cop supports --auto-correct.
130
- # Configuration parameters: IgnoredMethods.
131
- Style/SymbolProc:
514
+ # Configuration parameters: MinSize.
515
+ # SupportedStyles: percent, brackets
516
+ Style/SymbolArray:
517
+ EnforcedStyle: brackets
518
+
519
+ # Offense count: 4
520
+ # Cop supports --auto-correct.
521
+ Style/UnpackFirst:
132
522
  Exclude:
133
- - 'lib/protobuf/generators/printable.rb'
134
- - 'lib/protobuf/rpc/servers/socket/server.rb'
135
- - 'spec/encoding/all_types_spec.rb'
136
- - 'spec/encoding/extreme_values_spec.rb'
137
- - 'spec/functional/socket_server_spec.rb'
138
- - 'spec/functional/zmq_server_spec.rb'
139
- - 'spec/lib/protobuf/rpc/servers/socket_server_spec.rb'
523
+ - 'lib/protobuf/field/double_field.rb'
524
+ - 'lib/protobuf/field/fixed32_field.rb'
525
+ - 'lib/protobuf/field/float_field.rb'
526
+ - 'lib/protobuf/field/sfixed32_field.rb'
140
527
 
141
528
  # Offense count: 4
142
529
  # Cop supports --auto-correct.
143
530
  # Configuration parameters: WordRegex.
531
+ # SupportedStyles: percent, brackets
144
532
  Style/WordArray:
145
- MinSize: 4
533
+ EnforcedStyle: percent
534
+ MinSize: 3
535
+
536
+ # Offense count: 728
537
+ # Cop supports --auto-correct.
538
+ # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
539
+ # URISchemes: http, https
540
+ Layout/LineLength:
541
+ Max: 196
data/Gemfile CHANGED
@@ -1,3 +1,26 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
+
5
+ group :development do
6
+ # debuggers only work in MRI
7
+ if RUBY_ENGINE.to_sym == :ruby
8
+ if RUBY_VERSION < '2.0.0'
9
+ gem 'pry-debugger'
10
+ elsif RUBY_VERSION < '2.4.0'
11
+ gem 'pry', '~> 0.12.0'
12
+ gem 'pry-byebug'
13
+ else
14
+ gem 'pry', '~> 0.13.0'
15
+ gem 'pry-byebug', '~> 3.9.0'
16
+ end
17
+
18
+ gem 'pry-stack_explorer'
19
+
20
+ gem 'ruby-prof'
21
+ gem 'varint'
22
+ elsif RUBY_PLATFORM =~ /java/i
23
+ gem 'fast_blank_java'
24
+ gem 'pry'
25
+ end
26
+ end
data/lib/protobuf/cli.rb CHANGED
@@ -1,3 +1,4 @@
1
+ require 'active_support'
1
2
  require 'active_support/core_ext/hash/keys'
2
3
  require 'active_support/inflector'
3
4
 
@@ -1,3 +1,4 @@
1
+ require 'active_support'
1
2
  require 'active_support/core_ext/module/aliasing'
2
3
  require 'protobuf/generators/file_generator'
3
4
 
@@ -1,3 +1,4 @@
1
+ require 'active_support'
1
2
  require 'active_support/deprecation'
2
3
 
3
4
  module Protobuf
@@ -1,3 +1,4 @@
1
+ require 'active_support'
1
2
  require 'active_support/core_ext/hash/slice'
2
3
  require 'protobuf/field/field_array'
3
4
  require 'protobuf/field/field_hash'
@@ -44,7 +44,7 @@ module Protobuf
44
44
  end
45
45
  end
46
46
 
47
- def set_data(data) # rubocop:disable Style/AccessorMethodName
47
+ def set_data(data) # rubocop:disable Naming/AccessorMethodName
48
48
  @data = data.to_s
49
49
  @size = @data.size
50
50
  end
@@ -61,7 +61,7 @@ module Protobuf
61
61
  @flush
62
62
  end
63
63
 
64
- def get_data_size # rubocop:disable Style/AccessorMethodName
64
+ def get_data_size # rubocop:disable Naming/AccessorMethodName
65
65
  if @size == 0 || @data.match(SIZE_REGEX)
66
66
  sliced_size = @data.slice!(SIZE_REGEX)
67
67
  @size = sliced_size.delete('-').to_i unless sliced_size.nil?
@@ -1,3 +1,3 @@
1
1
  module Protobuf
2
- VERSION = '3.10.7' # rubocop:disable Style/MutableConstant
2
+ VERSION = '3.10.9' # rubocop:disable Style/MutableConstant
3
3
  end
data/lib/protobuf.rb CHANGED
@@ -4,6 +4,7 @@ require 'pp'
4
4
  require 'socket'
5
5
  require 'stringio'
6
6
 
7
+ require 'active_support'
7
8
  require 'active_support/core_ext/object/blank'
8
9
  require 'active_support/core_ext/object/try'
9
10
  require 'active_support/inflector'
data/protobuf.gemspec CHANGED
@@ -1,4 +1,3 @@
1
- # encoding: UTF-8
2
1
  $LOAD_PATH.push ::File.expand_path("../lib", __FILE__)
3
2
  require "protobuf/version"
4
3
 
@@ -28,30 +27,10 @@ require "protobuf/version"
28
27
 
29
28
  s.add_development_dependency 'benchmark-ips'
30
29
  s.add_development_dependency 'ffi-rzmq'
31
- s.add_development_dependency 'rake', '< 11.0' # Rake 11.0.1 removes the last_comment method which rspec-core (< 3.4.4) uses
32
- s.add_development_dependency 'rspec', '>= 3.0'
33
- s.add_development_dependency "rubocop", "~> 0.38.0"
34
- s.add_development_dependency "parser", "2.3.0.6" # Locked this down since 2.3.0.7 causes issues. https://github.com/bbatsov/rubocop/pull/2984
30
+ s.add_development_dependency 'rake', '~> 13.0'
31
+ s.add_development_dependency 'rspec', '~> 3.5'
32
+ s.add_development_dependency "rubocop", "~> 0.81.0"
35
33
  s.add_development_dependency 'simplecov'
36
34
  s.add_development_dependency 'timecop'
37
35
  s.add_development_dependency 'yard'
38
-
39
- # debuggers only work in MRI
40
- if RUBY_ENGINE.to_sym == :ruby
41
- # we don't support MRI < 1.9.3
42
- pry_debugger = if RUBY_VERSION < '2.0.0'
43
- 'pry-debugger'
44
- else
45
- 'pry-byebug'
46
- end
47
-
48
- s.add_development_dependency pry_debugger
49
- s.add_development_dependency 'pry-stack_explorer'
50
-
51
- s.add_development_dependency 'varint'
52
- s.add_development_dependency 'ruby-prof'
53
- elsif RUBY_PLATFORM =~ /java/i
54
- s.add_development_dependency 'fast_blank_java'
55
- s.add_development_dependency 'pry'
56
- end
57
36
  end
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  require 'spec_helper'
4
2
 
5
3
  RSpec.describe ::Protobuf::Field::StringField do
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  require 'stringio'
4
2
  require 'spec_helper'
5
3
  require PROTOS_PATH.join('resource.pb')
@@ -1,5 +1,6 @@
1
1
  require 'ostruct'
2
2
 
3
+ require 'active_support'
3
4
  require 'active_support/core_ext/hash/reverse_merge'
4
5
 
5
6
  require 'spec_helper'
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protobuf
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.10.7
4
+ version: 3.10.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - BJ Neilsen
8
8
  - Brandon Dewitt
9
9
  - Devin Christensen
10
10
  - Adam Hutchison
11
- autorequire:
11
+ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2022-08-24 00:00:00.000000000 Z
14
+ date: 2024-01-12 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activesupport
@@ -101,58 +101,44 @@ dependencies:
101
101
  name: rake
102
102
  requirement: !ruby/object:Gem::Requirement
103
103
  requirements:
104
- - - "<"
104
+ - - "~>"
105
105
  - !ruby/object:Gem::Version
106
- version: '11.0'
106
+ version: '13.0'
107
107
  type: :development
108
108
  prerelease: false
109
109
  version_requirements: !ruby/object:Gem::Requirement
110
110
  requirements:
111
- - - "<"
111
+ - - "~>"
112
112
  - !ruby/object:Gem::Version
113
- version: '11.0'
113
+ version: '13.0'
114
114
  - !ruby/object:Gem::Dependency
115
115
  name: rspec
116
116
  requirement: !ruby/object:Gem::Requirement
117
117
  requirements:
118
- - - ">="
118
+ - - "~>"
119
119
  - !ruby/object:Gem::Version
120
- version: '3.0'
120
+ version: '3.5'
121
121
  type: :development
122
122
  prerelease: false
123
123
  version_requirements: !ruby/object:Gem::Requirement
124
124
  requirements:
125
- - - ">="
125
+ - - "~>"
126
126
  - !ruby/object:Gem::Version
127
- version: '3.0'
127
+ version: '3.5'
128
128
  - !ruby/object:Gem::Dependency
129
129
  name: rubocop
130
130
  requirement: !ruby/object:Gem::Requirement
131
131
  requirements:
132
132
  - - "~>"
133
133
  - !ruby/object:Gem::Version
134
- version: 0.38.0
134
+ version: 0.81.0
135
135
  type: :development
136
136
  prerelease: false
137
137
  version_requirements: !ruby/object:Gem::Requirement
138
138
  requirements:
139
139
  - - "~>"
140
140
  - !ruby/object:Gem::Version
141
- version: 0.38.0
142
- - !ruby/object:Gem::Dependency
143
- name: parser
144
- requirement: !ruby/object:Gem::Requirement
145
- requirements:
146
- - - '='
147
- - !ruby/object:Gem::Version
148
- version: 2.3.0.6
149
- type: :development
150
- prerelease: false
151
- version_requirements: !ruby/object:Gem::Requirement
152
- requirements:
153
- - - '='
154
- - !ruby/object:Gem::Version
155
- version: 2.3.0.6
141
+ version: 0.81.0
156
142
  - !ruby/object:Gem::Dependency
157
143
  name: simplecov
158
144
  requirement: !ruby/object:Gem::Requirement
@@ -195,62 +181,6 @@ dependencies:
195
181
  - - ">="
196
182
  - !ruby/object:Gem::Version
197
183
  version: '0'
198
- - !ruby/object:Gem::Dependency
199
- name: pry-byebug
200
- requirement: !ruby/object:Gem::Requirement
201
- requirements:
202
- - - ">="
203
- - !ruby/object:Gem::Version
204
- version: '0'
205
- type: :development
206
- prerelease: false
207
- version_requirements: !ruby/object:Gem::Requirement
208
- requirements:
209
- - - ">="
210
- - !ruby/object:Gem::Version
211
- version: '0'
212
- - !ruby/object:Gem::Dependency
213
- name: pry-stack_explorer
214
- requirement: !ruby/object:Gem::Requirement
215
- requirements:
216
- - - ">="
217
- - !ruby/object:Gem::Version
218
- version: '0'
219
- type: :development
220
- prerelease: false
221
- version_requirements: !ruby/object:Gem::Requirement
222
- requirements:
223
- - - ">="
224
- - !ruby/object:Gem::Version
225
- version: '0'
226
- - !ruby/object:Gem::Dependency
227
- name: varint
228
- requirement: !ruby/object:Gem::Requirement
229
- requirements:
230
- - - ">="
231
- - !ruby/object:Gem::Version
232
- version: '0'
233
- type: :development
234
- prerelease: false
235
- version_requirements: !ruby/object:Gem::Requirement
236
- requirements:
237
- - - ">="
238
- - !ruby/object:Gem::Version
239
- version: '0'
240
- - !ruby/object:Gem::Dependency
241
- name: ruby-prof
242
- requirement: !ruby/object:Gem::Requirement
243
- requirements:
244
- - - ">="
245
- - !ruby/object:Gem::Version
246
- version: '0'
247
- type: :development
248
- prerelease: false
249
- version_requirements: !ruby/object:Gem::Requirement
250
- requirements:
251
- - - ">="
252
- - !ruby/object:Gem::Version
253
- version: '0'
254
184
  description: Google Protocol Buffers serialization and RPC implementation for Ruby.
255
185
  email:
256
186
  - bj.neilsen+protobuf@gmail.com
@@ -471,7 +401,7 @@ homepage: https://github.com/localshred/protobuf
471
401
  licenses:
472
402
  - MIT
473
403
  metadata: {}
474
- post_install_message:
404
+ post_install_message:
475
405
  rdoc_options: []
476
406
  require_paths:
477
407
  - lib
@@ -486,8 +416,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
486
416
  - !ruby/object:Gem::Version
487
417
  version: '0'
488
418
  requirements: []
489
- rubygems_version: 3.1.4
490
- signing_key:
419
+ rubygems_version: 3.2.33
420
+ signing_key:
491
421
  specification_version: 4
492
422
  summary: Google Protocol Buffers serialization and RPC implementation for Ruby.
493
423
  test_files: