statsd-instrument 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +3 -3
  3. data/.rubocop.yml +3 -13
  4. data/CHANGELOG.md +6 -0
  5. data/Gemfile +8 -0
  6. data/README.md +2 -2
  7. data/Rakefile +1 -1
  8. data/bin/rake +29 -0
  9. data/bin/rubocop +29 -0
  10. data/lib/statsd/instrument.rb +4 -1
  11. data/lib/statsd/instrument/assertions.rb +200 -196
  12. data/lib/statsd/instrument/capture_sink.rb +23 -19
  13. data/lib/statsd/instrument/client.rb +414 -410
  14. data/lib/statsd/instrument/datagram.rb +69 -65
  15. data/lib/statsd/instrument/datagram_builder.rb +81 -77
  16. data/lib/statsd/instrument/dogstatsd_datagram.rb +76 -72
  17. data/lib/statsd/instrument/dogstatsd_datagram_builder.rb +68 -64
  18. data/lib/statsd/instrument/environment.rb +80 -77
  19. data/lib/statsd/instrument/expectation.rb +96 -92
  20. data/lib/statsd/instrument/helpers.rb +11 -7
  21. data/lib/statsd/instrument/log_sink.rb +20 -16
  22. data/lib/statsd/instrument/matchers.rb +86 -70
  23. data/lib/statsd/instrument/null_sink.rb +12 -8
  24. data/lib/statsd/instrument/railtie.rb +11 -7
  25. data/lib/statsd/instrument/statsd_datagram_builder.rb +12 -8
  26. data/lib/statsd/instrument/udp_sink.rb +50 -46
  27. data/lib/statsd/instrument/version.rb +1 -1
  28. data/statsd-instrument.gemspec +2 -8
  29. data/test/assertions_test.rb +12 -12
  30. data/test/capture_sink_test.rb +8 -8
  31. data/test/client_test.rb +54 -54
  32. data/test/datagram_builder_test.rb +29 -29
  33. data/test/datagram_test.rb +1 -1
  34. data/test/dogstatsd_datagram_builder_test.rb +28 -28
  35. data/test/environment_test.rb +9 -9
  36. data/test/helpers/rubocop_helper.rb +9 -6
  37. data/test/helpers_test.rb +5 -5
  38. data/test/integration_test.rb +1 -1
  39. data/test/log_sink_test.rb +2 -2
  40. data/test/matchers_test.rb +36 -36
  41. data/test/null_sink_test.rb +2 -2
  42. data/test/rubocop/metric_return_value_test.rb +3 -3
  43. data/test/rubocop/positional_arguments_test.rb +10 -10
  44. data/test/statsd_instrumentation_test.rb +66 -66
  45. data/test/statsd_test.rb +44 -44
  46. data/test/test_helper.rb +6 -4
  47. data/test/udp_sink_test.rb +8 -8
  48. metadata +7 -103
  49. data/.rubocop-https---shopify-github-io-ruby-style-guide-rubocop-yml +0 -1027
@@ -9,10 +9,12 @@ require 'statsd-instrument'
9
9
 
10
10
  require_relative 'helpers/rubocop_helper'
11
11
 
12
- module StatsD::Instrument
13
- def self.strict_mode_enabled?
14
- StatsD::Instrument.const_defined?(:Strict) &&
15
- StatsD.singleton_class.ancestors.include?(StatsD::Instrument::Strict)
12
+ module StatsD
13
+ module Instrument
14
+ def self.strict_mode_enabled?
15
+ StatsD::Instrument.const_defined?(:Strict) &&
16
+ StatsD.singleton_class.ancestors.include?(StatsD::Instrument::Strict)
17
+ end
16
18
  end
17
19
  end
18
20
 
@@ -19,19 +19,19 @@ class UDPSinkTest < Minitest::Test
19
19
  udp_sink << 'foo:1|c'
20
20
 
21
21
  datagram, _source = @receiver.recvfrom(100)
22
- assert_equal 'foo:1|c', datagram
22
+ assert_equal('foo:1|c', datagram)
23
23
  end
24
24
 
25
25
  def test_sample?
26
26
  udp_sink = StatsD::Instrument::UDPSink.new(@host, @port)
27
- assert udp_sink.sample?(1)
28
- refute udp_sink.sample?(0)
27
+ assert(udp_sink.sample?(1))
28
+ refute(udp_sink.sample?(0))
29
29
 
30
30
  udp_sink.stubs(:rand).returns(0.3)
31
- assert udp_sink.sample?(0.5)
31
+ assert(udp_sink.sample?(0.5))
32
32
 
33
33
  udp_sink.stubs(:rand).returns(0.7)
34
- refute udp_sink.sample?(0.5)
34
+ refute(udp_sink.sample?(0.5))
35
35
  end
36
36
 
37
37
  def test_parallelism
@@ -43,7 +43,7 @@ class UDPSinkTest < Minitest::Test
43
43
  datagrams << datagram
44
44
  end
45
45
 
46
- assert_equal 100, datagrams.size
46
+ assert_equal(100, datagrams.size)
47
47
  end
48
48
 
49
49
  def test_socket_error_should_invalidate_socket
@@ -74,8 +74,8 @@ class UDPSinkTest < Minitest::Test
74
74
  Process.kill('TERM', pid)
75
75
  _, exit_status = Process.waitpid2(pid)
76
76
 
77
- assert_equal 0, exit_status, "The forked process did not exit cleanly"
78
- assert_equal "exiting:1|c", @receiver.recvfrom_nonblock(100).first
77
+ assert_equal(0, exit_status, "The forked process did not exit cleanly")
78
+ assert_equal("exiting:1|c", @receiver.recvfrom_nonblock(100).first)
79
79
 
80
80
  rescue NotImplementedError
81
81
  pass("Fork is not implemented on #{RUBY_PLATFORM}")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: statsd-instrument
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jesse Storimer
@@ -10,106 +10,8 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-01-10 00:00:00.000000000 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: rake
17
- requirement: !ruby/object:Gem::Requirement
18
- requirements:
19
- - - ">="
20
- - !ruby/object:Gem::Version
21
- version: '0'
22
- type: :development
23
- prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- version: '0'
29
- - !ruby/object:Gem::Dependency
30
- name: minitest
31
- requirement: !ruby/object:Gem::Requirement
32
- requirements:
33
- - - ">="
34
- - !ruby/object:Gem::Version
35
- version: '0'
36
- type: :development
37
- prerelease: false
38
- version_requirements: !ruby/object:Gem::Requirement
39
- requirements:
40
- - - ">="
41
- - !ruby/object:Gem::Version
42
- version: '0'
43
- - !ruby/object:Gem::Dependency
44
- name: rspec
45
- requirement: !ruby/object:Gem::Requirement
46
- requirements:
47
- - - ">="
48
- - !ruby/object:Gem::Version
49
- version: '0'
50
- type: :development
51
- prerelease: false
52
- version_requirements: !ruby/object:Gem::Requirement
53
- requirements:
54
- - - ">="
55
- - !ruby/object:Gem::Version
56
- version: '0'
57
- - !ruby/object:Gem::Dependency
58
- name: mocha
59
- requirement: !ruby/object:Gem::Requirement
60
- requirements:
61
- - - ">="
62
- - !ruby/object:Gem::Version
63
- version: '0'
64
- type: :development
65
- prerelease: false
66
- version_requirements: !ruby/object:Gem::Requirement
67
- requirements:
68
- - - ">="
69
- - !ruby/object:Gem::Version
70
- version: '0'
71
- - !ruby/object:Gem::Dependency
72
- name: yard
73
- requirement: !ruby/object:Gem::Requirement
74
- requirements:
75
- - - ">="
76
- - !ruby/object:Gem::Version
77
- version: '0'
78
- type: :development
79
- prerelease: false
80
- version_requirements: !ruby/object:Gem::Requirement
81
- requirements:
82
- - - ">="
83
- - !ruby/object:Gem::Version
84
- version: '0'
85
- - !ruby/object:Gem::Dependency
86
- name: rubocop
87
- requirement: !ruby/object:Gem::Requirement
88
- requirements:
89
- - - ">="
90
- - !ruby/object:Gem::Version
91
- version: '0'
92
- type: :development
93
- prerelease: false
94
- version_requirements: !ruby/object:Gem::Requirement
95
- requirements:
96
- - - ">="
97
- - !ruby/object:Gem::Version
98
- version: '0'
99
- - !ruby/object:Gem::Dependency
100
- name: benchmark-ips
101
- requirement: !ruby/object:Gem::Requirement
102
- requirements:
103
- - - ">="
104
- - !ruby/object:Gem::Version
105
- version: '0'
106
- type: :development
107
- prerelease: false
108
- version_requirements: !ruby/object:Gem::Requirement
109
- requirements:
110
- - - ">="
111
- - !ruby/object:Gem::Version
112
- version: '0'
13
+ date: 2020-05-20 00:00:00.000000000 Z
14
+ dependencies: []
113
15
  description: A StatsD client for Ruby apps. Provides metaprogramming methods to inject
114
16
  StatsD instrumentation into your code.
115
17
  email:
@@ -123,7 +25,6 @@ files:
123
25
  - ".github/workflows/benchmark.yml"
124
26
  - ".github/workflows/ci.yml"
125
27
  - ".gitignore"
126
- - ".rubocop-https---shopify-github-io-ruby-style-guide-rubocop-yml"
127
28
  - ".rubocop.yml"
128
29
  - ".yardopts"
129
30
  - CHANGELOG.md
@@ -135,6 +36,8 @@ files:
135
36
  - benchmark/README.md
136
37
  - benchmark/send-metrics-to-dev-null-log
137
38
  - benchmark/send-metrics-to-local-udp-receiver
39
+ - bin/rake
40
+ - bin/rubocop
138
41
  - lib/statsd-instrument.rb
139
42
  - lib/statsd/instrument.rb
140
43
  - lib/statsd/instrument/assertions.rb
@@ -199,7 +102,8 @@ files:
199
102
  homepage: https://github.com/Shopify/statsd-instrument
200
103
  licenses:
201
104
  - MIT
202
- metadata: {}
105
+ metadata:
106
+ allowed_push_host: https://rubygems.org
203
107
  post_install_message:
204
108
  rdoc_options: []
205
109
  require_paths:
@@ -1,1027 +0,0 @@
1
- AllCops:
2
- Exclude:
3
- - 'db/schema.rb'
4
- DisabledByDefault: true
5
- StyleGuideBaseURL: https://shopify.github.io/ruby-style-guide/
6
-
7
- Lint/AssignmentInCondition:
8
- Enabled: true
9
-
10
- Layout/AccessModifierIndentation:
11
- EnforcedStyle: indent
12
- SupportedStyles:
13
- - outdent
14
- - indent
15
- IndentationWidth:
16
-
17
- Style/Alias:
18
- EnforcedStyle: prefer_alias_method
19
- SupportedStyles:
20
- - prefer_alias
21
- - prefer_alias_method
22
-
23
- Layout/HashAlignment:
24
- EnforcedHashRocketStyle: key
25
- EnforcedColonStyle: key
26
- EnforcedLastArgumentHashStyle: ignore_implicit
27
- SupportedLastArgumentHashStyles:
28
- - always_inspect
29
- - always_ignore
30
- - ignore_implicit
31
- - ignore_explicit
32
-
33
- Layout/ParameterAlignment:
34
- EnforcedStyle: with_fixed_indentation
35
- SupportedStyles:
36
- - with_first_parameter
37
- - with_fixed_indentation
38
- IndentationWidth:
39
-
40
- Style/AndOr:
41
- EnforcedStyle: always
42
- SupportedStyles:
43
- - always
44
- - conditionals
45
-
46
- Style/BarePercentLiterals:
47
- EnforcedStyle: bare_percent
48
- SupportedStyles:
49
- - percent_q
50
- - bare_percent
51
-
52
- Style/BlockDelimiters:
53
- EnforcedStyle: line_count_based
54
- SupportedStyles:
55
- - line_count_based
56
- - semantic
57
- - braces_for_chaining
58
- ProceduralMethods:
59
- - benchmark
60
- - bm
61
- - bmbm
62
- - create
63
- - each_with_object
64
- - measure
65
- - new
66
- - realtime
67
- - tap
68
- - with_object
69
- FunctionalMethods:
70
- - let
71
- - let!
72
- - subject
73
- - watch
74
- IgnoredMethods:
75
- - lambda
76
- - proc
77
- - it
78
-
79
- Style/BracesAroundHashParameters:
80
- EnforcedStyle: no_braces
81
- SupportedStyles:
82
- - braces
83
- - no_braces
84
- - context_dependent
85
-
86
- Layout/CaseIndentation:
87
- EnforcedStyle: end
88
- SupportedStyles:
89
- - case
90
- - end
91
- IndentOneStep: false
92
- IndentationWidth:
93
-
94
- Style/ClassAndModuleChildren:
95
- EnforcedStyle: nested
96
- SupportedStyles:
97
- - nested
98
- - compact
99
-
100
- Style/ClassCheck:
101
- EnforcedStyle: is_a?
102
- SupportedStyles:
103
- - is_a?
104
- - kind_of?
105
-
106
- Style/CommandLiteral:
107
- EnforcedStyle: percent_x
108
- SupportedStyles:
109
- - backticks
110
- - percent_x
111
- - mixed
112
- AllowInnerBackticks: false
113
-
114
- Style/CommentAnnotation:
115
- Keywords:
116
- - TODO
117
- - FIXME
118
- - OPTIMIZE
119
- - HACK
120
- - REVIEW
121
-
122
- Style/ConditionalAssignment:
123
- EnforcedStyle: assign_to_condition
124
- SupportedStyles:
125
- - assign_to_condition
126
- - assign_inside_condition
127
- SingleLineConditionsOnly: true
128
-
129
- Layout/DotPosition:
130
- EnforcedStyle: leading
131
- SupportedStyles:
132
- - leading
133
- - trailing
134
-
135
- Style/EmptyElse:
136
- EnforcedStyle: both
137
- SupportedStyles:
138
- - empty
139
- - nil
140
- - both
141
-
142
- Layout/EmptyLineBetweenDefs:
143
- AllowAdjacentOneLineDefs: false
144
-
145
- Layout/EmptyLinesAroundBlockBody:
146
- EnforcedStyle: no_empty_lines
147
- SupportedStyles:
148
- - empty_lines
149
- - no_empty_lines
150
-
151
- Layout/EmptyLinesAroundClassBody:
152
- EnforcedStyle: no_empty_lines
153
- SupportedStyles:
154
- - empty_lines
155
- - empty_lines_except_namespace
156
- - no_empty_lines
157
-
158
- Layout/EmptyLinesAroundModuleBody:
159
- EnforcedStyle: no_empty_lines
160
- SupportedStyles:
161
- - empty_lines
162
- - empty_lines_except_namespace
163
- - no_empty_lines
164
-
165
- Layout/ExtraSpacing:
166
- AllowForAlignment: true
167
- ForceEqualSignAlignment: false
168
-
169
- Naming/FileName:
170
- Exclude: []
171
- ExpectMatchingDefinition: false
172
- Regex:
173
- IgnoreExecutableScripts: true
174
-
175
- Layout/FirstArgumentIndentation:
176
- EnforcedStyle: consistent
177
- SupportedStyles:
178
- - consistent
179
- - special_for_inner_method_call
180
- - special_for_inner_method_call_in_parentheses
181
- IndentationWidth:
182
-
183
- Style/For:
184
- EnforcedStyle: each
185
- SupportedStyles:
186
- - for
187
- - each
188
-
189
- Style/FormatString:
190
- EnforcedStyle: format
191
- SupportedStyles:
192
- - format
193
- - sprintf
194
- - percent
195
-
196
- Style/FrozenStringLiteralComment:
197
- Details: >-
198
- Add `# frozen_string_literal: true` to the top of the file. Frozen string
199
- literals will become the default in a future Ruby version, and we want to
200
- make sure we're ready.
201
- EnforcedStyle: always
202
- SupportedStyles:
203
- - always
204
- - never
205
-
206
- Style/GlobalVars:
207
- AllowedVariables: []
208
-
209
- Style/HashSyntax:
210
- EnforcedStyle: ruby19
211
- SupportedStyles:
212
- - ruby19
213
- - hash_rockets
214
- - no_mixed_keys
215
- - ruby19_no_mixed_keys
216
- UseHashRocketsWithSymbolValues: false
217
- PreferHashRocketsForNonAlnumEndingSymbols: false
218
-
219
- Layout/IndentationConsistency:
220
- EnforcedStyle: normal
221
- SupportedStyles:
222
- - normal
223
- - rails
224
-
225
- Layout/IndentationWidth:
226
- Width: 2
227
-
228
- Layout/FirstArrayElementIndentation:
229
- EnforcedStyle: consistent
230
- SupportedStyles:
231
- - special_inside_parentheses
232
- - consistent
233
- - align_brackets
234
- IndentationWidth:
235
-
236
- Layout/AssignmentIndentation:
237
- IndentationWidth:
238
-
239
- Layout/FirstHashElementIndentation:
240
- EnforcedStyle: consistent
241
- SupportedStyles:
242
- - special_inside_parentheses
243
- - consistent
244
- - align_braces
245
- IndentationWidth:
246
-
247
- Style/LambdaCall:
248
- EnforcedStyle: call
249
- SupportedStyles:
250
- - call
251
- - braces
252
-
253
- Style/Next:
254
- EnforcedStyle: skip_modifier_ifs
255
- MinBodyLength: 3
256
- SupportedStyles:
257
- - skip_modifier_ifs
258
- - always
259
-
260
- Style/NonNilCheck:
261
- IncludeSemanticChanges: false
262
-
263
- Style/MethodCallWithArgsParentheses:
264
- Enabled: true
265
- IgnoreMacros: true
266
- IgnoredMethods:
267
- - require
268
- - require_relative
269
- - require_dependency
270
- - yield
271
- - raise
272
- - puts
273
- Exclude:
274
- - Gemfile
275
-
276
- Style/MethodDefParentheses:
277
- EnforcedStyle: require_parentheses
278
- SupportedStyles:
279
- - require_parentheses
280
- - require_no_parentheses
281
- - require_no_parentheses_except_multiline
282
-
283
- Naming/MethodName:
284
- EnforcedStyle: snake_case
285
- SupportedStyles:
286
- - snake_case
287
- - camelCase
288
-
289
- Layout/MultilineArrayBraceLayout:
290
- EnforcedStyle: symmetrical
291
- SupportedStyles:
292
- - symmetrical
293
- - new_line
294
- - same_line
295
-
296
- Layout/MultilineHashBraceLayout:
297
- EnforcedStyle: symmetrical
298
- SupportedStyles:
299
- - symmetrical
300
- - new_line
301
- - same_line
302
-
303
- Layout/MultilineMethodCallBraceLayout:
304
- EnforcedStyle: symmetrical
305
- SupportedStyles:
306
- - symmetrical
307
- - new_line
308
- - same_line
309
-
310
- Layout/MultilineMethodCallIndentation:
311
- EnforcedStyle: indented
312
- SupportedStyles:
313
- - aligned
314
- - indented
315
- - indented_relative_to_receiver
316
- IndentationWidth: 2
317
-
318
- Layout/MultilineMethodDefinitionBraceLayout:
319
- EnforcedStyle: symmetrical
320
- SupportedStyles:
321
- - symmetrical
322
- - new_line
323
- - same_line
324
-
325
- Style/NumericLiteralPrefix:
326
- EnforcedOctalStyle: zero_only
327
- SupportedOctalStyles:
328
- - zero_with_o
329
- - zero_only
330
-
331
- Style/ParenthesesAroundCondition:
332
- AllowSafeAssignment: true
333
-
334
- Style/PercentQLiterals:
335
- EnforcedStyle: lower_case_q
336
- SupportedStyles:
337
- - lower_case_q
338
- - upper_case_q
339
-
340
- Naming/PredicateName:
341
- NamePrefix:
342
- - is_
343
- ForbiddenPrefixes:
344
- - is_
345
- AllowedMethods:
346
- - is_a?
347
- Exclude:
348
- - 'spec/**/*'
349
-
350
- Style/PreferredHashMethods:
351
- EnforcedStyle: short
352
- SupportedStyles:
353
- - short
354
- - verbose
355
-
356
- Style/RaiseArgs:
357
- EnforcedStyle: exploded
358
- SupportedStyles:
359
- - compact
360
- - exploded
361
-
362
- Style/RedundantReturn:
363
- AllowMultipleReturnValues: false
364
-
365
- Style/RegexpLiteral:
366
- EnforcedStyle: mixed
367
- SupportedStyles:
368
- - slashes
369
- - percent_r
370
- - mixed
371
- AllowInnerSlashes: false
372
-
373
- Style/SafeNavigation:
374
- ConvertCodeThatCanStartToReturnNil: false
375
- Enabled: true
376
-
377
- Lint/SafeNavigationChain:
378
- Enabled: true
379
-
380
- Style/Semicolon:
381
- AllowAsExpressionSeparator: false
382
-
383
- Style/SignalException:
384
- EnforcedStyle: only_raise
385
- SupportedStyles:
386
- - only_raise
387
- - only_fail
388
- - semantic
389
-
390
- Style/SingleLineMethods:
391
- AllowIfMethodIsEmpty: true
392
-
393
- Layout/SpaceBeforeFirstArg:
394
- AllowForAlignment: true
395
-
396
- Style/SpecialGlobalVars:
397
- EnforcedStyle: use_english_names
398
- SupportedStyles:
399
- - use_perl_names
400
- - use_english_names
401
-
402
- Style/StabbyLambdaParentheses:
403
- EnforcedStyle: require_parentheses
404
- SupportedStyles:
405
- - require_parentheses
406
- - require_no_parentheses
407
-
408
- Style/StringLiteralsInInterpolation:
409
- EnforcedStyle: single_quotes
410
- SupportedStyles:
411
- - single_quotes
412
- - double_quotes
413
-
414
- Layout/SpaceAroundBlockParameters:
415
- EnforcedStyleInsidePipes: no_space
416
- SupportedStylesInsidePipes:
417
- - space
418
- - no_space
419
-
420
- Layout/SpaceAroundEqualsInParameterDefault:
421
- EnforcedStyle: space
422
- SupportedStyles:
423
- - space
424
- - no_space
425
-
426
- Layout/SpaceAroundOperators:
427
- AllowForAlignment: true
428
-
429
- Layout/SpaceBeforeBlockBraces:
430
- EnforcedStyle: space
431
- EnforcedStyleForEmptyBraces: space
432
- SupportedStyles:
433
- - space
434
- - no_space
435
-
436
- Layout/SpaceInsideBlockBraces:
437
- EnforcedStyle: space
438
- SupportedStyles:
439
- - space
440
- - no_space
441
- EnforcedStyleForEmptyBraces: no_space
442
- SpaceBeforeBlockParameters: true
443
-
444
- Layout/SpaceInsideHashLiteralBraces:
445
- EnforcedStyle: space
446
- EnforcedStyleForEmptyBraces: no_space
447
- SupportedStyles:
448
- - space
449
- - no_space
450
- - compact
451
-
452
- Layout/SpaceInsideStringInterpolation:
453
- EnforcedStyle: no_space
454
- SupportedStyles:
455
- - space
456
- - no_space
457
-
458
- Style/SymbolProc:
459
- IgnoredMethods:
460
- - respond_to
461
- - define_method
462
-
463
- Style/TernaryParentheses:
464
- EnforcedStyle: require_no_parentheses
465
- SupportedStyles:
466
- - require_parentheses
467
- - require_no_parentheses
468
- AllowSafeAssignment: true
469
-
470
- Layout/TrailingEmptyLines:
471
- EnforcedStyle: final_newline
472
- SupportedStyles:
473
- - final_newline
474
- - final_blank_line
475
-
476
- Style/TrivialAccessors:
477
- ExactNameMatch: true
478
- AllowPredicates: true
479
- AllowDSLWriters: false
480
- IgnoreClassMethods: false
481
- AllowedMethods:
482
- - to_ary
483
- - to_a
484
- - to_c
485
- - to_enum
486
- - to_h
487
- - to_hash
488
- - to_i
489
- - to_int
490
- - to_io
491
- - to_open
492
- - to_path
493
- - to_proc
494
- - to_r
495
- - to_regexp
496
- - to_str
497
- - to_s
498
- - to_sym
499
-
500
- Naming/VariableName:
501
- EnforcedStyle: snake_case
502
- SupportedStyles:
503
- - snake_case
504
- - camelCase
505
-
506
- Style/WhileUntilModifier:
507
- Enabled: true
508
-
509
- Metrics/BlockNesting:
510
- Max: 3
511
-
512
- Metrics/LineLength:
513
- Max: 120
514
- AllowHeredoc: true
515
- AllowURI: true
516
- URISchemes:
517
- - http
518
- - https
519
- IgnoreCopDirectives: false
520
- IgnoredPatterns:
521
- - '\A\s*(remote_)?test(_\w+)?\s.*(do|->)(\s|\Z)'
522
-
523
- Metrics/ParameterLists:
524
- Max: 5
525
- CountKeywordArgs: false
526
-
527
- Layout/BlockAlignment:
528
- EnforcedStyleAlignWith: either
529
- SupportedStylesAlignWith:
530
- - either
531
- - start_of_block
532
- - start_of_line
533
-
534
- Layout/EndAlignment:
535
- EnforcedStyleAlignWith: variable
536
- SupportedStylesAlignWith:
537
- - keyword
538
- - variable
539
- - start_of_line
540
-
541
- Layout/DefEndAlignment:
542
- EnforcedStyleAlignWith: start_of_line
543
- SupportedStylesAlignWith:
544
- - start_of_line
545
- - def
546
-
547
- Lint/InheritException:
548
- EnforcedStyle: runtime_error
549
- SupportedStyles:
550
- - runtime_error
551
- - standard_error
552
-
553
- Lint/UnusedBlockArgument:
554
- IgnoreEmptyBlocks: true
555
- AllowUnusedKeywordArguments: false
556
-
557
- Lint/UnusedMethodArgument:
558
- AllowUnusedKeywordArguments: false
559
- IgnoreEmptyMethods: true
560
-
561
- Naming/AccessorMethodName:
562
- Enabled: true
563
-
564
- Layout/ArrayAlignment:
565
- Enabled: true
566
-
567
- Style/ArrayJoin:
568
- Enabled: true
569
-
570
- Naming/AsciiIdentifiers:
571
- Enabled: true
572
-
573
- Style/Attr:
574
- Enabled: true
575
-
576
- Style/BeginBlock:
577
- Enabled: true
578
-
579
- Style/BlockComments:
580
- Enabled: true
581
-
582
- Layout/BlockEndNewline:
583
- Enabled: true
584
-
585
- Style/CaseEquality:
586
- Enabled: true
587
-
588
- Style/CharacterLiteral:
589
- Enabled: true
590
-
591
- Naming/ClassAndModuleCamelCase:
592
- Enabled: true
593
-
594
- Style/ClassMethods:
595
- Enabled: true
596
-
597
- Style/ClassVars:
598
- Enabled: true
599
-
600
- Layout/ClosingParenthesisIndentation:
601
- Enabled: true
602
-
603
- Style/ColonMethodCall:
604
- Enabled: true
605
-
606
- Layout/CommentIndentation:
607
- Enabled: true
608
-
609
- Naming/ConstantName:
610
- Enabled: true
611
-
612
- Style/DateTime:
613
- Enabled: true
614
-
615
- Style/DefWithParentheses:
616
- Enabled: true
617
-
618
- Style/EachForSimpleLoop:
619
- Enabled: true
620
-
621
- Style/EachWithObject:
622
- Enabled: true
623
-
624
- Layout/ElseAlignment:
625
- Enabled: true
626
-
627
- Style/EmptyCaseCondition:
628
- Enabled: true
629
-
630
- Layout/EmptyLines:
631
- Enabled: true
632
-
633
- Layout/EmptyLinesAroundAccessModifier:
634
- Enabled: true
635
-
636
- Layout/EmptyLinesAroundMethodBody:
637
- Enabled: true
638
-
639
- Style/EmptyLiteral:
640
- Enabled: true
641
-
642
- Style/EndBlock:
643
- Enabled: true
644
-
645
- Layout/EndOfLine:
646
- Enabled: true
647
-
648
- Style/EvenOdd:
649
- Enabled: true
650
-
651
- Layout/InitialIndentation:
652
- Enabled: true
653
-
654
- Lint/FlipFlop:
655
- Enabled: true
656
-
657
- Style/IfInsideElse:
658
- Enabled: true
659
-
660
- Style/IfUnlessModifierOfIfUnless:
661
- Enabled: true
662
-
663
- Style/IfWithSemicolon:
664
- Enabled: true
665
-
666
- Style/IdenticalConditionalBranches:
667
- Enabled: true
668
-
669
- Style/InfiniteLoop:
670
- Enabled: true
671
-
672
- Layout/LeadingCommentSpace:
673
- Enabled: true
674
-
675
- Style/LineEndConcatenation:
676
- Enabled: true
677
-
678
- Style/MethodCallWithoutArgsParentheses:
679
- Enabled: true
680
-
681
- Style/MethodMissingSuper:
682
- Enabled: true
683
-
684
- Style/MissingRespondToMissing:
685
- Enabled: true
686
-
687
- Layout/MultilineBlockLayout:
688
- Enabled: true
689
-
690
- Style/MultilineIfThen:
691
- Enabled: true
692
-
693
- Style/MultilineMemoization:
694
- Enabled: true
695
-
696
- Style/MultilineTernaryOperator:
697
- Enabled: true
698
-
699
- Style/NegatedIf:
700
- Enabled: true
701
-
702
- Style/NegatedWhile:
703
- Enabled: true
704
-
705
- Style/NestedModifier:
706
- Enabled: true
707
-
708
- Style/NestedParenthesizedCalls:
709
- Enabled: true
710
-
711
- Style/NestedTernaryOperator:
712
- Enabled: true
713
-
714
- Style/NilComparison:
715
- Enabled: true
716
-
717
- Style/Not:
718
- Enabled: true
719
-
720
- Style/OneLineConditional:
721
- Enabled: true
722
-
723
- Naming/BinaryOperatorParameterName:
724
- Enabled: true
725
-
726
- Style/OptionalArguments:
727
- Enabled: true
728
-
729
- Style/ParallelAssignment:
730
- Enabled: true
731
-
732
- Style/PerlBackrefs:
733
- Enabled: true
734
-
735
- Style/Proc:
736
- Enabled: true
737
-
738
- Style/RedundantBegin:
739
- Enabled: true
740
-
741
- Style/RedundantException:
742
- Enabled: true
743
-
744
- Style/RedundantFreeze:
745
- Enabled: true
746
-
747
- Style/RedundantParentheses:
748
- Enabled: true
749
-
750
- Style/RedundantSelf:
751
- Enabled: true
752
-
753
- Style/RedundantSortBy:
754
- Enabled: true
755
-
756
- Layout/RescueEnsureAlignment:
757
- Enabled: true
758
-
759
- Style/RescueModifier:
760
- Enabled: true
761
-
762
- Style/Sample:
763
- Enabled: true
764
-
765
- Style/SelfAssignment:
766
- Enabled: true
767
-
768
- Layout/SpaceAfterColon:
769
- Enabled: true
770
-
771
- Layout/SpaceAfterComma:
772
- Enabled: true
773
-
774
- Layout/SpaceAfterMethodName:
775
- Enabled: true
776
-
777
- Layout/SpaceAfterNot:
778
- Enabled: true
779
-
780
- Layout/SpaceAfterSemicolon:
781
- Enabled: true
782
-
783
- Layout/SpaceBeforeComma:
784
- Enabled: true
785
-
786
- Layout/SpaceBeforeComment:
787
- Enabled: true
788
-
789
- Layout/SpaceBeforeSemicolon:
790
- Enabled: true
791
-
792
- Layout/SpaceAroundKeyword:
793
- Enabled: true
794
-
795
- Layout/SpaceInsideArrayPercentLiteral:
796
- Enabled: true
797
-
798
- Layout/SpaceInsidePercentLiteralDelimiters:
799
- Enabled: true
800
-
801
- Layout/SpaceInsideArrayLiteralBrackets:
802
- Enabled: true
803
-
804
- Layout/SpaceInsideParens:
805
- Enabled: true
806
-
807
- Layout/SpaceInsideRangeLiteral:
808
- Enabled: true
809
-
810
- Style/SymbolLiteral:
811
- Enabled: true
812
-
813
- Layout/Tab:
814
- Enabled: true
815
-
816
- Layout/TrailingWhitespace:
817
- Enabled: true
818
-
819
- Style/UnlessElse:
820
- Enabled: true
821
-
822
- Style/RedundantCapitalW:
823
- Enabled: true
824
-
825
- Style/RedundantInterpolation:
826
- Enabled: true
827
-
828
- Style/RedundantPercentQ:
829
- Enabled: true
830
-
831
- Style/VariableInterpolation:
832
- Enabled: true
833
-
834
- Style/WhenThen:
835
- Enabled: true
836
-
837
- Style/WhileUntilDo:
838
- Enabled: true
839
-
840
- Style/ZeroLengthPredicate:
841
- Enabled: true
842
-
843
- Layout/HeredocIndentation:
844
- EnforcedStyle: squiggly
845
-
846
- Lint/AmbiguousOperator:
847
- Enabled: true
848
-
849
- Lint/AmbiguousRegexpLiteral:
850
- Enabled: true
851
-
852
- Lint/CircularArgumentReference:
853
- Enabled: true
854
-
855
- Layout/ConditionPosition:
856
- Enabled: true
857
-
858
- Lint/Debugger:
859
- Enabled: true
860
-
861
- Lint/DeprecatedClassMethods:
862
- Enabled: true
863
-
864
- Lint/DuplicateMethods:
865
- Enabled: true
866
-
867
- Lint/DuplicateHashKey:
868
- Enabled: true
869
-
870
- Lint/EachWithObjectArgument:
871
- Enabled: true
872
-
873
- Lint/ElseLayout:
874
- Enabled: true
875
-
876
- Lint/EmptyEnsure:
877
- Enabled: true
878
-
879
- Lint/EmptyInterpolation:
880
- Enabled: true
881
-
882
- Lint/EndInMethod:
883
- Enabled: true
884
-
885
- Lint/EnsureReturn:
886
- Enabled: true
887
-
888
- Lint/FloatOutOfRange:
889
- Enabled: true
890
-
891
- Lint/FormatParameterMismatch:
892
- Enabled: true
893
-
894
- Lint/SuppressedException:
895
- AllowComments: true
896
-
897
- Lint/ImplicitStringConcatenation:
898
- Description: Checks for adjacent string literals on the same line, which could
899
- better be represented as a single string literal.
900
-
901
- Lint/IneffectiveAccessModifier:
902
- Description: Checks for attempts to use `private` or `protected` to set the visibility
903
- of a class method, which does not work.
904
-
905
- Lint/LiteralAsCondition:
906
- Enabled: true
907
-
908
- Lint/LiteralInInterpolation:
909
- Enabled: true
910
-
911
- Lint/Loop:
912
- Description: Use Kernel#loop with break rather than begin/end/until or begin/end/while
913
- for post-loop tests.
914
-
915
- Lint/NestedMethodDefinition:
916
- Enabled: true
917
-
918
- Lint/NextWithoutAccumulator:
919
- Description: Do not omit the accumulator when calling `next` in a `reduce`/`inject`
920
- block.
921
-
922
- Lint/NonLocalExitFromIterator:
923
- Enabled: true
924
-
925
- Lint/ParenthesesAsGroupedExpression:
926
- Enabled: true
927
-
928
- Lint/PercentStringArray:
929
- Enabled: true
930
-
931
- Lint/PercentSymbolArray:
932
- Enabled: true
933
-
934
- Lint/RandOne:
935
- Description: Checks for `rand(1)` calls. Such calls always return `0` and most
936
- likely a mistake.
937
-
938
- Lint/RequireParentheses:
939
- Enabled: true
940
-
941
- Lint/RescueException:
942
- Enabled: true
943
-
944
- Lint/ShadowedException:
945
- Enabled: true
946
-
947
- Lint/ShadowingOuterLocalVariable:
948
- Enabled: true
949
-
950
- Lint/RedundantStringCoercion:
951
- Enabled: true
952
-
953
- Lint/UnderscorePrefixedVariableName:
954
- Enabled: true
955
-
956
- Lint/UnifiedInteger:
957
- Enabled: true
958
-
959
- Lint/RedundantCopDisableDirective:
960
- Enabled: true
961
-
962
- Lint/RedundantCopEnableDirective:
963
- Enabled: true
964
-
965
- Lint/RedundantSplatExpansion:
966
- Enabled: true
967
-
968
- Lint/UnreachableCode:
969
- Enabled: true
970
-
971
- Lint/UselessAccessModifier:
972
- ContextCreatingMethods: []
973
-
974
- Lint/UselessAssignment:
975
- Enabled: true
976
-
977
- Lint/UselessComparison:
978
- Enabled: true
979
-
980
- Lint/UselessElseWithoutRescue:
981
- Enabled: true
982
-
983
- Lint/UselessSetterCall:
984
- Enabled: true
985
-
986
- Lint/Void:
987
- Enabled: true
988
-
989
- Security/Eval:
990
- Enabled: true
991
-
992
- Security/JSONLoad:
993
- Enabled: true
994
-
995
- Security/Open:
996
- Enabled: true
997
-
998
- Lint/BigDecimalNew:
999
- Enabled: true
1000
-
1001
- Style/Strip:
1002
- Enabled: true
1003
-
1004
- Style/TrailingBodyOnClass:
1005
- Enabled: true
1006
-
1007
- Style/TrailingBodyOnModule:
1008
- Enabled: true
1009
-
1010
- Style/TrailingCommaInArrayLiteral:
1011
- EnforcedStyleForMultiline: comma
1012
- Enabled: true
1013
-
1014
- Style/TrailingCommaInHashLiteral:
1015
- EnforcedStyleForMultiline: comma
1016
- Enabled: true
1017
-
1018
- Layout/SpaceInsideReferenceBrackets:
1019
- EnforcedStyle: no_space
1020
- EnforcedStyleForEmptyBrackets: no_space
1021
- Enabled: true
1022
-
1023
- Style/ModuleFunction:
1024
- EnforcedStyle: extend_self
1025
-
1026
- Lint/OrderedMagicComments:
1027
- Enabled: true