api_tommy 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +16 -0
- data/.rubocop.yml +603 -0
- data/.ruby-version +1 -0
- data/.travis.yml +7 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +70 -0
- data/LICENSE.txt +22 -0
- data/README.md +193 -0
- data/Rakefile +7 -0
- data/api_tommy.gemspec +31 -0
- data/lib/api_tommy.rb +11 -0
- data/lib/api_tommy/error.rb +3 -0
- data/lib/api_tommy/generator.rb +131 -0
- data/lib/api_tommy/github.rb +39 -0
- data/lib/api_tommy/markdown.rb +41 -0
- data/lib/api_tommy/version.rb +3 -0
- data/lib/rdoc/discover.rb +3 -0
- data/lib/rdoc/generator/api_tommy.rb +25 -0
- data/test/fixtures/footer.md +1 -0
- data/test/fixtures/header.md +1 -0
- data/test/fixtures/samples_controller.rb +47 -0
- data/test/lib/api_tommy/github_test.rb +49 -0
- data/test/lib/api_tommy/markdown_test.rb +32 -0
- data/test/lib/rdoc/generator/api_tommy_test.rb +95 -0
- data/test/test_helper.rb +16 -0
- metadata +203 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: d236f918134210aec5a3e4a206a99296c0213d44
|
4
|
+
data.tar.gz: db20c54eade43aacbdfd782011e3685202cb43fb
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: de5ad3f498768390503446b56347c7fdf4427b68afc7bf501b2b5406784d4cc5dd62af40311c9303effb4822a961aa333848b76bbe18dfa4b28b69c87de20cf9
|
7
|
+
data.tar.gz: 0af4b3791124059f165cedf6600a8b1fa5efc296888ab1c0ef19a75a2ad97a47db67676d6a749b5e6d9546d94d87bd93e0fdd999bf5c370d817a413e6d6ee430
|
data/.gitignore
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,603 @@
|
|
1
|
+
# Common configuration.
|
2
|
+
AllCops:
|
3
|
+
# Include gemspec and Rakefile
|
4
|
+
Include:
|
5
|
+
- '**/*.gemspec'
|
6
|
+
- '**/*.podspec'
|
7
|
+
- '**/*.jbuilder'
|
8
|
+
- '**/*.rake'
|
9
|
+
- '**/*.opal'
|
10
|
+
- '**/Gemfile'
|
11
|
+
- '**/Rakefile'
|
12
|
+
- '**/Capfile'
|
13
|
+
- '**/Guardfile'
|
14
|
+
- '**/Podfile'
|
15
|
+
- '**/Thorfile'
|
16
|
+
- '**/Vagrantfile'
|
17
|
+
- '**/Berksfile'
|
18
|
+
- '**/Cheffile'
|
19
|
+
- '**/Vagabondfile'
|
20
|
+
Exclude:
|
21
|
+
- 'vendor/**/*'
|
22
|
+
# By default, the rails cops are not run. Override in project or home
|
23
|
+
# directory .rubocop.yml files, or by giving the -R/--rails option.
|
24
|
+
RunRailsCops: true
|
25
|
+
|
26
|
+
# Indent private/protected/public as deep as method definitions
|
27
|
+
Style/AccessModifierIndentation:
|
28
|
+
EnforcedStyle: indent
|
29
|
+
SupportedStyles:
|
30
|
+
- outdent
|
31
|
+
- indent
|
32
|
+
|
33
|
+
# Align the elements of a hash literal if they span more than one line.
|
34
|
+
Style/AlignHash:
|
35
|
+
# Alignment of entries using hash rocket as separator. Valid values are:
|
36
|
+
#
|
37
|
+
# key - left alignment of keys
|
38
|
+
# 'a' => 2
|
39
|
+
# 'bb' => 3
|
40
|
+
# separator - alignment of hash rockets, keys are right aligned
|
41
|
+
# 'a' => 2
|
42
|
+
# 'bb' => 3
|
43
|
+
# table - left alignment of keys, hash rockets, and values
|
44
|
+
# 'a' => 2
|
45
|
+
# 'bb' => 3
|
46
|
+
EnforcedHashRocketStyle: key
|
47
|
+
# Alignment of entries using colon as separator. Valid values are:
|
48
|
+
#
|
49
|
+
# key - left alignment of keys
|
50
|
+
# a: 0
|
51
|
+
# bb: 1
|
52
|
+
# separator - alignment of colons, keys are right aligned
|
53
|
+
# a: 0
|
54
|
+
# bb: 1
|
55
|
+
# table - left alignment of keys and values
|
56
|
+
# a: 0
|
57
|
+
# bb: 1
|
58
|
+
EnforcedColonStyle: key
|
59
|
+
# Select whether hashes that are the last argument in a method call should be
|
60
|
+
# inspected? Valid values are:
|
61
|
+
#
|
62
|
+
# always_inspect - Inspect both implicit and explicit hashes.
|
63
|
+
# Registers an offense for:
|
64
|
+
# function(a: 1,
|
65
|
+
# b: 2)
|
66
|
+
# Registers an offense for:
|
67
|
+
# function({a: 1,
|
68
|
+
# b: 2})
|
69
|
+
# always_ignore - Ignore both implicit and explicit hashes.
|
70
|
+
# Accepts:
|
71
|
+
# function(a: 1,
|
72
|
+
# b: 2)
|
73
|
+
# Accepts:
|
74
|
+
# function({a: 1,
|
75
|
+
# b: 2})
|
76
|
+
# ignore_implicit - Ignore only implicit hashes.
|
77
|
+
# Accepts:
|
78
|
+
# function(a: 1,
|
79
|
+
# b: 2)
|
80
|
+
# Registers an offense for:
|
81
|
+
# function({a: 1,
|
82
|
+
# b: 2})
|
83
|
+
# ignore_explicit - Ignore only explicit hashes.
|
84
|
+
# Accepts:
|
85
|
+
# function({a: 1,
|
86
|
+
# b: 2})
|
87
|
+
# Registers an offense for:
|
88
|
+
# function(a: 1,
|
89
|
+
# b: 2)
|
90
|
+
EnforcedLastArgumentHashStyle: always_inspect
|
91
|
+
SupportedLastArgumentHashStyles:
|
92
|
+
- always_inspect
|
93
|
+
- always_ignore
|
94
|
+
- ignore_implicit
|
95
|
+
- ignore_explicit
|
96
|
+
|
97
|
+
Style/AlignParameters:
|
98
|
+
# Alignment of parameters in multi-line method calls.
|
99
|
+
#
|
100
|
+
# The `with_first_parameter` style aligns the following lines along the same
|
101
|
+
# column as the first parameter.
|
102
|
+
#
|
103
|
+
# method_call(a,
|
104
|
+
# b)
|
105
|
+
#
|
106
|
+
# The `with_fixed_indentation` style aligns the following lines with one
|
107
|
+
# level of indentation relative to the start of the line with the method call.
|
108
|
+
#
|
109
|
+
# method_call(a,
|
110
|
+
# b)
|
111
|
+
EnforcedStyle: with_first_parameter
|
112
|
+
SupportedStyles:
|
113
|
+
- with_first_parameter
|
114
|
+
- with_fixed_indentation
|
115
|
+
|
116
|
+
Style/AndOr:
|
117
|
+
# Whether `and` and `or` are banned only in conditionals (conditionals)
|
118
|
+
# or completely (always).
|
119
|
+
EnforcedStyle: always
|
120
|
+
SupportedStyles:
|
121
|
+
- always
|
122
|
+
- conditionals
|
123
|
+
|
124
|
+
|
125
|
+
# Checks if usage of %() or %Q() matches configuration.
|
126
|
+
Style/BarePercentLiterals:
|
127
|
+
EnforcedStyle: bare_percent
|
128
|
+
SupportedStyles:
|
129
|
+
- percent_q
|
130
|
+
- bare_percent
|
131
|
+
|
132
|
+
Style/BracesAroundHashParameters:
|
133
|
+
EnforcedStyle: no_braces
|
134
|
+
SupportedStyles:
|
135
|
+
- braces
|
136
|
+
- no_braces
|
137
|
+
|
138
|
+
# Indentation of `when`.
|
139
|
+
Style/CaseIndentation:
|
140
|
+
IndentWhenRelativeTo: case
|
141
|
+
SupportedStyles:
|
142
|
+
- case
|
143
|
+
- end
|
144
|
+
IndentOneStep: false
|
145
|
+
|
146
|
+
Style/ClassAndModuleChildren:
|
147
|
+
# Checks the style of children definitions at classes and modules.
|
148
|
+
#
|
149
|
+
# Basically there are two different styles:
|
150
|
+
#
|
151
|
+
# `nested` - have each child on a separate line
|
152
|
+
# class Foo
|
153
|
+
# class Bar
|
154
|
+
# end
|
155
|
+
# end
|
156
|
+
#
|
157
|
+
# `compact` - combine definitions as much as possible
|
158
|
+
# class Foo::Bar
|
159
|
+
# end
|
160
|
+
#
|
161
|
+
# The compact style is only forced, for classes / modules with one child.
|
162
|
+
EnforcedStyle: nested
|
163
|
+
SupportedStyles:
|
164
|
+
- nested
|
165
|
+
- compact
|
166
|
+
|
167
|
+
Style/ClassCheck:
|
168
|
+
EnforcedStyle: is_a?
|
169
|
+
SupportedStyles:
|
170
|
+
- is_a?
|
171
|
+
- kind_of?
|
172
|
+
|
173
|
+
# Align with the style guide.
|
174
|
+
Style/CollectionMethods:
|
175
|
+
# Mapping from undesired method to desired_method
|
176
|
+
# e.g. to use `detect` over `find`:
|
177
|
+
#
|
178
|
+
# CollectionMethods:
|
179
|
+
# PreferredMethods:
|
180
|
+
# find: detect
|
181
|
+
PreferredMethods:
|
182
|
+
collect: 'map'
|
183
|
+
collect!: 'map!'
|
184
|
+
inject: 'reduce'
|
185
|
+
detect: 'find'
|
186
|
+
find_all: 'select'
|
187
|
+
|
188
|
+
# Checks formatting of special comments
|
189
|
+
Style/CommentAnnotation:
|
190
|
+
Keywords:
|
191
|
+
- TODO
|
192
|
+
- FIXME
|
193
|
+
- OPTIMIZE
|
194
|
+
- HACK
|
195
|
+
- REVIEW
|
196
|
+
|
197
|
+
Style/Documentation:
|
198
|
+
Enabled: false
|
199
|
+
|
200
|
+
# Multi-line method chaining should be done with leading dots.
|
201
|
+
Style/DotPosition:
|
202
|
+
EnforcedStyle: leading
|
203
|
+
SupportedStyles:
|
204
|
+
- leading
|
205
|
+
- trailing
|
206
|
+
|
207
|
+
# Use empty lines between defs.
|
208
|
+
Style/EmptyLineBetweenDefs:
|
209
|
+
# If true, this parameter means that single line method definitions don't
|
210
|
+
# need an empty line between them.
|
211
|
+
AllowAdjacentOneLineDefs: false
|
212
|
+
|
213
|
+
# Checks whether the source file has a utf-8 encoding comment or not
|
214
|
+
Style/Encoding:
|
215
|
+
EnforcedStyle: always
|
216
|
+
SupportedStyles:
|
217
|
+
- when_needed
|
218
|
+
- always
|
219
|
+
|
220
|
+
Style/FileName:
|
221
|
+
# File names listed in AllCops:Include are excluded by default. Add extra
|
222
|
+
# excludes here.
|
223
|
+
Exclude: []
|
224
|
+
|
225
|
+
# Checks use of for or each in multiline loops.
|
226
|
+
Style/For:
|
227
|
+
EnforcedStyle: each
|
228
|
+
SupportedStyles:
|
229
|
+
- for
|
230
|
+
- each
|
231
|
+
|
232
|
+
# Enforce the method used for string formatting.
|
233
|
+
Style/FormatString:
|
234
|
+
EnforcedStyle: format
|
235
|
+
SupportedStyles:
|
236
|
+
- format
|
237
|
+
- sprintf
|
238
|
+
- percent
|
239
|
+
|
240
|
+
# Built-in global variables are allowed by default.
|
241
|
+
Style/GlobalVars:
|
242
|
+
AllowedVariables: []
|
243
|
+
|
244
|
+
# `MinBodyLength` defines the number of lines of the a body of an if / unless
|
245
|
+
# needs to have to trigger this cop
|
246
|
+
Style/GuardClause:
|
247
|
+
MinBodyLength: 1
|
248
|
+
|
249
|
+
Style/HashSyntax:
|
250
|
+
EnforcedStyle: hash_rockets
|
251
|
+
SupportedStyles:
|
252
|
+
- ruby19
|
253
|
+
- hash_rockets
|
254
|
+
|
255
|
+
Style/IfUnlessModifier:
|
256
|
+
MaxLineLength: 80
|
257
|
+
|
258
|
+
Style/IndentationWidth:
|
259
|
+
# Number of spaces for each indentation level.
|
260
|
+
Width: 2
|
261
|
+
|
262
|
+
# Checks the indentation of the first key in a hash literal.
|
263
|
+
Style/IndentHash:
|
264
|
+
# The value `special_inside_parentheses` means that hash literals with braces
|
265
|
+
# that have their opening brace on the same line as a surrounding opening
|
266
|
+
# round parenthesis, shall have their first key indented relative to the
|
267
|
+
# first position inside the parenthesis.
|
268
|
+
# The value `consistent` means that the indentation of the first key shall
|
269
|
+
# always be relative to the first position of the line where the opening
|
270
|
+
# brace is.
|
271
|
+
EnforcedStyle: special_inside_parentheses
|
272
|
+
SupportedStyles:
|
273
|
+
- special_inside_parentheses
|
274
|
+
- consistent
|
275
|
+
|
276
|
+
Style/LambdaCall:
|
277
|
+
EnforcedStyle: call
|
278
|
+
SupportedStyles:
|
279
|
+
- call
|
280
|
+
- braces
|
281
|
+
|
282
|
+
Style/Next:
|
283
|
+
# With `always` all conditions at the end of an iteration needs to be
|
284
|
+
# replaced by next - with `skip_modifier_ifs` the modifier if like this one
|
285
|
+
# are ignored: [1, 2].each { |a| return 'yes' if a == 1 }
|
286
|
+
EnforcedStyle: skip_modifier_ifs
|
287
|
+
# `MinBodyLength` defines the number of lines of the a body of an if / unless
|
288
|
+
# needs to have to trigger this cop
|
289
|
+
MinBodyLength: 3
|
290
|
+
SupportedStyles:
|
291
|
+
- skip_modifier_ifs
|
292
|
+
- always
|
293
|
+
|
294
|
+
Style/NonNilCheck:
|
295
|
+
# With `IncludeSemanticChanges` set to `true`, this cop reports offenses for
|
296
|
+
# `!x.nil?` and autocorrects that and `x != nil` to solely `x`, which is
|
297
|
+
# **usually** OK, but might change behavior.
|
298
|
+
#
|
299
|
+
# With `IncludeSemanticChanges` set to `false`, this cop does not report
|
300
|
+
# offenses for `!x.nil?` and does no changes that might change behavior.
|
301
|
+
IncludeSemanticChanges: false
|
302
|
+
|
303
|
+
Style/MethodDefParentheses:
|
304
|
+
EnforcedStyle: require_parentheses
|
305
|
+
SupportedStyles:
|
306
|
+
- require_parentheses
|
307
|
+
- require_no_parentheses
|
308
|
+
|
309
|
+
Style/MethodName:
|
310
|
+
EnforcedStyle: snake_case
|
311
|
+
SupportedStyles:
|
312
|
+
- snake_case
|
313
|
+
- camelCase
|
314
|
+
|
315
|
+
Style/MultilineOperationIndentation:
|
316
|
+
EnforcedStyle: aligned
|
317
|
+
SupportedStyles:
|
318
|
+
- aligned
|
319
|
+
- indented
|
320
|
+
|
321
|
+
Style/NumericLiterals:
|
322
|
+
Enabled: false
|
323
|
+
|
324
|
+
# Allow safe assignment in conditions.
|
325
|
+
Style/ParenthesesAroundCondition:
|
326
|
+
AllowSafeAssignment: true
|
327
|
+
|
328
|
+
Style/PercentLiteralDelimiters:
|
329
|
+
PreferredDelimiters:
|
330
|
+
'%': ()
|
331
|
+
'%i': ()
|
332
|
+
'%q': ()
|
333
|
+
'%Q': ()
|
334
|
+
'%r': '{}'
|
335
|
+
'%s': ()
|
336
|
+
'%w': ()
|
337
|
+
'%W': ()
|
338
|
+
'%x': ()
|
339
|
+
|
340
|
+
Style/PercentQLiterals:
|
341
|
+
EnforcedStyle: lower_case_q
|
342
|
+
SupportedStyles:
|
343
|
+
- lower_case_q # Use %q when possible, %Q when necessary
|
344
|
+
- upper_case_q # Always use %Q
|
345
|
+
|
346
|
+
Style/PredicateName:
|
347
|
+
# Predicate name prefices.
|
348
|
+
NamePrefix:
|
349
|
+
- is_
|
350
|
+
- has_
|
351
|
+
- have_
|
352
|
+
# Predicate name prefices that should be removed.
|
353
|
+
NamePrefixBlacklist:
|
354
|
+
- is_
|
355
|
+
- has_
|
356
|
+
- have_
|
357
|
+
|
358
|
+
Style/RaiseArgs:
|
359
|
+
EnforcedStyle: exploded
|
360
|
+
SupportedStyles:
|
361
|
+
- compact # raise Exception.new(msg)
|
362
|
+
- exploded # raise Exception, msg
|
363
|
+
|
364
|
+
Style/RedundantReturn:
|
365
|
+
# When true allows code like `return x, y`.
|
366
|
+
AllowMultipleReturnValues: false
|
367
|
+
|
368
|
+
Style/RegexpLiteral:
|
369
|
+
# The maximum number of (escaped) slashes that a slash-delimited regexp is
|
370
|
+
# allowed to have. If there are more slashes, a %r regexp shall be used.
|
371
|
+
MaxSlashes: 1
|
372
|
+
|
373
|
+
Style/Semicolon:
|
374
|
+
# Allow ; to separate several expressions on the same line.
|
375
|
+
AllowAsExpressionSeparator: false
|
376
|
+
|
377
|
+
Style/SignalException:
|
378
|
+
EnforcedStyle: semantic
|
379
|
+
SupportedStyles:
|
380
|
+
- only_raise
|
381
|
+
- only_fail
|
382
|
+
- semantic
|
383
|
+
|
384
|
+
Style/SingleLineBlockParams:
|
385
|
+
Methods:
|
386
|
+
- reduce:
|
387
|
+
- a
|
388
|
+
- e
|
389
|
+
- inject:
|
390
|
+
- a
|
391
|
+
- e
|
392
|
+
|
393
|
+
Style/SingleLineMethods:
|
394
|
+
AllowIfMethodIsEmpty: true
|
395
|
+
|
396
|
+
Style/StringLiterals:
|
397
|
+
EnforcedStyle: double_quotes
|
398
|
+
SupportedStyles:
|
399
|
+
- single_quotes
|
400
|
+
- double_quotes
|
401
|
+
|
402
|
+
Style/StringLiteralsInInterpolation:
|
403
|
+
EnforcedStyle: double_quotes
|
404
|
+
SupportedStyles:
|
405
|
+
- single_quotes
|
406
|
+
- double_quotes
|
407
|
+
|
408
|
+
Style/SpaceAroundEqualsInParameterDefault:
|
409
|
+
EnforcedStyle: space
|
410
|
+
SupportedStyles:
|
411
|
+
- space
|
412
|
+
- no_space
|
413
|
+
|
414
|
+
Style/SpaceBeforeBlockBraces:
|
415
|
+
EnforcedStyle: space
|
416
|
+
SupportedStyles:
|
417
|
+
- space
|
418
|
+
- no_space
|
419
|
+
|
420
|
+
Style/SpaceInsideBlockBraces:
|
421
|
+
EnforcedStyle: space
|
422
|
+
SupportedStyles:
|
423
|
+
- space
|
424
|
+
- no_space
|
425
|
+
# Valid values are: space, no_space
|
426
|
+
EnforcedStyleForEmptyBraces: no_space
|
427
|
+
# Space between { and |. Overrides EnforcedStyle if there is a conflict.
|
428
|
+
SpaceBeforeBlockParameters: true
|
429
|
+
|
430
|
+
Style/SpaceInsideHashLiteralBraces:
|
431
|
+
EnforcedStyle: space
|
432
|
+
EnforcedStyleForEmptyBraces: no_space
|
433
|
+
SupportedStyles:
|
434
|
+
- space
|
435
|
+
- no_space
|
436
|
+
|
437
|
+
Style/SymbolProc:
|
438
|
+
# A list of method names to be ignored by the check.
|
439
|
+
# The names should be fairly unique, otherwise you'll end up ignoring lots of code.
|
440
|
+
IgnoredMethods:
|
441
|
+
- respond_to
|
442
|
+
|
443
|
+
Style/TrailingBlankLines:
|
444
|
+
EnforcedStyle: final_newline
|
445
|
+
SupportedStyles:
|
446
|
+
- final_newline
|
447
|
+
- final_blank_line
|
448
|
+
|
449
|
+
Style/TrailingComma:
|
450
|
+
# If EnforcedStyleForMultiline is comma, the cop allows a comma after the
|
451
|
+
# last item of a list, but only for lists where each item is on its own line.
|
452
|
+
EnforcedStyleForMultiline: no_comma
|
453
|
+
SupportedStyles:
|
454
|
+
- comma
|
455
|
+
- no_comma
|
456
|
+
|
457
|
+
# TrivialAccessors doesn't require exact name matches and doesn't allow
|
458
|
+
# predicated methods by default.
|
459
|
+
Style/TrivialAccessors:
|
460
|
+
ExactNameMatch: false
|
461
|
+
AllowPredicates: false
|
462
|
+
# Allows trivial writers that don't end in an equal sign. e.g.
|
463
|
+
#
|
464
|
+
# def on_exception(action)
|
465
|
+
# @on_exception=action
|
466
|
+
# end
|
467
|
+
# on_exception :restart
|
468
|
+
#
|
469
|
+
# Commonly used in DSLs
|
470
|
+
AllowDSLWriters: false
|
471
|
+
Whitelist:
|
472
|
+
- to_ary
|
473
|
+
- to_a
|
474
|
+
- to_c
|
475
|
+
- to_enum
|
476
|
+
- to_h
|
477
|
+
- to_hash
|
478
|
+
- to_i
|
479
|
+
- to_int
|
480
|
+
- to_io
|
481
|
+
- to_open
|
482
|
+
- to_path
|
483
|
+
- to_proc
|
484
|
+
- to_r
|
485
|
+
- to_regexp
|
486
|
+
- to_str
|
487
|
+
- to_s
|
488
|
+
- to_sym
|
489
|
+
|
490
|
+
Style/VariableName:
|
491
|
+
EnforcedStyle: snake_case
|
492
|
+
SupportedStyles:
|
493
|
+
- snake_case
|
494
|
+
- camelCase
|
495
|
+
|
496
|
+
Style/WhileUntilModifier:
|
497
|
+
MaxLineLength: 80
|
498
|
+
|
499
|
+
Style/WordArray:
|
500
|
+
MinSize: 0
|
501
|
+
# The regular expression WordRegex decides what is considered a word.
|
502
|
+
WordRegex: !ruby/regexp '/\A[\p{Word}]+\z/'
|
503
|
+
|
504
|
+
##################### Metrics ##################################
|
505
|
+
|
506
|
+
Metrics/AbcSize:
|
507
|
+
# The ABC size is a calculated magnitude, so this number can be a Fixnum or
|
508
|
+
# a Float.
|
509
|
+
Max: 15
|
510
|
+
|
511
|
+
Metrics/BlockNesting:
|
512
|
+
Max: 3
|
513
|
+
|
514
|
+
Metrics/ClassLength:
|
515
|
+
CountComments: false # count full line comments?
|
516
|
+
Max: 100
|
517
|
+
|
518
|
+
# Avoid complex methods.
|
519
|
+
Metrics/CyclomaticComplexity:
|
520
|
+
Max: 6
|
521
|
+
|
522
|
+
Metrics/LineLength:
|
523
|
+
Max: 80
|
524
|
+
AllowURI: true
|
525
|
+
URISchemes:
|
526
|
+
- http
|
527
|
+
- https
|
528
|
+
|
529
|
+
Metrics/MethodLength:
|
530
|
+
CountComments: false # count full line comments?
|
531
|
+
Max: 20
|
532
|
+
|
533
|
+
Metrics/ParameterLists:
|
534
|
+
Max: 5
|
535
|
+
CountKeywordArgs: true
|
536
|
+
|
537
|
+
Metrics/PerceivedComplexity:
|
538
|
+
Max: 7
|
539
|
+
|
540
|
+
##################### Lint ##################################
|
541
|
+
|
542
|
+
# Allow safe assignment in conditions.
|
543
|
+
Lint/AssignmentInCondition:
|
544
|
+
AllowSafeAssignment: true
|
545
|
+
|
546
|
+
# Align ends correctly.
|
547
|
+
Lint/EndAlignment:
|
548
|
+
# The value `keyword` means that `end` should be aligned with the matching
|
549
|
+
# keyword (if, while, etc.).
|
550
|
+
# The value `variable` means that in assignments, `end` should be aligned
|
551
|
+
# with the start of the variable on the left hand side of `=`. In all other
|
552
|
+
# situations, `end` should still be aligned with the keyword.
|
553
|
+
AlignWith: keyword
|
554
|
+
SupportedStyles:
|
555
|
+
- keyword
|
556
|
+
- variable
|
557
|
+
|
558
|
+
Lint/DefEndAlignment:
|
559
|
+
# The value `def` means that `end` should be aligned with the def keyword.
|
560
|
+
# The value `start_of_line` means that `end` should be aligned with method
|
561
|
+
# calls like `private`, `public`, etc, if present in front of the `def`
|
562
|
+
# keyword on the same line.
|
563
|
+
AlignWith: start_of_line
|
564
|
+
SupportedStyles:
|
565
|
+
- start_of_line
|
566
|
+
- def
|
567
|
+
|
568
|
+
##################### Rails ##################################
|
569
|
+
|
570
|
+
Rails/ActionFilter:
|
571
|
+
EnforcedStyle: action
|
572
|
+
SupportedStyles:
|
573
|
+
- action
|
574
|
+
- filter
|
575
|
+
Include:
|
576
|
+
- app/controllers/**/*.rb
|
577
|
+
|
578
|
+
Rails/DefaultScope:
|
579
|
+
Include:
|
580
|
+
- app/models/**/*.rb
|
581
|
+
|
582
|
+
Rails/HasAndBelongsToMany:
|
583
|
+
Include:
|
584
|
+
- app/models/**/*.rb
|
585
|
+
|
586
|
+
Rails/Output:
|
587
|
+
Include:
|
588
|
+
- app/**/*.rb
|
589
|
+
- config/**/*.rb
|
590
|
+
- db/**/*.rb
|
591
|
+
- lib/**/*.rb
|
592
|
+
|
593
|
+
Rails/ReadWriteAttribute:
|
594
|
+
Include:
|
595
|
+
- app/models/**/*.rb
|
596
|
+
|
597
|
+
Rails/ScopeArgs:
|
598
|
+
Include:
|
599
|
+
- app/models/**/*.rb
|
600
|
+
|
601
|
+
Rails/Validation:
|
602
|
+
Include:
|
603
|
+
- app/models/**/*.rb
|