harbinger 0.0.1.pre → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/.hound.yml +818 -0
- data/.travis.yml +20 -0
- data/Gemfile +23 -3
- data/README.md +8 -27
- data/Rakefile +47 -1
- data/app/controllers/harbinger/messages_controller.rb +24 -0
- data/app/models/harbinger/database_channel_message.rb +51 -0
- data/app/models/harbinger/database_channel_message_element.rb +19 -0
- data/app/views/harbinger/messages/index.html.erb +43 -0
- data/app/views/harbinger/messages/show.html.erb +24 -0
- data/config/routes.rb +3 -0
- data/db/migrate/20140310185338_create_harbinger_database_channel_message.rb +11 -0
- data/db/migrate/20140310185339_create_harbinger_database_channel_message_elements.rb +14 -0
- data/gemfiles/rails4.1.gemfile +12 -0
- data/gemfiles/rails4.gemfile +13 -0
- data/harbinger.gemspec +22 -7
- data/lib/generators/harbinger/install/install_generator.rb +23 -0
- data/lib/generators/harbinger/install/templates/harbinger_initializer.rb.erb +6 -0
- data/lib/harbinger.rb +100 -1
- data/lib/harbinger/channels.rb +25 -0
- data/lib/harbinger/channels/database_channel.rb +15 -0
- data/lib/harbinger/channels/logger_channel.rb +31 -0
- data/lib/harbinger/channels/null_channel.rb +7 -0
- data/lib/harbinger/configuration.rb +58 -0
- data/lib/harbinger/engine.rb +8 -1
- data/lib/harbinger/exceptions.rb +4 -0
- data/lib/harbinger/message.rb +20 -0
- data/lib/harbinger/reporters.rb +34 -0
- data/lib/harbinger/reporters/exception_reporter.rb +26 -0
- data/lib/harbinger/reporters/null_reporter.rb +14 -0
- data/lib/harbinger/reporters/request_reporter.rb +20 -0
- data/lib/harbinger/reporters/user_reporter.rb +20 -0
- data/lib/harbinger/version.rb +1 -1
- data/run_each_spec_in_isolation +9 -0
- data/script/fast_specs +20 -0
- data/spec/controllers/harbinger/messages_controller_spec.rb +26 -0
- data/spec/features/end_to_end_exception_handling_spec.rb +39 -0
- data/spec/lib/harbinger/channels/database_channel_spec.rb +18 -0
- data/spec/lib/harbinger/channels/logger_channel_spec.rb +21 -0
- data/spec/lib/harbinger/channels/null_channel_spec.rb +8 -0
- data/spec/lib/harbinger/channels_spec.rb +40 -0
- data/spec/lib/harbinger/configuration_spec.rb +53 -0
- data/spec/lib/harbinger/message_spec.rb +15 -0
- data/spec/lib/harbinger/reporters/exception_reporter_spec.rb +24 -0
- data/spec/lib/harbinger/reporters/null_reporter_spec.rb +21 -0
- data/spec/lib/harbinger/reporters/request_reporter_spec.rb +23 -0
- data/spec/lib/harbinger/reporters/user_reporter_spec.rb +17 -0
- data/spec/lib/harbinger/reporters_spec.rb +46 -0
- data/spec/lib/harbinger_spec.rb +60 -0
- data/spec/models/harbinger/database_channel_message_element_spec.rb +16 -0
- data/spec/models/harbinger/database_channel_message_spec.rb +68 -0
- data/spec/routing/harbinger/messages_routing_spec.rb +16 -0
- data/spec/spec_active_record_helper.rb +41 -0
- data/spec/spec_fast_helper.rb +70 -0
- data/spec/spec_slow_helper.rb +57 -0
- data/spec/spec_view_helper.rb +38 -0
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +13 -0
- data/spec/views/harbinger/messages/index.html.erb_spec.rb +31 -0
- data/spec/views/harbinger/messages/show.html.erb_spec.rb +36 -0
- metadata +205 -20
- data/MIT-LICENSE +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8d9107e1f0f58e16654d251c1faa1c8959f86cc
|
4
|
+
data.tar.gz: e35f452a7355e1a065e962ad3a27f9aebf08d034
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68d76e1139c5a602a2a15386f4d9cafa87a899ba95cf1b28432f0215b95d1e77b24119db3a118542b12b2da350d87d9f1c1260ce4534f7c26df5a99741ca85e1
|
7
|
+
data.tar.gz: ce7e2a07029cda8eb3270a42717614ca41a441ecec51fdaee7a1be7e05da32530a40e4c56807c9ef0d5ef31336fea59249d30c21c89356a88e71280cc0453216
|
data/.gitignore
CHANGED
data/.hound.yml
ADDED
@@ -0,0 +1,818 @@
|
|
1
|
+
################################################################################
|
2
|
+
## Releasing the hounds in your local environment.
|
3
|
+
##
|
4
|
+
## Setup:
|
5
|
+
## $ gem install rubocop
|
6
|
+
##
|
7
|
+
## Run:
|
8
|
+
## $ rubocop ./path/to/file ./or/path/to/directory -c ./.hound.yml
|
9
|
+
##
|
10
|
+
################################################################################
|
11
|
+
|
12
|
+
################################################################################
|
13
|
+
##
|
14
|
+
## Custom options for Hydramata::Works
|
15
|
+
## These options were plucked from below and modified accordingly.
|
16
|
+
##
|
17
|
+
################################################################################
|
18
|
+
AllCops:
|
19
|
+
Include:
|
20
|
+
- Rakefile
|
21
|
+
- config.ru
|
22
|
+
Exclude:
|
23
|
+
- db/**/*
|
24
|
+
- config/**/*
|
25
|
+
- lib/**/version.rb
|
26
|
+
- spec/internal/**/*
|
27
|
+
- spec/*_helper.rb
|
28
|
+
|
29
|
+
MethodLength:
|
30
|
+
Max: 10
|
31
|
+
Description: 'Avoid methods longer than 10 lines of code.'
|
32
|
+
CountComments: false
|
33
|
+
Enabled: true
|
34
|
+
|
35
|
+
LineLength:
|
36
|
+
Description: 'Limit lines to 140 characters.'
|
37
|
+
Max: 140
|
38
|
+
Enabled: true
|
39
|
+
|
40
|
+
ClassLength:
|
41
|
+
Max: 100
|
42
|
+
Description: 'Avoid classes longer than 100 lines of code.'
|
43
|
+
CountComments: false
|
44
|
+
Enabled: true
|
45
|
+
|
46
|
+
################################################################################
|
47
|
+
##
|
48
|
+
## Below this banner, the configuration options were copied from the following
|
49
|
+
## URL:
|
50
|
+
## https://raw.githubusercontent.com/bbatsov/rubocop/master/config/enabled.yml
|
51
|
+
##
|
52
|
+
################################################################################
|
53
|
+
|
54
|
+
# These are all the cops that are enabled in the default configuration.
|
55
|
+
|
56
|
+
AccessModifierIndentation:
|
57
|
+
Description: Check indentation of private/protected visibility modifiers.
|
58
|
+
Enabled: true
|
59
|
+
|
60
|
+
AccessorMethodName:
|
61
|
+
Description: Check the naming of accessor methods for get_/set_.
|
62
|
+
Enabled: true
|
63
|
+
|
64
|
+
Alias:
|
65
|
+
Description: 'Use alias_method instead of alias.'
|
66
|
+
Enabled: true
|
67
|
+
|
68
|
+
AlignArray:
|
69
|
+
Description: >-
|
70
|
+
Align the elements of an array literal if they span more than
|
71
|
+
one line.
|
72
|
+
Enabled: true
|
73
|
+
|
74
|
+
AlignHash:
|
75
|
+
Description: >-
|
76
|
+
Align the elements of a hash literal if they span more than
|
77
|
+
one line.
|
78
|
+
Enabled: true
|
79
|
+
|
80
|
+
AlignParameters:
|
81
|
+
Description: >-
|
82
|
+
Align the parameters of a method call if they span more
|
83
|
+
than one line.
|
84
|
+
Enabled: true
|
85
|
+
|
86
|
+
AndOr:
|
87
|
+
Description: 'Use &&/|| instead of and/or.'
|
88
|
+
Enabled: true
|
89
|
+
|
90
|
+
ArrayJoin:
|
91
|
+
Description: 'Use Array#join instead of Array#*.'
|
92
|
+
Enabled: true
|
93
|
+
|
94
|
+
AsciiComments:
|
95
|
+
Description: 'Use only ascii symbols in comments.'
|
96
|
+
Enabled: true
|
97
|
+
|
98
|
+
AsciiIdentifiers:
|
99
|
+
Description: 'Use only ascii symbols in identifiers.'
|
100
|
+
Enabled: true
|
101
|
+
|
102
|
+
Attr:
|
103
|
+
Description: 'Checks for uses of Module#attr.'
|
104
|
+
Enabled: true
|
105
|
+
|
106
|
+
BeginBlock:
|
107
|
+
Description: 'Avoid the use of BEGIN blocks.'
|
108
|
+
Enabled: true
|
109
|
+
|
110
|
+
BlockComments:
|
111
|
+
Description: 'Do not use block comments.'
|
112
|
+
Enabled: true
|
113
|
+
|
114
|
+
BlockNesting:
|
115
|
+
Description: 'Avoid excessive block nesting'
|
116
|
+
Enabled: true
|
117
|
+
|
118
|
+
Blocks:
|
119
|
+
Description: >-
|
120
|
+
Avoid using {...} for multi-line blocks (multiline chaining is
|
121
|
+
always ugly).
|
122
|
+
Prefer {...} over do...end for single-line blocks.
|
123
|
+
Enabled: true
|
124
|
+
|
125
|
+
BracesAroundHashParameters:
|
126
|
+
Description: 'Enforce braces style inside hash parameters.'
|
127
|
+
Enabled: true
|
128
|
+
|
129
|
+
CaseEquality:
|
130
|
+
Description: 'Avoid explicit use of the case equality operator(===).'
|
131
|
+
Enabled: true
|
132
|
+
|
133
|
+
CaseIndentation:
|
134
|
+
Description: 'Indentation of when in a case/when/[else/]end.'
|
135
|
+
Enabled: true
|
136
|
+
|
137
|
+
CharacterLiteral:
|
138
|
+
Description: 'Checks for uses of character literals.'
|
139
|
+
Enabled: true
|
140
|
+
|
141
|
+
ClassAndModuleCamelCase:
|
142
|
+
Description: 'Use CamelCase for classes and modules.'
|
143
|
+
Enabled: true
|
144
|
+
|
145
|
+
ClassAndModuleChildren:
|
146
|
+
Description: 'Checks style of children classes and modules.'
|
147
|
+
Enabled: true
|
148
|
+
|
149
|
+
ClassMethods:
|
150
|
+
Description: 'Use self when defining module/class methods.'
|
151
|
+
Enabled: true
|
152
|
+
|
153
|
+
ClassVars:
|
154
|
+
Description: 'Avoid the use of class variables.'
|
155
|
+
Enabled: true
|
156
|
+
|
157
|
+
CollectionMethods:
|
158
|
+
Description: 'Preferred collection methods.'
|
159
|
+
Enabled: true
|
160
|
+
|
161
|
+
ColonMethodCall:
|
162
|
+
Description: 'Do not use :: for method call.'
|
163
|
+
Enabled: true
|
164
|
+
|
165
|
+
CommentAnnotation:
|
166
|
+
Description: >-
|
167
|
+
Checks formatting of special comments
|
168
|
+
(TODO, FIXME, OPTIMIZE, HACK, REVIEW).
|
169
|
+
Enabled: true
|
170
|
+
|
171
|
+
CommentIndentation:
|
172
|
+
Description: 'Indentation of comments.'
|
173
|
+
Enabled: true
|
174
|
+
|
175
|
+
ConstantName:
|
176
|
+
Description: 'Constants should use SCREAMING_SNAKE_CASE.'
|
177
|
+
Enabled: true
|
178
|
+
|
179
|
+
CyclomaticComplexity:
|
180
|
+
Description: 'Avoid complex methods.'
|
181
|
+
Enabled: true
|
182
|
+
|
183
|
+
DefWithParentheses:
|
184
|
+
Description: 'Use def with parentheses when there are arguments.'
|
185
|
+
Enabled: true
|
186
|
+
|
187
|
+
Delegate:
|
188
|
+
Description: 'Prefer delegate method for delegations.'
|
189
|
+
Enabled: true
|
190
|
+
|
191
|
+
DeprecatedHashMethods:
|
192
|
+
Description: 'Checks for use of deprecated Hash methods.'
|
193
|
+
Enabled: true
|
194
|
+
|
195
|
+
Documentation:
|
196
|
+
Description: 'Document classes and non-namespace modules.'
|
197
|
+
Enabled: true
|
198
|
+
Exclude:
|
199
|
+
- spec/**/*
|
200
|
+
- lib/**/version.rb
|
201
|
+
|
202
|
+
DotPosition:
|
203
|
+
Description: 'Checks the position of the dot in multi-line method calls.'
|
204
|
+
EnforcedStyle: trailing
|
205
|
+
Enabled: true
|
206
|
+
|
207
|
+
DoubleNegation:
|
208
|
+
Description: 'Checks for uses of double negation (!!).'
|
209
|
+
Enabled: true
|
210
|
+
|
211
|
+
EachWithObject:
|
212
|
+
Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
|
213
|
+
Enabled: true
|
214
|
+
|
215
|
+
EmptyLineBetweenDefs:
|
216
|
+
Description: 'Use empty lines between defs.'
|
217
|
+
Enabled: true
|
218
|
+
|
219
|
+
EmptyLines:
|
220
|
+
Description: "Don't use several empty lines in a row."
|
221
|
+
Enabled: true
|
222
|
+
|
223
|
+
EmptyLinesAroundAccessModifier:
|
224
|
+
Description: "Keep blank lines around access modifiers."
|
225
|
+
Enabled: true
|
226
|
+
|
227
|
+
EmptyLinesAroundBody:
|
228
|
+
Description: "Keeps track of empty lines around expression bodies."
|
229
|
+
Enabled: true
|
230
|
+
|
231
|
+
EmptyLiteral:
|
232
|
+
Description: 'Prefer literals to Array.new/Hash.new/String.new.'
|
233
|
+
Enabled: true
|
234
|
+
|
235
|
+
Encoding:
|
236
|
+
Description: 'Use UTF-8 as the source file encoding.'
|
237
|
+
Enabled: true
|
238
|
+
|
239
|
+
EndBlock:
|
240
|
+
Description: 'Avoid the use of END blocks.'
|
241
|
+
Enabled: true
|
242
|
+
|
243
|
+
EndOfLine:
|
244
|
+
Description: 'Use Unix-style line endings.'
|
245
|
+
Enabled: true
|
246
|
+
|
247
|
+
EvenOdd:
|
248
|
+
Description: 'Favor the use of Fixnum#even? && Fixnum#odd?'
|
249
|
+
Enabled: true
|
250
|
+
|
251
|
+
FileName:
|
252
|
+
Description: 'Use snake_case for source file names.'
|
253
|
+
Enabled: false
|
254
|
+
|
255
|
+
FlipFlop:
|
256
|
+
Description: 'Checks for flip flops'
|
257
|
+
Enabled: true
|
258
|
+
|
259
|
+
For:
|
260
|
+
Description: 'Checks use of for or each in multiline loops.'
|
261
|
+
Enabled: true
|
262
|
+
|
263
|
+
FormatString:
|
264
|
+
Description: 'Enforce the use of Kernel#sprintf, Kernel#format or String#%.'
|
265
|
+
Enabled: true
|
266
|
+
|
267
|
+
GlobalVars:
|
268
|
+
Description: 'Do not introduce global variables.'
|
269
|
+
Enabled: true
|
270
|
+
|
271
|
+
HashSyntax:
|
272
|
+
Description: >-
|
273
|
+
Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax
|
274
|
+
{ :a => 1, :b => 2 }.
|
275
|
+
Enabled: true
|
276
|
+
|
277
|
+
IfUnlessModifier:
|
278
|
+
Description: >-
|
279
|
+
Favor modifier if/unless usage when you have a
|
280
|
+
single-line body.
|
281
|
+
Enabled: true
|
282
|
+
|
283
|
+
IfWithSemicolon:
|
284
|
+
Description: 'Never use if x; .... Use the ternary operator instead.'
|
285
|
+
Enabled: true
|
286
|
+
|
287
|
+
IndentationConsistency:
|
288
|
+
Description: 'Keep indentation straight.'
|
289
|
+
Enabled: true
|
290
|
+
|
291
|
+
IndentationWidth:
|
292
|
+
Description: 'Use 2 spaces for indentation.'
|
293
|
+
Enabled: true
|
294
|
+
|
295
|
+
IndentArray:
|
296
|
+
Description: >-
|
297
|
+
Checks the indentation of the first element in an array
|
298
|
+
literal.
|
299
|
+
Enabled: true
|
300
|
+
|
301
|
+
IndentHash:
|
302
|
+
Description: 'Checks the indentation of the first key in a hash literal.'
|
303
|
+
Enabled: true
|
304
|
+
|
305
|
+
Lambda:
|
306
|
+
Description: 'Use the new lambda literal syntax for single-line blocks.'
|
307
|
+
Enabled: true
|
308
|
+
|
309
|
+
LambdaCall:
|
310
|
+
Description: 'Use lambda.call(...) instead of lambda.(...).'
|
311
|
+
Enabled: true
|
312
|
+
|
313
|
+
LeadingCommentSpace:
|
314
|
+
Description: 'Comments should start with a space.'
|
315
|
+
Enabled: true
|
316
|
+
|
317
|
+
LineEndConcatenation:
|
318
|
+
Description: >-
|
319
|
+
Use \ instead of + or << to concatenate two string literals at
|
320
|
+
line end.
|
321
|
+
Enabled: true
|
322
|
+
|
323
|
+
MethodCallParentheses:
|
324
|
+
Description: 'Do not use parentheses for method calls with no arguments.'
|
325
|
+
Enabled: true
|
326
|
+
|
327
|
+
MethodDefParentheses:
|
328
|
+
Description: >-
|
329
|
+
Checks if the method definitions have or don't have
|
330
|
+
parentheses.
|
331
|
+
Enabled: true
|
332
|
+
|
333
|
+
MethodName:
|
334
|
+
Description: 'Use the configured style when naming methods.'
|
335
|
+
Enabled: true
|
336
|
+
|
337
|
+
ModuleFunction:
|
338
|
+
Description: 'Checks for usage of `extend self` in modules.'
|
339
|
+
Enabled: true
|
340
|
+
|
341
|
+
MultilineBlockChain:
|
342
|
+
Description: 'Avoid multi-line chains of blocks.'
|
343
|
+
Enabled: true
|
344
|
+
|
345
|
+
MultilineIfThen:
|
346
|
+
Description: 'Never use then for multi-line if/unless.'
|
347
|
+
Enabled: true
|
348
|
+
|
349
|
+
MultilineTernaryOperator:
|
350
|
+
Description: >-
|
351
|
+
Avoid multi-line ?: (the ternary operator);
|
352
|
+
use if/unless instead.
|
353
|
+
Enabled: true
|
354
|
+
|
355
|
+
NegatedIf:
|
356
|
+
Description: >-
|
357
|
+
Favor unless over if for negative conditions
|
358
|
+
(or control flow or).
|
359
|
+
Enabled: true
|
360
|
+
|
361
|
+
NegatedWhile:
|
362
|
+
Description: 'Favor until over while for negative conditions.'
|
363
|
+
Enabled: true
|
364
|
+
|
365
|
+
NestedTernaryOperator:
|
366
|
+
Description: 'Use one expression per branch in a ternary operator.'
|
367
|
+
Enabled: true
|
368
|
+
|
369
|
+
Next:
|
370
|
+
Description: 'Use `next` to skip iteration instead of a condition at the end.'
|
371
|
+
Enabled: true
|
372
|
+
|
373
|
+
NilComparison:
|
374
|
+
Description: 'Prefer x.nil? to x == nil.'
|
375
|
+
Enabled: true
|
376
|
+
|
377
|
+
NonNilCheck:
|
378
|
+
Description: 'Checks for redundant nil checks.'
|
379
|
+
Enabled: true
|
380
|
+
|
381
|
+
Not:
|
382
|
+
Description: 'Use ! instead of not.'
|
383
|
+
Enabled: true
|
384
|
+
|
385
|
+
NumericLiterals:
|
386
|
+
Description: >-
|
387
|
+
Add underscores to large numeric literals to improve their
|
388
|
+
readability.
|
389
|
+
Enabled: true
|
390
|
+
|
391
|
+
OneLineConditional:
|
392
|
+
Description: >-
|
393
|
+
Favor the ternary operator(?:) over
|
394
|
+
if/then/else/end constructs.
|
395
|
+
Enabled: true
|
396
|
+
|
397
|
+
OpMethod:
|
398
|
+
Description: 'When defining binary operators, name the argument other.'
|
399
|
+
Enabled: true
|
400
|
+
|
401
|
+
ParameterLists:
|
402
|
+
Description: 'Avoid parameter lists longer than three or four parameters.'
|
403
|
+
Enabled: true
|
404
|
+
|
405
|
+
ParenthesesAroundCondition:
|
406
|
+
Description: >-
|
407
|
+
Don't use parentheses around the condition of an
|
408
|
+
if/unless/while.
|
409
|
+
Enabled: true
|
410
|
+
|
411
|
+
PercentLiteralDelimiters:
|
412
|
+
Description: 'Use `%`-literal delimiters consistently'
|
413
|
+
PreferredDelimiters:
|
414
|
+
'%': ()
|
415
|
+
'%i': ()
|
416
|
+
'%q': ()
|
417
|
+
'%Q': ()
|
418
|
+
'%r': '{}'
|
419
|
+
'%s': ()
|
420
|
+
'%w': ()
|
421
|
+
'%W': ()
|
422
|
+
'%x': ()
|
423
|
+
Enabled: true
|
424
|
+
|
425
|
+
PerlBackrefs:
|
426
|
+
Description: 'Avoid Perl-style regex back references.'
|
427
|
+
Enabled: true
|
428
|
+
|
429
|
+
PredicateName:
|
430
|
+
Description: 'Check the names of predicate methods.'
|
431
|
+
Enabled: true
|
432
|
+
|
433
|
+
Proc:
|
434
|
+
Description: 'Use proc instead of Proc.new.'
|
435
|
+
Enabled: true
|
436
|
+
|
437
|
+
RaiseArgs:
|
438
|
+
Description: 'Checks the arguments passed to raise/fail.'
|
439
|
+
Enabled: true
|
440
|
+
|
441
|
+
RedundantBegin:
|
442
|
+
Description: "Don't use begin blocks when they are not needed."
|
443
|
+
Enabled: true
|
444
|
+
|
445
|
+
RedundantException:
|
446
|
+
Description: "Checks for an obsolete RuntimeException argument in raise/fail."
|
447
|
+
Enabled: true
|
448
|
+
|
449
|
+
RedundantReturn:
|
450
|
+
Description: "Don't use return where it's not required."
|
451
|
+
Enabled: true
|
452
|
+
|
453
|
+
RedundantSelf:
|
454
|
+
Description: "Don't use self where it's not needed."
|
455
|
+
Enabled: true
|
456
|
+
|
457
|
+
RegexpLiteral:
|
458
|
+
Description: >-
|
459
|
+
Use %r for regular expressions matching more than
|
460
|
+
`MaxSlashes` '/' characters.
|
461
|
+
Use %r only for regular expressions matching more than
|
462
|
+
`MaxSlashes` '/' character.
|
463
|
+
Enabled: true
|
464
|
+
|
465
|
+
RescueModifier:
|
466
|
+
Description: 'Avoid using rescue in its modifier form.'
|
467
|
+
Enabled: true
|
468
|
+
|
469
|
+
SelfAssignment:
|
470
|
+
Description: 'Checks for places where self-assignment shorthand should have been used.'
|
471
|
+
Enabled: true
|
472
|
+
|
473
|
+
Semicolon:
|
474
|
+
Description: "Don't use semicolons to terminate expressions."
|
475
|
+
Enabled: true
|
476
|
+
|
477
|
+
SignalException:
|
478
|
+
Description: 'Checks for proper usage of fail and raise.'
|
479
|
+
Enabled: true
|
480
|
+
|
481
|
+
SingleLineBlockParams:
|
482
|
+
Description: 'Enforces the names of some block params.'
|
483
|
+
Enabled: true
|
484
|
+
|
485
|
+
SingleLineMethods:
|
486
|
+
Description: 'Avoid single-line methods.'
|
487
|
+
Enabled: true
|
488
|
+
|
489
|
+
SingleSpaceBeforeFirstArg:
|
490
|
+
Description: >-
|
491
|
+
Checks that exactly one space is used between a method name
|
492
|
+
and the first argument for method calls without parentheses.
|
493
|
+
Enabled: true
|
494
|
+
|
495
|
+
SpaceAfterColon:
|
496
|
+
Description: 'Use spaces after colons.'
|
497
|
+
Enabled: true
|
498
|
+
|
499
|
+
SpaceAfterComma:
|
500
|
+
Description: 'Use spaces after commas.'
|
501
|
+
Enabled: true
|
502
|
+
|
503
|
+
SpaceAfterControlKeyword:
|
504
|
+
Description: 'Use spaces after if/elsif/unless/while/until/case/when.'
|
505
|
+
Enabled: true
|
506
|
+
|
507
|
+
SpaceAfterMethodName:
|
508
|
+
Description: >-
|
509
|
+
Never put a space between a method name and the opening
|
510
|
+
parenthesis in a method definition.
|
511
|
+
Enabled: true
|
512
|
+
|
513
|
+
SpaceAfterNot:
|
514
|
+
Description: Tracks redundant space after the ! operator.
|
515
|
+
Enabled: true
|
516
|
+
|
517
|
+
SpaceAfterSemicolon:
|
518
|
+
Description: 'Use spaces after semicolons.'
|
519
|
+
Enabled: true
|
520
|
+
|
521
|
+
SpaceBeforeBlockBraces:
|
522
|
+
Description: >-
|
523
|
+
Checks that the left block brace has or doesn't have space
|
524
|
+
before it.
|
525
|
+
Enabled: true
|
526
|
+
|
527
|
+
SpaceInsideBlockBraces:
|
528
|
+
Description: >-
|
529
|
+
Checks that block braces have or don't have surrounding space.
|
530
|
+
For blocks taking parameters, checks that the left brace has
|
531
|
+
or doesn't have trailing space.
|
532
|
+
Enabled: true
|
533
|
+
|
534
|
+
SpaceAroundEqualsInParameterDefault:
|
535
|
+
Description: >-
|
536
|
+
Checks that the equals signs in parameter default assignments
|
537
|
+
have or don't have surrounding space depending on
|
538
|
+
configuration.
|
539
|
+
Enabled: true
|
540
|
+
|
541
|
+
SpaceAroundOperators:
|
542
|
+
Description: 'Use spaces around operators.'
|
543
|
+
Enabled: true
|
544
|
+
|
545
|
+
SpaceBeforeModifierKeyword:
|
546
|
+
Description: 'Put a space before the modifier keyword.'
|
547
|
+
Enabled: true
|
548
|
+
|
549
|
+
SpaceInsideBrackets:
|
550
|
+
Description: 'No spaces after [ or before ].'
|
551
|
+
Enabled: true
|
552
|
+
|
553
|
+
SpaceInsideHashLiteralBraces:
|
554
|
+
Description: "Use spaces inside hash literal braces - or don't."
|
555
|
+
Enabled: true
|
556
|
+
|
557
|
+
SpaceInsideParens:
|
558
|
+
Description: 'No spaces after ( or before ).'
|
559
|
+
Enabled: true
|
560
|
+
|
561
|
+
SpecialGlobalVars:
|
562
|
+
Description: 'Avoid Perl-style global variables.'
|
563
|
+
Enabled: true
|
564
|
+
|
565
|
+
StringLiterals:
|
566
|
+
Description: 'Checks if uses of quotes match the configured preference.'
|
567
|
+
Enabled: false
|
568
|
+
|
569
|
+
Tab:
|
570
|
+
Description: 'No hard tabs.'
|
571
|
+
Enabled: true
|
572
|
+
|
573
|
+
TrailingBlankLines:
|
574
|
+
Description: 'Checks trailing blank lines and final newline.'
|
575
|
+
Enabled: true
|
576
|
+
|
577
|
+
TrailingComma:
|
578
|
+
Description: 'Checks for trailing comma in parameter lists and literals.'
|
579
|
+
Enabled: true
|
580
|
+
|
581
|
+
TrailingWhitespace:
|
582
|
+
Description: 'Avoid trailing whitespace.'
|
583
|
+
Enabled: true
|
584
|
+
|
585
|
+
TrivialAccessors:
|
586
|
+
Description: 'Prefer attr_* methods to trivial readers/writers.'
|
587
|
+
Enabled: true
|
588
|
+
|
589
|
+
UnlessElse:
|
590
|
+
Description: >-
|
591
|
+
Never use unless with else. Rewrite these with the positive
|
592
|
+
case first.
|
593
|
+
Enabled: true
|
594
|
+
|
595
|
+
UnneededCapitalW:
|
596
|
+
Description: 'Checks for %W when interpolation is not needed.'
|
597
|
+
Enabled: true
|
598
|
+
|
599
|
+
VariableInterpolation:
|
600
|
+
Description: >-
|
601
|
+
Don't interpolate global, instance and class variables
|
602
|
+
directly in strings.
|
603
|
+
Enabled: true
|
604
|
+
|
605
|
+
VariableName:
|
606
|
+
Description: 'Use the configured style when naming variables.'
|
607
|
+
Enabled: true
|
608
|
+
|
609
|
+
WhenThen:
|
610
|
+
Description: 'Use when x then ... for one-line cases.'
|
611
|
+
Enabled: true
|
612
|
+
|
613
|
+
WhileUntilDo:
|
614
|
+
Description: 'Checks for redundant do after while or until.'
|
615
|
+
Enabled: true
|
616
|
+
|
617
|
+
WhileUntilModifier:
|
618
|
+
Description: >-
|
619
|
+
Favor modifier while/until usage when you have a
|
620
|
+
single-line body.
|
621
|
+
Enabled: true
|
622
|
+
|
623
|
+
WordArray:
|
624
|
+
Description: 'Use %w or %W for arrays of words.'
|
625
|
+
Enabled: true
|
626
|
+
|
627
|
+
#################### Lint ################################
|
628
|
+
### Warnings
|
629
|
+
|
630
|
+
AmbiguousOperator:
|
631
|
+
Description: >-
|
632
|
+
Checks for ambiguous operators in the first argument of a
|
633
|
+
method invocation without parentheses.
|
634
|
+
Enabled: true
|
635
|
+
|
636
|
+
AmbiguousRegexpLiteral:
|
637
|
+
Description: >-
|
638
|
+
Checks for ambiguous regexp literals in the first argument of
|
639
|
+
a method invocation without parenthesis.
|
640
|
+
Enabled: true
|
641
|
+
|
642
|
+
AssignmentInCondition:
|
643
|
+
Description: "Don't use assignment in conditions."
|
644
|
+
Enabled: true
|
645
|
+
|
646
|
+
BlockAlignment:
|
647
|
+
Description: 'Align block ends correctly.'
|
648
|
+
Enabled: true
|
649
|
+
|
650
|
+
ConditionPosition:
|
651
|
+
Description: 'Checks for condition placed in a confusing position relative to the keyword.'
|
652
|
+
Enabled: true
|
653
|
+
|
654
|
+
Debugger:
|
655
|
+
Description: 'Check for debugger calls.'
|
656
|
+
Enabled: true
|
657
|
+
|
658
|
+
DeprecatedClassMethods:
|
659
|
+
Description: 'Check for deprecated class method calls.'
|
660
|
+
Enabled: true
|
661
|
+
|
662
|
+
ElseLayout:
|
663
|
+
Description: 'Check for odd code arrangement in an else block.'
|
664
|
+
Enabled: true
|
665
|
+
|
666
|
+
EmptyEnsure:
|
667
|
+
Description: 'Checks for empty ensure block.'
|
668
|
+
Enabled: true
|
669
|
+
|
670
|
+
EmptyInterpolation:
|
671
|
+
Description: 'Checks for empty string interpolation.'
|
672
|
+
Enabled: true
|
673
|
+
|
674
|
+
EndAlignment:
|
675
|
+
Description: 'Align ends correctly.'
|
676
|
+
Enabled: true
|
677
|
+
|
678
|
+
EndInMethod:
|
679
|
+
Description: 'END blocks should not be placed inside method definitions.'
|
680
|
+
Enabled: true
|
681
|
+
|
682
|
+
EnsureReturn:
|
683
|
+
Description: 'Never use return in an ensure block.'
|
684
|
+
Enabled: true
|
685
|
+
|
686
|
+
Eval:
|
687
|
+
Description: 'The use of eval represents a serious security risk.'
|
688
|
+
Enabled: true
|
689
|
+
|
690
|
+
GuardClause:
|
691
|
+
Description: 'Check for conditionals that can be replaced with guard clauses'
|
692
|
+
Enabled: true
|
693
|
+
|
694
|
+
HandleExceptions:
|
695
|
+
Description: "Don't suppress exception."
|
696
|
+
Enabled: true
|
697
|
+
|
698
|
+
InvalidCharacterLiteral:
|
699
|
+
Description: >-
|
700
|
+
Checks for invalid character literals with a non-escaped
|
701
|
+
whitespace character.
|
702
|
+
Enabled: true
|
703
|
+
|
704
|
+
LiteralInCondition:
|
705
|
+
Description: 'Checks of literals used in conditions.'
|
706
|
+
Enabled: true
|
707
|
+
|
708
|
+
LiteralInInterpolation:
|
709
|
+
Description: 'Checks for literals used in interpolation.'
|
710
|
+
Enabled: true
|
711
|
+
|
712
|
+
Loop:
|
713
|
+
Description: >-
|
714
|
+
Use Kernel#loop with break rather than begin/end/until or
|
715
|
+
begin/end/while for post-loop tests.
|
716
|
+
Enabled: true
|
717
|
+
|
718
|
+
ParenthesesAsGroupedExpression:
|
719
|
+
Description: >-
|
720
|
+
Checks for method calls with a space before the opening
|
721
|
+
parenthesis.
|
722
|
+
Enabled: true
|
723
|
+
|
724
|
+
RequireParentheses:
|
725
|
+
Description: >-
|
726
|
+
Use parentheses in the method call to avoid confusion
|
727
|
+
about precedence.
|
728
|
+
Enabled: true
|
729
|
+
|
730
|
+
RescueException:
|
731
|
+
Description: 'Avoid rescuing the Exception class.'
|
732
|
+
Enabled: true
|
733
|
+
|
734
|
+
ShadowingOuterLocalVariable:
|
735
|
+
Description: >-
|
736
|
+
Do not use the same name as outer local variable
|
737
|
+
for block arguments or block local variables.
|
738
|
+
Enabled: true
|
739
|
+
|
740
|
+
SpaceBeforeFirstArg:
|
741
|
+
Description: >-
|
742
|
+
Put a space between a method name and the first argument
|
743
|
+
in a method call without parentheses.
|
744
|
+
Enabled: true
|
745
|
+
|
746
|
+
StringConversionInInterpolation:
|
747
|
+
Description: 'Checks for Object#to_s usage in string interpolation.'
|
748
|
+
Enabled: true
|
749
|
+
|
750
|
+
UnderscorePrefixedVariableName:
|
751
|
+
Description: 'Do not use prefix `_` for a variable that is used.'
|
752
|
+
Enabled: true
|
753
|
+
|
754
|
+
UnusedBlockArgument:
|
755
|
+
Description: 'Checks for unused block arguments.'
|
756
|
+
Enabled: true
|
757
|
+
|
758
|
+
UnusedMethodArgument:
|
759
|
+
Description: 'Checks for unused method arguments.'
|
760
|
+
Enabled: true
|
761
|
+
|
762
|
+
UnreachableCode:
|
763
|
+
Description: 'Unreachable code.'
|
764
|
+
Enabled: true
|
765
|
+
|
766
|
+
UselessAccessModifier:
|
767
|
+
Description: 'Checks for useless access modifiers.'
|
768
|
+
Enabled: true
|
769
|
+
|
770
|
+
UselessAssignment:
|
771
|
+
Description: 'Checks for useless assignment to a local variable.'
|
772
|
+
Enabled: true
|
773
|
+
|
774
|
+
UselessComparison:
|
775
|
+
Description: 'Checks for comparison of something with itself.'
|
776
|
+
Enabled: true
|
777
|
+
|
778
|
+
UselessElseWithoutRescue:
|
779
|
+
Description: 'Checks for useless `else` in `begin..end` without `rescue`.'
|
780
|
+
Enabled: true
|
781
|
+
|
782
|
+
UselessSetterCall:
|
783
|
+
Description: 'Checks for useless setter call to a local variable.'
|
784
|
+
Enabled: true
|
785
|
+
|
786
|
+
Void:
|
787
|
+
Description: 'Possible use of operator/literal/variable in void context.'
|
788
|
+
Enabled: true
|
789
|
+
|
790
|
+
##################### Rails ##################################
|
791
|
+
|
792
|
+
ActionFilter:
|
793
|
+
Description: 'Enforces consistent use of action filter methods.'
|
794
|
+
Enabled: true
|
795
|
+
|
796
|
+
DefaultScope:
|
797
|
+
Description: 'Checks if the argument passed to default_scope is a block.'
|
798
|
+
Enabled: true
|
799
|
+
|
800
|
+
HasAndBelongsToMany:
|
801
|
+
Description: 'Prefer has_many :through to has_and_belongs_to_many.'
|
802
|
+
Enabled: true
|
803
|
+
|
804
|
+
Output:
|
805
|
+
Description: 'Checks for calls to puts, print, etc.'
|
806
|
+
Enabled: true
|
807
|
+
|
808
|
+
ReadWriteAttribute:
|
809
|
+
Description: 'Checks for read_attribute(:attr) and write_attribute(:attr, val).'
|
810
|
+
Enabled: true
|
811
|
+
|
812
|
+
ScopeArgs:
|
813
|
+
Description: 'Checks the arguments of ActiveRecord scopes.'
|
814
|
+
Enabled: true
|
815
|
+
|
816
|
+
Validation:
|
817
|
+
Description: 'Use sexy validations.'
|
818
|
+
Enabled: true
|