feedjira 2.2.0 → 3.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +5 -5
  2. data/.rubocop.yml +635 -6
  3. data/.travis.yml +1 -1
  4. data/CHANGELOG.md +6 -12
  5. data/CODE_OF_CONDUCT.md +74 -0
  6. data/Gemfile +5 -5
  7. data/README.md +37 -99
  8. data/Rakefile +5 -5
  9. data/feedjira.gemspec +27 -19
  10. data/lib/feedjira.rb +69 -41
  11. data/lib/feedjira/configuration.rb +3 -8
  12. data/lib/feedjira/core_ext.rb +3 -3
  13. data/lib/feedjira/core_ext/date.rb +1 -1
  14. data/lib/feedjira/core_ext/time.rb +2 -2
  15. data/lib/feedjira/date_time_utilities.rb +2 -2
  16. data/lib/feedjira/date_time_utilities/date_time_pattern_parser.rb +2 -2
  17. data/lib/feedjira/feed.rb +10 -80
  18. data/lib/feedjira/feed_entry_utilities.rb +4 -4
  19. data/lib/feedjira/parser.rb +4 -1
  20. data/lib/feedjira/parser/atom.rb +3 -3
  21. data/lib/feedjira/parser/atom_entry.rb +1 -1
  22. data/lib/feedjira/parser/atom_feed_burner.rb +4 -4
  23. data/lib/feedjira/parser/atom_feed_burner_entry.rb +1 -1
  24. data/lib/feedjira/parser/atom_youtube.rb +2 -2
  25. data/lib/feedjira/parser/atom_youtube_entry.rb +1 -1
  26. data/lib/feedjira/parser/google_docs_atom.rb +3 -3
  27. data/lib/feedjira/parser/google_docs_atom_entry.rb +1 -1
  28. data/lib/feedjira/parser/itunes_rss_item.rb +1 -1
  29. data/lib/feedjira/parser/json_feed.rb +39 -0
  30. data/lib/feedjira/parser/json_feed_item.rb +51 -0
  31. data/lib/feedjira/parser/podlove_chapter.rb +1 -1
  32. data/lib/feedjira/parser/rss.rb +1 -1
  33. data/lib/feedjira/parser/rss_entry.rb +5 -1
  34. data/lib/feedjira/parser/rss_feed_burner.rb +1 -1
  35. data/lib/feedjira/preprocessor.rb +1 -1
  36. data/lib/feedjira/version.rb +1 -1
  37. data/spec/feedjira/configuration_spec.rb +9 -16
  38. data/spec/feedjira/date_time_utilities_spec.rb +20 -20
  39. data/spec/feedjira/feed_entry_utilities_spec.rb +18 -18
  40. data/spec/feedjira/feed_spec.rb +15 -229
  41. data/spec/feedjira/feed_utilities_spec.rb +72 -72
  42. data/spec/feedjira/parser/atom_entry_spec.rb +34 -34
  43. data/spec/feedjira/parser/atom_feed_burner_entry_spec.rb +16 -16
  44. data/spec/feedjira/parser/atom_feed_burner_spec.rb +121 -119
  45. data/spec/feedjira/parser/atom_spec.rb +78 -76
  46. data/spec/feedjira/parser/atom_youtube_entry_spec.rb +38 -38
  47. data/spec/feedjira/parser/atom_youtube_spec.rb +15 -15
  48. data/spec/feedjira/parser/google_docs_atom_entry_spec.rb +8 -8
  49. data/spec/feedjira/parser/google_docs_atom_spec.rb +23 -21
  50. data/spec/feedjira/parser/itunes_rss_item_spec.rb +37 -37
  51. data/spec/feedjira/parser/itunes_rss_owner_spec.rb +5 -5
  52. data/spec/feedjira/parser/itunes_rss_spec.rb +118 -116
  53. data/spec/feedjira/parser/json_feed_item_spec.rb +79 -0
  54. data/spec/feedjira/parser/json_feed_spec.rb +53 -0
  55. data/spec/feedjira/parser/podlove_chapter_spec.rb +12 -12
  56. data/spec/feedjira/parser/rss_entry_spec.rb +30 -30
  57. data/spec/feedjira/parser/rss_feed_burner_entry_spec.rb +32 -32
  58. data/spec/feedjira/parser/rss_feed_burner_spec.rb +47 -45
  59. data/spec/feedjira/parser/rss_spec.rb +36 -36
  60. data/spec/feedjira/preprocessor_spec.rb +6 -6
  61. data/spec/feedjira_spec.rb +145 -0
  62. data/spec/sample_feeds.rb +27 -26
  63. data/spec/sample_feeds/HuffPostCanada.xml +279 -0
  64. data/spec/sample_feeds/json_feed.json +156 -0
  65. data/spec/spec_helper.rb +5 -5
  66. metadata +31 -49
  67. data/fixtures/vcr_cassettes/fetch_failure.yml +0 -62
  68. data/fixtures/vcr_cassettes/parse_error.yml +0 -222
  69. data/fixtures/vcr_cassettes/success.yml +0 -281
  70. data/spec/sample_feeds/InvalidDateFormat.xml +0 -20
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 3b8cec1f08ed12a497f98c7e4b622f8ab06b688a75e968175dd985ad93cfd4bd
4
- data.tar.gz: 1015179ce20e86b0a02253411e02e9b78bf0294c8f18a8e2fba3fc92c5c04b01
2
+ SHA1:
3
+ metadata.gz: b128986f5aba338178d635d04c7c76a6bf4786c9
4
+ data.tar.gz: d812e34dcf097bd6cc3d5d6b299337898eb119ec
5
5
  SHA512:
6
- metadata.gz: ba84e098bed14b11cf07a816500ff853e3337039bce117abf1bedc17d28d5bc3072d39bb43f747580f8c48de57417df23284fb0d71eb1d79d9f35896ae5c2f5c
7
- data.tar.gz: 8ab31a4eb8427f70d5f26f817c3296a5ab5ea650b1885d4ac5f9518cb7c85fc852ccd29923b29c2f3300f67c6efa558de44a2f4290314ba9b206fe428b6ca13e
6
+ metadata.gz: e199341333e63c4b11fd65532c41d8efd9d7236bd264e21edd9795f1fcbe8b79e35a122534f1b0ee61a0e76fade5364e70a032e142da63589e3158c4fa78440a
7
+ data.tar.gz: bcddaf13bdc6214acb552dadfe23f481a2e0d6e7da99b3e182e9bb067f1e0f70e93f80d62b75e02f52304c5cf4b47252c6a9ee55f6c1c697e9c9800acf230e07
@@ -1,15 +1,644 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.1
2
+ Exclude:
3
+ - db/schema.rb
4
+ - vendor/**/*
3
5
 
4
- Style/Documentation:
6
+ Naming/AccessorMethodName:
7
+ Description: Check the naming of accessor methods for get_/set_.
8
+ Enabled: false
9
+
10
+ Style/Alias:
11
+ Description: 'Use alias_method instead of alias.'
12
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#alias-method'
13
+ Enabled: false
14
+
15
+ Style/ArrayJoin:
16
+ Description: 'Use Array#join instead of Array#*.'
17
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#array-join'
18
+ Enabled: false
19
+
20
+ Style/AsciiComments:
21
+ Description: 'Use only ascii symbols in comments.'
22
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-comments'
23
+ Enabled: false
24
+
25
+ Naming/AsciiIdentifiers:
26
+ Description: 'Use only ascii symbols in identifiers.'
27
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-identifiers'
28
+ Enabled: false
29
+
30
+ Style/Attr:
31
+ Description: 'Checks for uses of Module#attr.'
32
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr'
33
+ Enabled: false
34
+
35
+ Metrics/BlockNesting:
36
+ Description: 'Avoid excessive block nesting'
37
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count'
38
+ Enabled: false
39
+
40
+ Style/CaseEquality:
41
+ Description: 'Avoid explicit use of the case equality operator(===).'
42
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-case-equality'
43
+ Enabled: false
44
+
45
+ Style/CharacterLiteral:
46
+ Description: 'Checks for uses of character literals.'
47
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-character-literals'
48
+ Enabled: false
49
+
50
+ Style/ClassAndModuleChildren:
51
+ Description: 'Checks style of children classes and modules.'
5
52
  Enabled: true
53
+ EnforcedStyle: nested
54
+
55
+ Metrics/ClassLength:
56
+ Description: 'Avoid classes longer than 100 lines of code.'
57
+ Enabled: false
58
+
59
+ Metrics/ModuleLength:
60
+ Description: 'Avoid modules longer than 100 lines of code.'
61
+ Enabled: false
62
+
63
+ Style/ClassVars:
64
+ Description: 'Avoid the use of class variables.'
65
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-class-vars'
66
+ Enabled: false
67
+
68
+ Style/CollectionMethods:
69
+ Enabled: true
70
+ PreferredMethods:
71
+ find: detect
72
+ inject: reduce
73
+ collect: map
74
+ find_all: select
75
+
76
+ Style/ColonMethodCall:
77
+ Description: 'Do not use :: for method call.'
78
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#double-colons'
79
+ Enabled: false
80
+
81
+ Style/CommentAnnotation:
82
+ Description: >-
83
+ Checks formatting of special comments
84
+ (TODO, FIXME, OPTIMIZE, HACK, REVIEW).
85
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#annotate-keywords'
86
+ Enabled: false
87
+
88
+ Metrics/AbcSize:
89
+ Description: >-
90
+ A calculated magnitude based on number of assignments,
91
+ branches, and conditions.
92
+ Enabled: false
93
+
94
+ Metrics/BlockLength:
95
+ CountComments: true # count full line comments?
96
+ Max: 25
97
+ ExcludedMethods: []
6
98
  Exclude:
7
- - 'spec/**/*'
99
+ - "spec/**/*"
100
+
101
+ Metrics/CyclomaticComplexity:
102
+ Description: >-
103
+ A complexity metric that is strongly correlated to the number
104
+ of test cases needed to validate a method.
105
+ Enabled: false
106
+
107
+ Rails/Delegate:
108
+ Description: 'Prefer delegate method for delegations.'
109
+ Enabled: false
110
+
111
+ Style/PreferredHashMethods:
112
+ Description: 'Checks use of `has_key?` and `has_value?` Hash methods.'
113
+ StyleGuide: '#hash-key'
114
+ Enabled: false
115
+
116
+ Style/Documentation:
117
+ Description: 'Document classes and non-namespace modules.'
118
+ Enabled: false
119
+
120
+ Style/DoubleNegation:
121
+ Description: 'Checks for uses of double negation (!!).'
122
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-bang-bang'
123
+ Enabled: false
124
+
125
+ Style/EachWithObject:
126
+ Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
127
+ Enabled: false
128
+
129
+ Style/EmptyLiteral:
130
+ Description: 'Prefer literals to Array.new/Hash.new/String.new.'
131
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#literal-array-hash'
132
+ Enabled: false
133
+
134
+ # Checks whether the source file has a utf-8 encoding comment or not
135
+ # AutoCorrectEncodingComment must match the regex
136
+ # /#.*coding\s?[:=]\s?(?:UTF|utf)-8/
137
+ Style/Encoding:
138
+ Enabled: false
139
+
140
+ Style/EvenOdd:
141
+ Description: 'Favor the use of Fixnum#even? && Fixnum#odd?'
142
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
143
+ Enabled: false
144
+
145
+ Naming/FileName:
146
+ Description: 'Use snake_case for source file names.'
147
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files'
148
+ Enabled: false
149
+
150
+ Style/FrozenStringLiteralComment:
151
+ Description: >-
152
+ Add the frozen_string_literal comment to the top of files
153
+ to help transition from Ruby 2.3.0 to Ruby 3.0.
154
+ Enabled: false
8
155
 
9
- Style/DocumentationMethod:
156
+ Style/FlipFlop:
157
+ Description: 'Checks for flip flops'
158
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-flip-flops'
159
+ Enabled: false
160
+
161
+ Style/FormatString:
162
+ Description: 'Enforce the use of Kernel#sprintf, Kernel#format or String#%.'
163
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#sprintf'
164
+ Enabled: false
165
+
166
+ Style/GlobalVars:
167
+ Description: 'Do not introduce global variables.'
168
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#instance-vars'
169
+ Reference: 'http://www.zenspider.com/Languages/Ruby/QuickRef.html'
170
+ Enabled: false
171
+
172
+ Style/GuardClause:
173
+ Description: 'Check for conditionals that can be replaced with guard clauses'
174
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
175
+ Enabled: false
176
+
177
+ Style/IfUnlessModifier:
178
+ Description: >-
179
+ Favor modifier if/unless usage when you have a
180
+ single-line body.
181
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier'
182
+ Enabled: false
183
+
184
+ Style/IfWithSemicolon:
185
+ Description: 'Do not use if x; .... Use the ternary operator instead.'
186
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs'
187
+ Enabled: false
188
+
189
+ Style/InlineComment:
190
+ Description: 'Avoid inline comments.'
191
+ Enabled: false
192
+
193
+ Style/Lambda:
194
+ Description: 'Use the new lambda literal syntax for single-line blocks.'
195
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#lambda-multi-line'
196
+ Enabled: false
197
+
198
+ Style/LambdaCall:
199
+ Description: 'Use lambda.call(...) instead of lambda.(...).'
200
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc-call'
201
+ Enabled: false
202
+
203
+ Style/LineEndConcatenation:
204
+ Description: >-
205
+ Use \ instead of + or << to concatenate two string literals at
206
+ line end.
207
+ Enabled: false
208
+
209
+ Style/SymbolArray:
10
210
  Enabled: true
211
+ EnforcedStyle: brackets
212
+
213
+ Style/DateTime:
214
+ Enabled: false
215
+
216
+ Metrics/LineLength:
217
+ Description: 'Limit lines to 120 characters.'
218
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits'
219
+ Max: 120
220
+
221
+ Metrics/MethodLength:
222
+ Description: 'Avoid methods longer than 10 lines of code.'
223
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#short-methods'
224
+ Enabled: false
225
+
226
+ Style/ModuleFunction:
227
+ Description: 'Checks for usage of `extend self` in modules.'
228
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#module-function'
229
+ Enabled: false
230
+
231
+ Style/MultilineBlockChain:
232
+ Description: 'Avoid multi-line chains of blocks.'
233
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
234
+ Enabled: false
235
+
236
+ Style/NegatedIf:
237
+ Description: >-
238
+ Favor unless over if for negative conditions
239
+ (or control flow or).
240
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#unless-for-negatives'
241
+ Enabled: false
242
+
243
+ Style/NegatedWhile:
244
+ Description: 'Favor until over while for negative conditions.'
245
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#until-for-negatives'
246
+ Enabled: false
247
+
248
+ Style/Next:
249
+ Description: 'Use `next` to skip iteration instead of a condition at the end.'
250
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
251
+ Enabled: false
252
+
253
+ Style/NilComparison:
254
+ Description: 'Prefer x.nil? to x == nil.'
255
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
256
+ Enabled: false
257
+
258
+ Style/Not:
259
+ Description: 'Use ! instead of not.'
260
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bang-not-not'
261
+ Enabled: false
262
+
263
+ Style/NumericLiterals:
264
+ Description: >-
265
+ Add underscores to large numeric literals to improve their
266
+ readability.
267
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics'
268
+ Enabled: false
269
+
270
+ Style/OneLineConditional:
271
+ Description: >-
272
+ Favor the ternary operator(?:) over
273
+ if/then/else/end constructs.
274
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator'
275
+ Enabled: false
276
+
277
+ Naming/BinaryOperatorParameterName:
278
+ Description: 'When defining binary operators, name the argument other.'
279
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#other-arg'
280
+ Enabled: false
281
+
282
+ Metrics/ParameterLists:
283
+ Description: 'Avoid parameter lists longer than three or four parameters.'
284
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#too-many-params'
285
+ Enabled: false
286
+
287
+ Style/PercentLiteralDelimiters:
288
+ Description: 'Use `%`-literal delimiters consistently'
289
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-literal-braces'
290
+ Enabled: false
291
+
292
+ Style/PerlBackrefs:
293
+ Description: 'Avoid Perl-style regex back references.'
294
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers'
295
+ Enabled: false
296
+
297
+ Naming/PredicateName:
298
+ Description: 'Check the names of predicate methods.'
299
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark'
300
+ NamePrefixBlacklist:
301
+ - is_
11
302
  Exclude:
12
- - 'spec/**/*'
303
+ - spec/**/*
13
304
 
14
- Style/ClassAndModuleChildren:
305
+ Style/Proc:
306
+ Description: 'Use proc instead of Proc.new.'
307
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc'
308
+ Enabled: false
309
+
310
+ Style/RaiseArgs:
311
+ Description: 'Checks the arguments passed to raise/fail.'
312
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#exception-class-messages'
313
+ Enabled: false
314
+
315
+ Style/RegexpLiteral:
316
+ Description: 'Use / or %r around regular expressions.'
317
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-r'
318
+ Enabled: false
319
+
320
+ Style/SelfAssignment:
321
+ Description: >-
322
+ Checks for places where self-assignment shorthand should have
323
+ been used.
324
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#self-assignment'
325
+ Enabled: false
326
+
327
+ Style/SingleLineBlockParams:
328
+ Description: 'Enforces the names of some block params.'
329
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#reduce-blocks'
330
+ Enabled: false
331
+
332
+ Style/SingleLineMethods:
333
+ Description: 'Avoid single-line methods.'
334
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-single-line-methods'
335
+ Enabled: false
336
+
337
+ Style/SignalException:
338
+ Description: 'Checks for proper usage of fail and raise.'
339
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#fail-method'
340
+ Enabled: false
341
+
342
+ Style/SpecialGlobalVars:
343
+ Description: 'Avoid Perl-style global variables.'
344
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms'
345
+ Enabled: false
346
+
347
+ Style/StringLiterals:
348
+ Description: 'Checks if uses of quotes match the configured preference.'
349
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-string-literals'
350
+ EnforcedStyle: double_quotes
351
+ Enabled: true
352
+
353
+ Style/TrailingCommaInArguments:
354
+ Description: 'Checks for trailing comma in argument lists.'
355
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
356
+ EnforcedStyleForMultiline: comma
357
+ SupportedStylesForMultiline:
358
+ - comma
359
+ - consistent_comma
360
+ - no_comma
361
+ Enabled: true
362
+
363
+ Style/TrailingCommaInLiteral:
364
+ Description: 'Checks for trailing comma in array and hash literals.'
365
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
366
+ EnforcedStyleForMultiline: comma
367
+ SupportedStylesForMultiline:
368
+ - comma
369
+ - consistent_comma
370
+ - no_comma
371
+ Enabled: true
372
+
373
+ Style/TrivialAccessors:
374
+ Description: 'Prefer attr_* methods to trivial readers/writers.'
375
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr_family'
376
+ Enabled: false
377
+
378
+ Style/VariableInterpolation:
379
+ Description: >-
380
+ Don't interpolate global, instance and class variables
381
+ directly in strings.
382
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#curlies-interpolate'
383
+ Enabled: false
384
+
385
+ Style/WhenThen:
386
+ Description: 'Use when x then ... for one-line cases.'
387
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#one-line-cases'
388
+ Enabled: false
389
+
390
+ Style/WhileUntilModifier:
391
+ Description: >-
392
+ Favor modifier while/until usage when you have a
393
+ single-line body.
394
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier'
395
+ Enabled: false
396
+
397
+ Style/WordArray:
398
+ Description: 'Use %w or %W for arrays of words.'
399
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-w'
400
+ Enabled: false
401
+
402
+ # Layout
403
+
404
+ Layout/AlignParameters:
405
+ Description: 'Here we check if the parameters on a multi-line method call or definition are aligned.'
406
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-double-indent'
407
+ Enabled: false
408
+
409
+ Layout/DotPosition:
410
+ Description: 'Checks the position of the dot in multi-line method calls.'
411
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains'
412
+ EnforcedStyle: trailing
413
+
414
+ Layout/ExtraSpacing:
415
+ Description: 'Do not use unnecessary spacing.'
416
+ Enabled: true
417
+
418
+ Layout/MultilineOperationIndentation:
419
+ Description: >-
420
+ Checks indentation of binary operations that span more than
421
+ one line.
422
+ Enabled: true
423
+ EnforcedStyle: indented
424
+
425
+ Layout/MultilineMethodCallIndentation:
426
+ Description: >-
427
+ Checks indentation of method calls with the dot operator
428
+ that span more than one line.
429
+ Enabled: true
430
+ EnforcedStyle: indented
431
+
432
+ Layout/InitialIndentation:
433
+ Description: >-
434
+ Checks the indentation of the first non-blank non-comment line in a file.
435
+ Enabled: false
436
+
437
+ # Lint
438
+
439
+ Lint/AmbiguousOperator:
440
+ Description: >-
441
+ Checks for ambiguous operators in the first argument of a
442
+ method invocation without parentheses.
443
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-as-args'
444
+ Enabled: false
445
+
446
+ Lint/AmbiguousRegexpLiteral:
447
+ Description: >-
448
+ Checks for ambiguous regexp literals in the first argument of
449
+ a method invocation without parenthesis.
450
+ Enabled: false
451
+
452
+ Lint/AssignmentInCondition:
453
+ Description: "Don't use assignment in conditions."
454
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
455
+ Enabled: false
456
+
457
+ Lint/CircularArgumentReference:
458
+ Description: "Don't refer to the keyword argument in the default value."
459
+ Enabled: false
460
+
461
+ Lint/ConditionPosition:
462
+ Description: >-
463
+ Checks for condition placed in a confusing position relative to
464
+ the keyword.
465
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition'
466
+ Enabled: false
467
+
468
+ Lint/DeprecatedClassMethods:
469
+ Description: 'Check for deprecated class method calls.'
470
+ Enabled: false
471
+
472
+ Lint/DuplicatedKey:
473
+ Description: 'Check for duplicate keys in hash literals.'
474
+ Enabled: false
475
+
476
+ Lint/EachWithObjectArgument:
477
+ Description: 'Check for immutable argument given to each_with_object.'
478
+ Enabled: false
479
+
480
+ Lint/ElseLayout:
481
+ Description: 'Check for odd code arrangement in an else block.'
482
+ Enabled: false
483
+
484
+ Lint/FormatParameterMismatch:
485
+ Description: 'The number of parameters to format/sprint must match the fields.'
486
+ Enabled: false
487
+
488
+ Lint/HandleExceptions:
489
+ Description: "Don't suppress exception."
490
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
491
+ Enabled: false
492
+
493
+ Lint/LiteralInInterpolation:
494
+ Description: 'Checks for literals used in interpolation.'
495
+ Enabled: false
496
+
497
+ Lint/Loop:
498
+ Description: >-
499
+ Use Kernel#loop with break rather than begin/end/until or
500
+ begin/end/while for post-loop tests.
501
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#loop-with-break'
502
+ Enabled: false
503
+
504
+ Lint/NestedMethodDefinition:
505
+ Description: 'Do not use nested method definitions.'
506
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-methods'
507
+ Enabled: false
508
+
509
+ Lint/NonLocalExitFromIterator:
510
+ Description: 'Do not use return in iterator to cause non-local exit.'
511
+ Enabled: false
512
+
513
+ Lint/ParenthesesAsGroupedExpression:
514
+ Description: >-
515
+ Checks for method calls with a space before the opening
516
+ parenthesis.
517
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
518
+ Enabled: false
519
+
520
+ Lint/RequireParentheses:
521
+ Description: >-
522
+ Use parentheses in the method call to avoid confusion
523
+ about precedence.
524
+ Enabled: false
525
+
526
+ Lint/UnderscorePrefixedVariableName:
527
+ Description: 'Do not use prefix `_` for a variable that is used.'
528
+ Enabled: false
529
+
530
+ Lint/UnneededDisable:
531
+ Description: >-
532
+ Checks for rubocop:disable comments that can be removed.
533
+ Note: this cop is not disabled when disabling all cops.
534
+ It must be explicitly disabled.
535
+ Enabled: false
536
+
537
+ Lint/Void:
538
+ Description: 'Possible use of operator/literal/variable in void context.'
539
+ Enabled: false
540
+
541
+ # Performance
542
+
543
+ Performance/CaseWhenSplat:
544
+ Description: >-
545
+ Place `when` conditions that use splat at the end
546
+ of the list of `when` branches.
547
+ Enabled: false
548
+
549
+ Performance/Count:
550
+ Description: >-
551
+ Use `count` instead of `select...size`, `reject...size`,
552
+ `select...count`, `reject...count`, `select...length`,
553
+ and `reject...length`.
554
+ Enabled: false
555
+
556
+ Performance/Detect:
557
+ Description: >-
558
+ Use `detect` instead of `select.first`, `find_all.first`,
559
+ `select.last`, and `find_all.last`.
560
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code'
561
+ Enabled: false
562
+
563
+ Performance/FlatMap:
564
+ Description: >-
565
+ Use `Enumerable#flat_map`
566
+ instead of `Enumerable#map...Array#flatten(1)`
567
+ or `Enumberable#collect..Array#flatten(1)`
568
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code'
569
+ Enabled: false
570
+
571
+ Performance/ReverseEach:
572
+ Description: 'Use `reverse_each` instead of `reverse.each`.'
573
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code'
574
+ Enabled: false
575
+
576
+ Performance/Sample:
577
+ Description: >-
578
+ Use `sample` instead of `shuffle.first`,
579
+ `shuffle.last`, and `shuffle[Fixnum]`.
580
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code'
581
+ Enabled: false
582
+
583
+ Performance/Size:
584
+ Description: >-
585
+ Use `size` instead of `count` for counting
586
+ the number of elements in `Array` and `Hash`.
587
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code'
588
+ Enabled: false
589
+
590
+ Performance/StringReplacement:
591
+ Description: >-
592
+ Use `tr` instead of `gsub` when you are replacing the same
593
+ number of characters. Use `delete` instead of `gsub` when
594
+ you are deleting characters.
595
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code'
596
+ Enabled: false
597
+
598
+ # Rails
599
+
600
+ Rails/ActionFilter:
601
+ Description: 'Enforces consistent use of action filter methods.'
602
+ Enabled: false
603
+
604
+ Rails/Date:
605
+ Description: >-
606
+ Checks the correct usage of date aware methods,
607
+ such as Date.today, Date.current etc.
608
+ Enabled: false
609
+
610
+ Rails/FindBy:
611
+ Description: 'Prefer find_by over where.first.'
612
+ Enabled: false
613
+
614
+ Rails/FindEach:
615
+ Description: 'Prefer all.find_each over all.find.'
616
+ Enabled: false
617
+
618
+ Rails/HasAndBelongsToMany:
619
+ Description: 'Prefer has_many :through to has_and_belongs_to_many.'
620
+ Enabled: false
621
+
622
+ Rails/Output:
623
+ Description: 'Checks for calls to puts, print, etc.'
624
+ Enabled: false
625
+
626
+ Rails/ReadWriteAttribute:
627
+ Description: >-
628
+ Checks for read_attribute(:attr) and
629
+ write_attribute(:attr, val).
630
+ Enabled: false
631
+
632
+ Rails/ScopeArgs:
633
+ Description: 'Checks the arguments of ActiveRecord scopes.'
634
+ Enabled: false
635
+
636
+ Rails/TimeZone:
637
+ Description: 'Checks the correct usage of time zone aware methods.'
638
+ StyleGuide: 'https://github.com/bbatsov/rails-style-guide#time'
639
+ Reference: 'http://danilenko.org/2012/7/6/rails_timezones'
640
+ Enabled: false
641
+
642
+ Rails/Validation:
643
+ Description: 'Use validates :attribute, hash of validations.'
15
644
  Enabled: false