message_bus 2.1.6 → 2.2.0.pre
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of message_bus might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.rubocop.yml +13 -92
- data/.rubocop_todo.yml +659 -0
- data/.travis.yml +1 -1
- data/CHANGELOG +61 -0
- data/Dockerfile +18 -0
- data/Gemfile +3 -1
- data/Guardfile +0 -1
- data/README.md +188 -101
- data/Rakefile +12 -1
- data/assets/message-bus.js +1 -1
- data/docker-compose.yml +46 -0
- data/examples/bench/config.ru +8 -9
- data/examples/bench/unicorn.conf.rb +1 -1
- data/examples/chat/chat.rb +150 -153
- data/examples/minimal/config.ru +2 -3
- data/lib/message_bus.rb +224 -36
- data/lib/message_bus/backends.rb +7 -0
- data/lib/message_bus/backends/base.rb +184 -0
- data/lib/message_bus/backends/memory.rb +304 -226
- data/lib/message_bus/backends/postgres.rb +359 -318
- data/lib/message_bus/backends/redis.rb +380 -337
- data/lib/message_bus/client.rb +99 -41
- data/lib/message_bus/connection_manager.rb +29 -21
- data/lib/message_bus/diagnostics.rb +50 -41
- data/lib/message_bus/distributed_cache.rb +5 -7
- data/lib/message_bus/message.rb +2 -2
- data/lib/message_bus/rack/diagnostics.rb +65 -55
- data/lib/message_bus/rack/middleware.rb +64 -44
- data/lib/message_bus/rack/thin_ext.rb +13 -9
- data/lib/message_bus/rails/railtie.rb +2 -0
- data/lib/message_bus/timer_thread.rb +2 -2
- data/lib/message_bus/version.rb +2 -1
- data/message_bus.gemspec +3 -2
- data/spec/assets/support/jasmine_helper.rb +1 -1
- data/spec/lib/fake_async_middleware.rb +1 -6
- data/spec/lib/message_bus/assets/asset_encoding_spec.rb +3 -3
- data/spec/lib/message_bus/backend_spec.rb +409 -0
- data/spec/lib/message_bus/client_spec.rb +8 -11
- data/spec/lib/message_bus/connection_manager_spec.rb +8 -14
- data/spec/lib/message_bus/distributed_cache_spec.rb +0 -4
- data/spec/lib/message_bus/multi_process_spec.rb +6 -7
- data/spec/lib/message_bus/rack/middleware_spec.rb +47 -43
- data/spec/lib/message_bus/timer_thread_spec.rb +0 -2
- data/spec/lib/message_bus_spec.rb +59 -43
- data/spec/spec_helper.rb +16 -4
- metadata +12 -9
- data/spec/lib/message_bus/backends/postgres_spec.rb +0 -221
- data/spec/lib/message_bus/backends/redis_spec.rb +0 -271
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f2c463191e1ea09dd9ae0c716458357d22f8b9b106c2a29424828e6d0fed787
|
4
|
+
data.tar.gz: 07610056ac74c3a74be6fdd8eb6efb2347a57c192926f0d96b6d762a40cc77b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 694da29059a65ee280248978a410a4399f4e4a1dd9c0e0d35a5f20aa45bf1a1d7c51edf84b65fe04009c273ef7380a2e49f069d5074bdaafd0c4e8627d3d86e0
|
7
|
+
data.tar.gz: f11475f237918bb7ecd1e4378d9bc80872b804d0fcad7893eeccc3491d691d66cc9b6c8960f5eff6a5e1f3eb7057b5d516f485518fb0bc064cd03e5be0c74f72
|
data/.rubocop.yml
CHANGED
@@ -1,104 +1,25 @@
|
|
1
|
+
inherit_from: .rubocop_todo.yml
|
2
|
+
|
1
3
|
AllCops:
|
2
4
|
TargetRubyVersion: 2.4
|
3
|
-
DisabledByDefault:
|
4
|
-
|
5
|
-
# Prefer &&/|| over and/or.
|
6
|
-
Style/AndOr:
|
7
|
-
Enabled: true
|
8
|
-
|
9
|
-
# Do not use braces for hash literals when they are the last argument of a
|
10
|
-
# method call.
|
11
|
-
Style/BracesAroundHashParameters:
|
12
|
-
Enabled: true
|
13
|
-
|
14
|
-
# Align `when` with `case`.
|
15
|
-
Layout/CaseIndentation:
|
16
|
-
Enabled: true
|
17
|
-
|
18
|
-
# Align comments with method definitions.
|
19
|
-
Layout/CommentIndentation:
|
20
|
-
Enabled: true
|
21
|
-
|
22
|
-
# No extra empty lines.
|
23
|
-
Layout/EmptyLines:
|
24
|
-
Enabled: true
|
25
|
-
|
26
|
-
# Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
|
27
|
-
Style/HashSyntax:
|
28
|
-
Enabled: true
|
29
|
-
|
30
|
-
# Two spaces, no tabs (for indentation).
|
31
|
-
Layout/IndentationWidth:
|
32
|
-
Enabled: true
|
33
|
-
|
34
|
-
Layout/SpaceAfterColon:
|
35
|
-
Enabled: true
|
36
|
-
|
37
|
-
Layout/SpaceAfterComma:
|
38
|
-
Enabled: true
|
39
|
-
|
40
|
-
Layout/SpaceAroundEqualsInParameterDefault:
|
41
|
-
Enabled: true
|
42
|
-
|
43
|
-
Layout/SpaceAroundKeyword:
|
44
|
-
Enabled: true
|
45
|
-
|
46
|
-
Layout/SpaceAroundOperators:
|
47
|
-
Enabled: true
|
48
|
-
|
49
|
-
Layout/SpaceBeforeFirstArg:
|
50
|
-
Enabled: true
|
51
|
-
|
52
|
-
# Defining a method with parameters needs parentheses.
|
53
|
-
Style/MethodDefParentheses:
|
54
|
-
Enabled: true
|
55
|
-
|
56
|
-
# Use `foo {}` not `foo{}`.
|
57
|
-
Layout/SpaceBeforeBlockBraces:
|
58
|
-
Enabled: true
|
59
|
-
|
60
|
-
# Use `foo { bar }` not `foo {bar}`.
|
61
|
-
Layout/SpaceInsideBlockBraces:
|
62
|
-
Enabled: true
|
63
|
-
|
64
|
-
# Use `{ a: 1 }` not `{a:1}`.
|
65
|
-
Layout/SpaceInsideHashLiteralBraces:
|
66
|
-
Enabled: true
|
67
|
-
|
68
|
-
Layout/SpaceInsideParens:
|
69
|
-
Enabled: true
|
70
|
-
|
71
|
-
# Detect hard tabs, no hard tabs.
|
72
|
-
Layout/Tab:
|
73
|
-
Enabled: true
|
74
|
-
|
75
|
-
# Blank lines should not have any spaces.
|
76
|
-
Layout/TrailingBlankLines:
|
77
|
-
Enabled: true
|
78
|
-
|
79
|
-
# No trailing whitespace.
|
80
|
-
Layout/TrailingWhitespace:
|
81
|
-
Enabled: true
|
82
|
-
|
83
|
-
Lint/BlockAlignment:
|
84
|
-
Enabled: true
|
5
|
+
DisabledByDefault: false
|
85
6
|
|
86
7
|
# Align `end` with the matching keyword or starting expression except for
|
87
8
|
# assignments, where it should be aligned with the LHS.
|
88
|
-
|
89
|
-
Enabled: true
|
9
|
+
Layout/EndAlignment:
|
90
10
|
EnforcedStyleAlignWith: variable
|
91
11
|
|
92
|
-
# Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
|
93
|
-
Lint/RequireParentheses:
|
94
|
-
Enabled: true
|
95
|
-
|
96
12
|
Layout/MultilineMethodCallIndentation:
|
97
|
-
Enabled: true
|
98
13
|
EnforcedStyle: indented
|
99
14
|
|
100
|
-
Layout/AlignHash:
|
101
|
-
Enabled: true
|
102
|
-
|
103
15
|
Bundler/OrderedGems:
|
104
16
|
Enabled: false
|
17
|
+
|
18
|
+
# Redis backend is quite big
|
19
|
+
Metrics/ClassLength:
|
20
|
+
Max: 310
|
21
|
+
|
22
|
+
Metrics/BlockLength:
|
23
|
+
Exclude:
|
24
|
+
- '**/spec_helper.rb'
|
25
|
+
- '**/**_spec.rb'
|
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,659 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2018-11-26 16:58:18 +0000 using RuboCop version 0.60.0.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
# Offense count: 1
|
10
|
+
# Cop supports --auto-correct.
|
11
|
+
# Configuration parameters: TreatCommentsAsGroupSeparators, Include.
|
12
|
+
# Include: **/*.gemspec
|
13
|
+
Gemspec/OrderedDependencies:
|
14
|
+
Exclude:
|
15
|
+
- 'message_bus.gemspec'
|
16
|
+
|
17
|
+
# Offense count: 1
|
18
|
+
# Configuration parameters: Include.
|
19
|
+
# Include: **/*.gemspec
|
20
|
+
Gemspec/RequiredRubyVersion:
|
21
|
+
Exclude:
|
22
|
+
- 'message_bus.gemspec'
|
23
|
+
|
24
|
+
# Offense count: 15
|
25
|
+
# Configuration parameters: AllowSafeAssignment.
|
26
|
+
Lint/AssignmentInCondition:
|
27
|
+
Exclude:
|
28
|
+
- 'examples/chat/chat.rb'
|
29
|
+
- 'lib/message_bus.rb'
|
30
|
+
- 'lib/message_bus/backends/memory.rb'
|
31
|
+
- 'lib/message_bus/backends/postgres.rb'
|
32
|
+
- 'lib/message_bus/rack/middleware.rb'
|
33
|
+
- 'lib/message_bus/rack/thin_ext.rb'
|
34
|
+
- 'spec/lib/message_bus/client_spec.rb'
|
35
|
+
- 'spec/lib/message_bus_spec.rb'
|
36
|
+
|
37
|
+
# Offense count: 5
|
38
|
+
Lint/HandleExceptions:
|
39
|
+
Exclude:
|
40
|
+
- 'lib/message_bus/backends/postgres.rb'
|
41
|
+
- 'lib/message_bus/connection_manager.rb'
|
42
|
+
- 'lib/message_bus/diagnostics.rb'
|
43
|
+
- 'spec/lib/message_bus/multi_process_spec.rb'
|
44
|
+
|
45
|
+
# Offense count: 1
|
46
|
+
Lint/LiteralAsCondition:
|
47
|
+
Exclude:
|
48
|
+
- 'examples/chat/chat.rb'
|
49
|
+
|
50
|
+
# Offense count: 3
|
51
|
+
Lint/NonLocalExitFromIterator:
|
52
|
+
Exclude:
|
53
|
+
- 'lib/message_bus.rb'
|
54
|
+
- 'lib/message_bus/backends/postgres.rb'
|
55
|
+
- 'lib/message_bus/backends/redis.rb'
|
56
|
+
|
57
|
+
# Offense count: 1
|
58
|
+
# Cop supports --auto-correct.
|
59
|
+
Lint/OrderedMagicComments:
|
60
|
+
Exclude:
|
61
|
+
- 'message_bus.gemspec'
|
62
|
+
|
63
|
+
# Offense count: 1
|
64
|
+
Lint/RescueException:
|
65
|
+
Exclude:
|
66
|
+
- 'spec/lib/message_bus/multi_process_spec.rb'
|
67
|
+
|
68
|
+
# Offense count: 1
|
69
|
+
# Cop supports --auto-correct.
|
70
|
+
Lint/StringConversionInInterpolation:
|
71
|
+
Exclude:
|
72
|
+
- 'spec/lib/message_bus/multi_process_spec.rb'
|
73
|
+
|
74
|
+
# Offense count: 30
|
75
|
+
Metrics/AbcSize:
|
76
|
+
Max: 112
|
77
|
+
|
78
|
+
# Offense count: 1
|
79
|
+
# Configuration parameters: CountComments, ExcludedMethods.
|
80
|
+
# ExcludedMethods: refine
|
81
|
+
Metrics/BlockLength:
|
82
|
+
Max: 29
|
83
|
+
|
84
|
+
# Offense count: 3
|
85
|
+
# Configuration parameters: CountBlocks.
|
86
|
+
Metrics/BlockNesting:
|
87
|
+
Max: 4
|
88
|
+
|
89
|
+
# Offense count: 9
|
90
|
+
# Configuration parameters: CountComments.
|
91
|
+
Metrics/ClassLength:
|
92
|
+
Max: 302
|
93
|
+
|
94
|
+
# Offense count: 18
|
95
|
+
Metrics/CyclomaticComplexity:
|
96
|
+
Max: 30
|
97
|
+
|
98
|
+
# Offense count: 38
|
99
|
+
# Configuration parameters: CountComments, ExcludedMethods.
|
100
|
+
Metrics/MethodLength:
|
101
|
+
Max: 105
|
102
|
+
|
103
|
+
# Offense count: 1
|
104
|
+
# Configuration parameters: CountComments.
|
105
|
+
Metrics/ModuleLength:
|
106
|
+
Max: 419
|
107
|
+
|
108
|
+
# Offense count: 18
|
109
|
+
Metrics/PerceivedComplexity:
|
110
|
+
Max: 34
|
111
|
+
|
112
|
+
# Offense count: 2
|
113
|
+
# Configuration parameters: EnforcedStyleForLeadingUnderscores.
|
114
|
+
# SupportedStylesForLeadingUnderscores: disallowed, required, optional
|
115
|
+
Naming/MemoizedInstanceVariableName:
|
116
|
+
Exclude:
|
117
|
+
- 'lib/message_bus.rb'
|
118
|
+
- 'spec/assets/support/jasmine_helper.rb'
|
119
|
+
|
120
|
+
# Offense count: 2
|
121
|
+
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist, MethodDefinitionMacros.
|
122
|
+
# NamePrefix: is_, has_, have_
|
123
|
+
# NamePrefixBlacklist: is_, has_, have_
|
124
|
+
# NameWhitelist: is_a?
|
125
|
+
# MethodDefinitionMacros: define_method, define_singleton_method
|
126
|
+
Naming/PredicateName:
|
127
|
+
Exclude:
|
128
|
+
- 'spec/**/*'
|
129
|
+
- 'lib/message_bus.rb'
|
130
|
+
- 'lib/message_bus/backends/redis.rb'
|
131
|
+
|
132
|
+
# Offense count: 6
|
133
|
+
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
|
134
|
+
# AllowedNames: io, id, to, by, on, in, at, ip, db
|
135
|
+
Naming/UncommunicativeMethodParamName:
|
136
|
+
Exclude:
|
137
|
+
- 'lib/message_bus/backends/postgres.rb'
|
138
|
+
- 'lib/message_bus/connection_manager.rb'
|
139
|
+
- 'lib/message_bus/distributed_cache.rb'
|
140
|
+
|
141
|
+
# Offense count: 1
|
142
|
+
# Cop supports --auto-correct.
|
143
|
+
Performance/RedundantBlockCall:
|
144
|
+
Exclude:
|
145
|
+
- 'lib/message_bus/timer_thread.rb'
|
146
|
+
|
147
|
+
# Offense count: 2
|
148
|
+
# Cop supports --auto-correct.
|
149
|
+
# Configuration parameters: MaxKeyValuePairs.
|
150
|
+
Performance/RedundantMerge:
|
151
|
+
Exclude:
|
152
|
+
- 'spec/spec_helper.rb'
|
153
|
+
|
154
|
+
# Offense count: 3
|
155
|
+
# Cop supports --auto-correct.
|
156
|
+
Performance/RegexpMatch:
|
157
|
+
Exclude:
|
158
|
+
- 'lib/message_bus/backends/redis.rb'
|
159
|
+
- 'lib/message_bus/rack/diagnostics.rb'
|
160
|
+
|
161
|
+
# Offense count: 1
|
162
|
+
# Cop supports --auto-correct.
|
163
|
+
Performance/ReverseEach:
|
164
|
+
Exclude:
|
165
|
+
- 'spec/lib/message_bus/timer_thread_spec.rb'
|
166
|
+
|
167
|
+
# Offense count: 2
|
168
|
+
# Cop supports --auto-correct.
|
169
|
+
# Configuration parameters: AutoCorrect.
|
170
|
+
Performance/TimesMap:
|
171
|
+
Exclude:
|
172
|
+
- 'spec/lib/message_bus/connection_manager_spec.rb'
|
173
|
+
|
174
|
+
# Offense count: 1
|
175
|
+
Security/MarshalLoad:
|
176
|
+
Exclude:
|
177
|
+
- 'lib/message_bus/distributed_cache.rb'
|
178
|
+
|
179
|
+
# Offense count: 1
|
180
|
+
# Cop supports --auto-correct.
|
181
|
+
# Configuration parameters: EnforcedStyle.
|
182
|
+
# SupportedStyles: prefer_alias, prefer_alias_method
|
183
|
+
Style/Alias:
|
184
|
+
Exclude:
|
185
|
+
- 'lib/message_bus/rack/thin_ext.rb'
|
186
|
+
|
187
|
+
# Offense count: 6
|
188
|
+
# Cop supports --auto-correct.
|
189
|
+
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods.
|
190
|
+
# SupportedStyles: line_count_based, semantic, braces_for_chaining
|
191
|
+
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
|
192
|
+
# FunctionalMethods: let, let!, subject, watch
|
193
|
+
# IgnoredMethods: lambda, proc, it
|
194
|
+
Style/BlockDelimiters:
|
195
|
+
Exclude:
|
196
|
+
- 'spec/lib/fake_async_middleware.rb'
|
197
|
+
- 'spec/lib/message_bus/backend_spec.rb'
|
198
|
+
- 'spec/lib/message_bus/rack/middleware_spec.rb'
|
199
|
+
- 'spec/lib/message_bus/timer_thread_spec.rb'
|
200
|
+
|
201
|
+
# Offense count: 7
|
202
|
+
Style/CaseEquality:
|
203
|
+
Exclude:
|
204
|
+
- 'lib/message_bus/distributed_cache.rb'
|
205
|
+
- 'spec/lib/message_bus/rack/middleware_spec.rb'
|
206
|
+
|
207
|
+
# Offense count: 16
|
208
|
+
# Cop supports --auto-correct.
|
209
|
+
# Configuration parameters: AutoCorrect, EnforcedStyle.
|
210
|
+
# SupportedStyles: nested, compact
|
211
|
+
Style/ClassAndModuleChildren:
|
212
|
+
Exclude:
|
213
|
+
- 'lib/message_bus.rb'
|
214
|
+
- 'lib/message_bus/client.rb'
|
215
|
+
- 'lib/message_bus/connection_manager.rb'
|
216
|
+
- 'lib/message_bus/diagnostics.rb'
|
217
|
+
- 'lib/message_bus/message.rb'
|
218
|
+
- 'lib/message_bus/rack/diagnostics.rb'
|
219
|
+
- 'lib/message_bus/rack/middleware.rb'
|
220
|
+
- 'lib/message_bus/rails/railtie.rb'
|
221
|
+
- 'lib/message_bus/timer_thread.rb'
|
222
|
+
- 'spec/assets/support/jasmine_helper.rb'
|
223
|
+
|
224
|
+
# Offense count: 1
|
225
|
+
Style/ClassVars:
|
226
|
+
Exclude:
|
227
|
+
- 'lib/message_bus/rack/diagnostics.rb'
|
228
|
+
|
229
|
+
# Offense count: 3
|
230
|
+
# Cop supports --auto-correct.
|
231
|
+
# Configuration parameters: Keywords.
|
232
|
+
# Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW
|
233
|
+
Style/CommentAnnotation:
|
234
|
+
Exclude:
|
235
|
+
- 'lib/message_bus/backends/postgres.rb'
|
236
|
+
- 'lib/message_bus/backends/redis.rb'
|
237
|
+
- 'lib/message_bus/rack/middleware.rb'
|
238
|
+
|
239
|
+
# Offense count: 24
|
240
|
+
Style/Documentation:
|
241
|
+
Exclude:
|
242
|
+
- 'spec/**/*'
|
243
|
+
- 'test/**/*'
|
244
|
+
- 'Rakefile'
|
245
|
+
- 'examples/chat/chat.rb'
|
246
|
+
- 'lib/message_bus.rb'
|
247
|
+
- 'lib/message_bus/backends/memory.rb'
|
248
|
+
- 'lib/message_bus/backends/postgres.rb'
|
249
|
+
- 'lib/message_bus/backends/redis.rb'
|
250
|
+
- 'lib/message_bus/diagnostics.rb'
|
251
|
+
- 'lib/message_bus/distributed_cache.rb'
|
252
|
+
- 'lib/message_bus/em_ext.rb'
|
253
|
+
- 'lib/message_bus/rack/diagnostics.rb'
|
254
|
+
- 'lib/message_bus/rails/railtie.rb'
|
255
|
+
- 'lib/message_bus/timer_thread.rb'
|
256
|
+
|
257
|
+
# Offense count: 6
|
258
|
+
# Cop supports --auto-correct.
|
259
|
+
# Configuration parameters: EnforcedStyle.
|
260
|
+
# SupportedStyles: empty, nil, both
|
261
|
+
Style/EmptyElse:
|
262
|
+
Exclude:
|
263
|
+
- 'examples/bench/config.ru'
|
264
|
+
- 'lib/message_bus/backends/memory.rb'
|
265
|
+
- 'lib/message_bus/backends/postgres.rb'
|
266
|
+
- 'lib/message_bus/backends/redis.rb'
|
267
|
+
- 'spec/lib/message_bus/backend_spec.rb'
|
268
|
+
|
269
|
+
# Offense count: 1
|
270
|
+
# Cop supports --auto-correct.
|
271
|
+
Style/EmptyLiteral:
|
272
|
+
Exclude:
|
273
|
+
- 'examples/chat/chat.rb'
|
274
|
+
|
275
|
+
# Offense count: 1
|
276
|
+
# Cop supports --auto-correct.
|
277
|
+
# Configuration parameters: EnforcedStyle.
|
278
|
+
# SupportedStyles: compact, expanded
|
279
|
+
Style/EmptyMethod:
|
280
|
+
Exclude:
|
281
|
+
- 'lib/message_bus/timer_thread.rb'
|
282
|
+
|
283
|
+
# Offense count: 1
|
284
|
+
# Cop supports --auto-correct.
|
285
|
+
Style/Encoding:
|
286
|
+
Exclude:
|
287
|
+
- 'spec/lib/message_bus/rack/middleware_spec.rb'
|
288
|
+
|
289
|
+
# Offense count: 5
|
290
|
+
# Cop supports --auto-correct.
|
291
|
+
Style/ExpandPathArguments:
|
292
|
+
Exclude:
|
293
|
+
- 'examples/bench/config.ru'
|
294
|
+
- 'examples/chat/chat.rb'
|
295
|
+
- 'message_bus.gemspec'
|
296
|
+
- 'spec/lib/message_bus/assets/asset_encoding_spec.rb'
|
297
|
+
|
298
|
+
# Offense count: 25
|
299
|
+
# Cop supports --auto-correct.
|
300
|
+
# Configuration parameters: EnforcedStyle.
|
301
|
+
# SupportedStyles: when_needed, always, never
|
302
|
+
Style/FrozenStringLiteralComment:
|
303
|
+
Enabled: false
|
304
|
+
|
305
|
+
# Offense count: 9
|
306
|
+
# Configuration parameters: AllowedVariables.
|
307
|
+
Style/GlobalVars:
|
308
|
+
Exclude:
|
309
|
+
- 'examples/chat/chat.rb'
|
310
|
+
- 'lib/message_bus/diagnostics.rb'
|
311
|
+
|
312
|
+
# Offense count: 12
|
313
|
+
# Configuration parameters: MinBodyLength.
|
314
|
+
Style/GuardClause:
|
315
|
+
Exclude:
|
316
|
+
- 'lib/message_bus.rb'
|
317
|
+
- 'lib/message_bus/backends/memory.rb'
|
318
|
+
- 'lib/message_bus/backends/postgres.rb'
|
319
|
+
- 'lib/message_bus/backends/redis.rb'
|
320
|
+
- 'lib/message_bus/client.rb'
|
321
|
+
- 'lib/message_bus/rack/middleware.rb'
|
322
|
+
|
323
|
+
# Offense count: 2
|
324
|
+
Style/IfInsideElse:
|
325
|
+
Exclude:
|
326
|
+
- 'lib/message_bus.rb'
|
327
|
+
|
328
|
+
# Offense count: 24
|
329
|
+
# Cop supports --auto-correct.
|
330
|
+
Style/IfUnlessModifier:
|
331
|
+
Exclude:
|
332
|
+
- 'examples/chat/chat.rb'
|
333
|
+
- 'lib/message_bus.rb'
|
334
|
+
- 'lib/message_bus/backends/memory.rb'
|
335
|
+
- 'lib/message_bus/backends/postgres.rb'
|
336
|
+
- 'lib/message_bus/backends/redis.rb'
|
337
|
+
- 'lib/message_bus/client.rb'
|
338
|
+
- 'lib/message_bus/rack/diagnostics.rb'
|
339
|
+
- 'lib/message_bus/rack/middleware.rb'
|
340
|
+
- 'lib/message_bus/timer_thread.rb'
|
341
|
+
- 'spec/lib/fake_async_middleware.rb'
|
342
|
+
- 'spec/lib/message_bus/rack/middleware_spec.rb'
|
343
|
+
|
344
|
+
# Offense count: 1
|
345
|
+
# Cop supports --auto-correct.
|
346
|
+
Style/InfiniteLoop:
|
347
|
+
Exclude:
|
348
|
+
- 'examples/chat/chat.rb'
|
349
|
+
|
350
|
+
# Offense count: 4
|
351
|
+
# Cop supports --auto-correct.
|
352
|
+
# Configuration parameters: EnforcedStyle.
|
353
|
+
# SupportedStyles: line_count_dependent, lambda, literal
|
354
|
+
Style/Lambda:
|
355
|
+
Exclude:
|
356
|
+
- 'examples/bench/config.ru'
|
357
|
+
- 'examples/minimal/config.ru'
|
358
|
+
- 'lib/message_bus/timer_thread.rb'
|
359
|
+
- 'spec/lib/message_bus/rack/middleware_spec.rb'
|
360
|
+
|
361
|
+
# Offense count: 3
|
362
|
+
# Cop supports --auto-correct.
|
363
|
+
Style/MutableConstant:
|
364
|
+
Exclude:
|
365
|
+
- 'lib/message_bus.rb'
|
366
|
+
- 'lib/message_bus/backends/postgres.rb'
|
367
|
+
- 'spec/spec_helper.rb'
|
368
|
+
|
369
|
+
# Offense count: 2
|
370
|
+
# Cop supports --auto-correct.
|
371
|
+
Style/NegatedWhile:
|
372
|
+
Exclude:
|
373
|
+
- 'lib/message_bus/backends/redis.rb'
|
374
|
+
- 'lib/message_bus/timer_thread.rb'
|
375
|
+
|
376
|
+
# Offense count: 2
|
377
|
+
# Cop supports --auto-correct.
|
378
|
+
# Configuration parameters: EnforcedStyle, MinBodyLength.
|
379
|
+
# SupportedStyles: skip_modifier_ifs, always
|
380
|
+
Style/Next:
|
381
|
+
Exclude:
|
382
|
+
- 'lib/message_bus/connection_manager.rb'
|
383
|
+
- 'lib/message_bus/timer_thread.rb'
|
384
|
+
|
385
|
+
# Offense count: 4
|
386
|
+
# Cop supports --auto-correct.
|
387
|
+
# Configuration parameters: EnforcedStyle.
|
388
|
+
# SupportedStyles: predicate, comparison
|
389
|
+
Style/NilComparison:
|
390
|
+
Exclude:
|
391
|
+
- 'lib/message_bus/backends/redis.rb'
|
392
|
+
- 'spec/lib/message_bus/distributed_cache_spec.rb'
|
393
|
+
|
394
|
+
# Offense count: 6
|
395
|
+
# Cop supports --auto-correct.
|
396
|
+
# Configuration parameters: Strict.
|
397
|
+
Style/NumericLiterals:
|
398
|
+
MinDigits: 15
|
399
|
+
|
400
|
+
# Offense count: 15
|
401
|
+
# Cop supports --auto-correct.
|
402
|
+
# Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
|
403
|
+
# SupportedStyles: predicate, comparison
|
404
|
+
Style/NumericPredicate:
|
405
|
+
Exclude:
|
406
|
+
- 'spec/**/*'
|
407
|
+
- 'lib/message_bus.rb'
|
408
|
+
- 'lib/message_bus/backends/memory.rb'
|
409
|
+
- 'lib/message_bus/backends/postgres.rb'
|
410
|
+
- 'lib/message_bus/backends/redis.rb'
|
411
|
+
- 'lib/message_bus/client.rb'
|
412
|
+
- 'lib/message_bus/rack/middleware.rb'
|
413
|
+
- 'lib/message_bus/timer_thread.rb'
|
414
|
+
|
415
|
+
# Offense count: 1
|
416
|
+
# Cop supports --auto-correct.
|
417
|
+
# Configuration parameters: AllowSafeAssignment, AllowInMultilineConditions.
|
418
|
+
Style/ParenthesesAroundCondition:
|
419
|
+
Exclude:
|
420
|
+
- 'lib/message_bus.rb'
|
421
|
+
|
422
|
+
# Offense count: 3
|
423
|
+
# Cop supports --auto-correct.
|
424
|
+
# Configuration parameters: PreferredDelimiters.
|
425
|
+
Style/PercentLiteralDelimiters:
|
426
|
+
Exclude:
|
427
|
+
- 'Guardfile'
|
428
|
+
- 'message_bus.gemspec'
|
429
|
+
|
430
|
+
# Offense count: 2
|
431
|
+
# Cop supports --auto-correct.
|
432
|
+
# Configuration parameters: EnforcedStyle.
|
433
|
+
# SupportedStyles: compact, exploded
|
434
|
+
Style/RaiseArgs:
|
435
|
+
Exclude:
|
436
|
+
- 'lib/message_bus.rb'
|
437
|
+
- 'lib/message_bus/backends/redis.rb'
|
438
|
+
|
439
|
+
# Offense count: 3
|
440
|
+
# Cop supports --auto-correct.
|
441
|
+
Style/RedundantBegin:
|
442
|
+
Exclude:
|
443
|
+
- 'lib/message_bus/backends/redis.rb'
|
444
|
+
- 'lib/message_bus/diagnostics.rb'
|
445
|
+
|
446
|
+
# Offense count: 2
|
447
|
+
# Cop supports --auto-correct.
|
448
|
+
Style/RedundantConditional:
|
449
|
+
Exclude:
|
450
|
+
- 'lib/message_bus.rb'
|
451
|
+
|
452
|
+
# Offense count: 11
|
453
|
+
# Cop supports --auto-correct.
|
454
|
+
Style/RedundantFreeze:
|
455
|
+
Exclude:
|
456
|
+
- 'lib/message_bus.rb'
|
457
|
+
- 'lib/message_bus/client.rb'
|
458
|
+
- 'lib/message_bus/distributed_cache.rb'
|
459
|
+
|
460
|
+
# Offense count: 1
|
461
|
+
# Cop supports --auto-correct.
|
462
|
+
Style/RedundantParentheses:
|
463
|
+
Exclude:
|
464
|
+
- 'lib/message_bus/client.rb'
|
465
|
+
|
466
|
+
# Offense count: 2
|
467
|
+
# Cop supports --auto-correct.
|
468
|
+
# Configuration parameters: AllowMultipleReturnValues.
|
469
|
+
Style/RedundantReturn:
|
470
|
+
Exclude:
|
471
|
+
- 'lib/message_bus/rack/diagnostics.rb'
|
472
|
+
|
473
|
+
# Offense count: 4
|
474
|
+
# Cop supports --auto-correct.
|
475
|
+
Style/RedundantSelf:
|
476
|
+
Exclude:
|
477
|
+
- 'lib/message_bus/client.rb'
|
478
|
+
- 'lib/message_bus/rack/middleware.rb'
|
479
|
+
|
480
|
+
# Offense count: 3
|
481
|
+
# Cop supports --auto-correct.
|
482
|
+
# Configuration parameters: EnforcedStyle, AllowInnerSlashes.
|
483
|
+
# SupportedStyles: slashes, percent_r, mixed
|
484
|
+
Style/RegexpLiteral:
|
485
|
+
Exclude:
|
486
|
+
- 'lib/message_bus/rack/diagnostics.rb'
|
487
|
+
- 'lib/message_bus/rack/middleware.rb'
|
488
|
+
|
489
|
+
# Offense count: 2
|
490
|
+
# Cop supports --auto-correct.
|
491
|
+
Style/RescueModifier:
|
492
|
+
Exclude:
|
493
|
+
- 'lib/message_bus/client.rb'
|
494
|
+
- 'lib/message_bus/connection_manager.rb'
|
495
|
+
|
496
|
+
# Offense count: 17
|
497
|
+
# Cop supports --auto-correct.
|
498
|
+
# Configuration parameters: EnforcedStyle.
|
499
|
+
# SupportedStyles: implicit, explicit
|
500
|
+
Style/RescueStandardError:
|
501
|
+
Exclude:
|
502
|
+
- 'examples/chat/chat.rb'
|
503
|
+
- 'lib/message_bus.rb'
|
504
|
+
- 'lib/message_bus/backends/memory.rb'
|
505
|
+
- 'lib/message_bus/backends/postgres.rb'
|
506
|
+
- 'lib/message_bus/backends/redis.rb'
|
507
|
+
- 'lib/message_bus/client.rb'
|
508
|
+
- 'lib/message_bus/connection_manager.rb'
|
509
|
+
- 'lib/message_bus/diagnostics.rb'
|
510
|
+
- 'lib/message_bus/rack/middleware.rb'
|
511
|
+
- 'lib/message_bus/timer_thread.rb'
|
512
|
+
|
513
|
+
# Offense count: 17
|
514
|
+
# Cop supports --auto-correct.
|
515
|
+
# Configuration parameters: ConvertCodeThatCanStartToReturnNil, Whitelist.
|
516
|
+
# Whitelist: present?, blank?, presence, try, try!
|
517
|
+
Style/SafeNavigation:
|
518
|
+
Exclude:
|
519
|
+
- 'lib/message_bus.rb'
|
520
|
+
- 'lib/message_bus/connection_manager.rb'
|
521
|
+
- 'lib/message_bus/diagnostics.rb'
|
522
|
+
- 'lib/message_bus/distributed_cache.rb'
|
523
|
+
- 'lib/message_bus/rack/middleware.rb'
|
524
|
+
- 'lib/message_bus/timer_thread.rb'
|
525
|
+
- 'spec/lib/message_bus/multi_process_spec.rb'
|
526
|
+
|
527
|
+
# Offense count: 6
|
528
|
+
# Cop supports --auto-correct.
|
529
|
+
# Configuration parameters: AllowIfMethodIsEmpty.
|
530
|
+
Style/SingleLineMethods:
|
531
|
+
Exclude:
|
532
|
+
- 'spec/lib/message_bus/connection_manager_spec.rb'
|
533
|
+
- 'spec/lib/message_bus/rack/middleware_spec.rb'
|
534
|
+
|
535
|
+
# Offense count: 10
|
536
|
+
# Cop supports --auto-correct.
|
537
|
+
# Configuration parameters: EnforcedStyle.
|
538
|
+
# SupportedStyles: use_perl_names, use_english_names
|
539
|
+
Style/SpecialGlobalVars:
|
540
|
+
Exclude:
|
541
|
+
- 'examples/chat/chat.rb'
|
542
|
+
- 'lib/message_bus/diagnostics.rb'
|
543
|
+
- 'lib/message_bus/rack/middleware.rb'
|
544
|
+
- 'message_bus.gemspec'
|
545
|
+
- 'spec/spec_helper.rb'
|
546
|
+
|
547
|
+
# Offense count: 652
|
548
|
+
# Cop supports --auto-correct.
|
549
|
+
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
550
|
+
# SupportedStyles: single_quotes, double_quotes
|
551
|
+
Style/StringLiterals:
|
552
|
+
Enabled: false
|
553
|
+
|
554
|
+
# Offense count: 8
|
555
|
+
# Cop supports --auto-correct.
|
556
|
+
# Configuration parameters: EnforcedStyle.
|
557
|
+
# SupportedStyles: single_quotes, double_quotes
|
558
|
+
Style/StringLiteralsInInterpolation:
|
559
|
+
Exclude:
|
560
|
+
- 'examples/chat/chat.rb'
|
561
|
+
- 'lib/message_bus/rack/diagnostics.rb'
|
562
|
+
|
563
|
+
# Offense count: 1
|
564
|
+
Style/StructInheritance:
|
565
|
+
Exclude:
|
566
|
+
- 'lib/message_bus/message.rb'
|
567
|
+
|
568
|
+
# Offense count: 1
|
569
|
+
# Cop supports --auto-correct.
|
570
|
+
# Configuration parameters: MinSize.
|
571
|
+
# SupportedStyles: percent, brackets
|
572
|
+
Style/SymbolArray:
|
573
|
+
EnforcedStyle: brackets
|
574
|
+
|
575
|
+
# Offense count: 7
|
576
|
+
# Cop supports --auto-correct.
|
577
|
+
# Configuration parameters: IgnoredMethods.
|
578
|
+
# IgnoredMethods: respond_to, define_method
|
579
|
+
Style/SymbolProc:
|
580
|
+
Exclude:
|
581
|
+
- 'spec/lib/message_bus/assets/asset_encoding_spec.rb'
|
582
|
+
- 'spec/lib/message_bus/backend_spec.rb'
|
583
|
+
- 'spec/lib/message_bus_spec.rb'
|
584
|
+
|
585
|
+
# Offense count: 2
|
586
|
+
# Cop supports --auto-correct.
|
587
|
+
# Configuration parameters: EnforcedStyleForMultiline.
|
588
|
+
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
|
589
|
+
Style/TrailingCommaInArrayLiteral:
|
590
|
+
Exclude:
|
591
|
+
- 'spec/lib/message_bus/backend_spec.rb'
|
592
|
+
|
593
|
+
# Offense count: 3
|
594
|
+
# Cop supports --auto-correct.
|
595
|
+
# Configuration parameters: AllowNamedUnderscoreVariables.
|
596
|
+
Style/TrailingUnderscoreVariable:
|
597
|
+
Exclude:
|
598
|
+
- 'lib/message_bus/timer_thread.rb'
|
599
|
+
- 'spec/lib/message_bus/client_spec.rb'
|
600
|
+
|
601
|
+
# Offense count: 5
|
602
|
+
# Cop supports --auto-correct.
|
603
|
+
# Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, IgnoreClassMethods, Whitelist.
|
604
|
+
# Whitelist: to_ary, to_a, to_c, to_enum, to_h, to_hash, to_i, to_int, to_io, to_open, to_path, to_proc, to_r, to_regexp, to_str, to_s, to_sym
|
605
|
+
Style/TrivialAccessors:
|
606
|
+
Exclude:
|
607
|
+
- 'lib/message_bus/client.rb'
|
608
|
+
- 'lib/message_bus/distributed_cache.rb'
|
609
|
+
- 'spec/lib/fake_async_middleware.rb'
|
610
|
+
- 'spec/lib/message_bus/connection_manager_spec.rb'
|
611
|
+
|
612
|
+
# Offense count: 1
|
613
|
+
# Cop supports --auto-correct.
|
614
|
+
Style/UnneededInterpolation:
|
615
|
+
Exclude:
|
616
|
+
- 'lib/message_bus/distributed_cache.rb'
|
617
|
+
|
618
|
+
# Offense count: 2
|
619
|
+
# Cop supports --auto-correct.
|
620
|
+
Style/UnneededPercentQ:
|
621
|
+
Exclude:
|
622
|
+
- 'message_bus.gemspec'
|
623
|
+
|
624
|
+
# Offense count: 1
|
625
|
+
# Cop supports --auto-correct.
|
626
|
+
Style/WhileUntilModifier:
|
627
|
+
Exclude:
|
628
|
+
- 'spec/spec_helper.rb'
|
629
|
+
|
630
|
+
# Offense count: 10
|
631
|
+
# Cop supports --auto-correct.
|
632
|
+
# Configuration parameters: WordRegex.
|
633
|
+
# SupportedStyles: percent, brackets
|
634
|
+
Style/WordArray:
|
635
|
+
EnforcedStyle: percent
|
636
|
+
MinSize: 5
|
637
|
+
|
638
|
+
# Offense count: 1
|
639
|
+
# Cop supports --auto-correct.
|
640
|
+
# Configuration parameters: EnforcedStyle.
|
641
|
+
# SupportedStyles: all_comparison_operators, equality_operators_only
|
642
|
+
Style/YodaCondition:
|
643
|
+
Exclude:
|
644
|
+
- 'spec/lib/message_bus/timer_thread_spec.rb'
|
645
|
+
|
646
|
+
# Offense count: 6
|
647
|
+
# Cop supports --auto-correct.
|
648
|
+
Style/ZeroLengthPredicate:
|
649
|
+
Exclude:
|
650
|
+
- 'lib/message_bus/backends/redis.rb'
|
651
|
+
- 'lib/message_bus/client.rb'
|
652
|
+
- 'lib/message_bus/rack/middleware.rb'
|
653
|
+
- 'spec/lib/message_bus_spec.rb'
|
654
|
+
|
655
|
+
# Offense count: 160
|
656
|
+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
657
|
+
# URISchemes: http, https
|
658
|
+
Metrics/LineLength:
|
659
|
+
Max: 215
|