onebox 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (171) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.rubocop.yml +7 -452
  4. data/Gemfile +1 -1
  5. data/README.md +23 -45
  6. data/lib/onebox.rb +21 -13
  7. data/lib/onebox/engine.rb +53 -43
  8. data/lib/onebox/engine/amazon_onebox.rb +34 -7
  9. data/lib/onebox/engine/classic_google_maps_onebox.rb +37 -0
  10. data/lib/onebox/engine/github_blob_onebox.rb +27 -7
  11. data/lib/onebox/engine/github_commit_onebox.rb +8 -15
  12. data/lib/onebox/engine/github_gist_onebox.rb +10 -10
  13. data/lib/onebox/engine/github_pullrequest_onebox.rb +7 -15
  14. data/lib/onebox/engine/google_play_app_onebox.rb +30 -0
  15. data/lib/onebox/engine/html.rb +10 -1
  16. data/lib/onebox/engine/image_onebox.rb +13 -0
  17. data/lib/onebox/engine/stack_exchange_onebox.rb +25 -11
  18. data/lib/onebox/engine/standard_embed.rb +48 -0
  19. data/lib/onebox/engine/twitter_status_onebox.rb +100 -0
  20. data/lib/onebox/engine/whitelisted_generic_onebox.rb +223 -0
  21. data/lib/onebox/engine/wikipedia_onebox.rb +27 -5
  22. data/lib/onebox/engine/youtube_onebox.rb +22 -0
  23. data/lib/onebox/helpers.rb +24 -0
  24. data/lib/onebox/layout.rb +67 -0
  25. data/lib/onebox/layout_support.rb +16 -0
  26. data/lib/onebox/matcher.rb +6 -1
  27. data/lib/onebox/preview.rb +19 -6
  28. data/lib/onebox/version.rb +1 -1
  29. data/lib/onebox/view.rb +7 -12
  30. data/onebox.gemspec +7 -5
  31. data/spec/fixtures/amazon.response +1336 -2971
  32. data/spec/fixtures/githubblob.response +49 -921
  33. data/spec/fixtures/{android.response → googleplayapp.response} +1 -1
  34. data/spec/fixtures/stackexchange.response +1 -1889
  35. data/spec/fixtures/twitterstatus.response +3006 -0
  36. data/spec/fixtures/youtube-json.response +1 -0
  37. data/spec/fixtures/youtube.response +1625 -0
  38. data/spec/lib/onebox/engine/amazon_onebox_spec.rb +5 -20
  39. data/spec/lib/onebox/engine/classic_google_maps_onebox_spec.rb +28 -0
  40. data/spec/lib/onebox/engine/github_blob_onebox_spec.rb +6 -15
  41. data/spec/lib/onebox/engine/github_commit_onebox_spec.rb +14 -22
  42. data/spec/lib/onebox/engine/github_gist_onebox_spec.rb +6 -14
  43. data/spec/lib/onebox/engine/github_pullrequest_onebox_spec.rb +14 -26
  44. data/spec/lib/onebox/engine/google_play_app_onebox_spec.rb +28 -0
  45. data/spec/lib/onebox/engine/html_spec.rb +4 -6
  46. data/spec/lib/onebox/engine/json_spec.rb +4 -6
  47. data/spec/lib/onebox/engine/stack_exchange_onebox_spec.rb +4 -17
  48. data/spec/lib/onebox/engine/twitter_status_onebox_spec.rb +103 -0
  49. data/spec/lib/onebox/engine/whitelisted_generic_onebox_spec.rb +51 -0
  50. data/spec/lib/onebox/engine/wikipedia_onebox_spec.rb +4 -17
  51. data/spec/lib/onebox/engine/youtube_onebox_spec.rb +17 -0
  52. data/spec/lib/onebox/engine_spec.rb +35 -32
  53. data/spec/lib/onebox/layout_spec.rb +77 -0
  54. data/spec/lib/onebox/matcher_spec.rb +0 -15
  55. data/spec/lib/onebox/preview_spec.rb +39 -9
  56. data/spec/lib/onebox_spec.rb +15 -11
  57. data/spec/spec_helper.rb +60 -4
  58. data/spec/support/html_spec_helper.rb +2 -1
  59. data/templates/_layout.mustache +11 -4
  60. data/templates/amazon.mustache +4 -3
  61. data/templates/githubblob.mustache +7 -5
  62. data/templates/githubcommit.mustache +20 -11
  63. data/templates/githubpullrequest.mustache +19 -12
  64. data/templates/googleplayapp.mustache +4 -0
  65. data/templates/stackexchange.mustache +19 -3
  66. data/templates/twitterstatus.mustache +12 -0
  67. data/templates/whitelistedgeneric.mustache +5 -0
  68. data/templates/wikipedia.mustache +4 -3
  69. metadata +57 -166
  70. data/lib/onebox/engine/bliptv_onebox.rb +0 -28
  71. data/lib/onebox/engine/clikthrough_onebox.rb +0 -25
  72. data/lib/onebox/engine/college_humor_onebox.rb +0 -27
  73. data/lib/onebox/engine/dailymotion_onebox.rb +0 -28
  74. data/lib/onebox/engine/dotsub_onebox.rb +0 -27
  75. data/lib/onebox/engine/example_onebox.rb +0 -24
  76. data/lib/onebox/engine/flickr_onebox.rb +0 -26
  77. data/lib/onebox/engine/funny_or_die_onebox.rb +0 -28
  78. data/lib/onebox/engine/hulu_onebox.rb +0 -29
  79. data/lib/onebox/engine/imgur_image_onebox.rb +0 -26
  80. data/lib/onebox/engine/itunes_onebox.rb +0 -28
  81. data/lib/onebox/engine/kinomap_onebox.rb +0 -27
  82. data/lib/onebox/engine/nfb_onebox.rb +0 -28
  83. data/lib/onebox/engine/open_graph.rb +0 -11
  84. data/lib/onebox/engine/qik_onebox.rb +0 -25
  85. data/lib/onebox/engine/revision3_onebox.rb +0 -27
  86. data/lib/onebox/engine/slideshare_onebox.rb +0 -27
  87. data/lib/onebox/engine/sound_cloud_onebox.rb +0 -27
  88. data/lib/onebox/engine/spotify_onebox.rb +0 -27
  89. data/lib/onebox/engine/ted_onebox.rb +0 -28
  90. data/lib/onebox/engine/twitter_onebox.rb +0 -31
  91. data/lib/onebox/engine/viddler_onebox.rb +0 -28
  92. data/lib/onebox/engine/vimeo_onebox.rb +0 -27
  93. data/lib/onebox/engine/yfrog_onebox.rb +0 -28
  94. data/spec/fixtures/bliptv.response +0 -724
  95. data/spec/fixtures/clikthrough.response +0 -1472
  96. data/spec/fixtures/collegehumor.response +0 -1272
  97. data/spec/fixtures/dailymotion.response +0 -575
  98. data/spec/fixtures/dotsub.response +0 -1257
  99. data/spec/fixtures/example.response +0 -50
  100. data/spec/fixtures/flickr.response +0 -1292
  101. data/spec/fixtures/funnyordie.response +0 -2010
  102. data/spec/fixtures/githubgist.response +0 -468
  103. data/spec/fixtures/hulu.response +0 -339
  104. data/spec/fixtures/imguralbum.response +0 -941
  105. data/spec/fixtures/imgurimage.response +0 -872
  106. data/spec/fixtures/itunes.response +0 -402
  107. data/spec/fixtures/kinomap.response +0 -299
  108. data/spec/fixtures/nfb.response +0 -810
  109. data/spec/fixtures/opengraph.response +0 -27
  110. data/spec/fixtures/qik.response +0 -371
  111. data/spec/fixtures/revision3.response +0 -985
  112. data/spec/fixtures/rottentomatoesfresh.response +0 -3275
  113. data/spec/fixtures/rottentomatoesincomplete.response +0 -2313
  114. data/spec/fixtures/rottentomatoesrotten.response +0 -3549
  115. data/spec/fixtures/slideshare.response +0 -1745
  116. data/spec/fixtures/soundcloud.response +0 -1409
  117. data/spec/fixtures/spotify.response +0 -250
  118. data/spec/fixtures/ted.response +0 -1341
  119. data/spec/fixtures/twitter.response +0 -1712
  120. data/spec/fixtures/viddler.response +0 -442
  121. data/spec/fixtures/vimeo.response +0 -571
  122. data/spec/fixtures/yfrog.response +0 -464
  123. data/spec/lib/onebox/engine/bliptv_onebox_spec.rb +0 -37
  124. data/spec/lib/onebox/engine/clikthrough_onebox_spec.rb +0 -29
  125. data/spec/lib/onebox/engine/college_humor_onebox_spec.rb +0 -37
  126. data/spec/lib/onebox/engine/dailymotion_onebox_spec.rb +0 -39
  127. data/spec/lib/onebox/engine/dotsub_onebox_spec.rb +0 -39
  128. data/spec/lib/onebox/engine/example_onebox_spec.rb +0 -21
  129. data/spec/lib/onebox/engine/flickr_onebox_spec.rb +0 -33
  130. data/spec/lib/onebox/engine/funny_or_die_onebox_spec.rb +0 -37
  131. data/spec/lib/onebox/engine/hulu_onebox_spec.rb +0 -37
  132. data/spec/lib/onebox/engine/imgur_image_onebox_spec.rb +0 -29
  133. data/spec/lib/onebox/engine/itunes_onebox_spec.rb +0 -29
  134. data/spec/lib/onebox/engine/kinomap_onebox_spec.rb +0 -37
  135. data/spec/lib/onebox/engine/nfb_onebox_spec.rb +0 -38
  136. data/spec/lib/onebox/engine/open_graph_spec.rb +0 -27
  137. data/spec/lib/onebox/engine/qik_onebox_spec.rb +0 -38
  138. data/spec/lib/onebox/engine/revision3_onebox_spec.rb +0 -39
  139. data/spec/lib/onebox/engine/slideshare_onebox_spec.rb +0 -33
  140. data/spec/lib/onebox/engine/sound_cloud_onebox_spec.rb +0 -39
  141. data/spec/lib/onebox/engine/spotify_onebox_spec.rb +0 -36
  142. data/spec/lib/onebox/engine/ted_onebox_spec.rb +0 -33
  143. data/spec/lib/onebox/engine/twitter_onebox_spec.rb +0 -47
  144. data/spec/lib/onebox/engine/viddler_onebox_spec.rb +0 -39
  145. data/spec/lib/onebox/engine/vimeo_onebox_spec.rb +0 -37
  146. data/spec/lib/onebox/engine/yfrog_onebox_spec.rb +0 -33
  147. data/spec/lib/onebox/view_spec.rb +0 -16
  148. data/templates/bliptv.mustache +0 -5
  149. data/templates/clikthrough.mustache +0 -4
  150. data/templates/collegehumor.mustache +0 -5
  151. data/templates/dailymotion.mustache +0 -5
  152. data/templates/dotsub.mustache +0 -5
  153. data/templates/example.mustache +0 -2
  154. data/templates/flickr.mustache +0 -4
  155. data/templates/funnyordie.mustache +0 -6
  156. data/templates/githubgist.mustache +0 -3
  157. data/templates/hulu.mustache +0 -6
  158. data/templates/imgurimage.mustache +0 -3
  159. data/templates/itunes.mustache +0 -4
  160. data/templates/kinomap.mustache +0 -5
  161. data/templates/nfb.mustache +0 -5
  162. data/templates/qik.mustache +0 -4
  163. data/templates/revision3.mustache +0 -5
  164. data/templates/slideshare.mustache +0 -4
  165. data/templates/soundcloud.mustache +0 -5
  166. data/templates/spotify.mustache +0 -4
  167. data/templates/ted.mustache +0 -5
  168. data/templates/twitter.mustache +0 -7
  169. data/templates/viddler.mustache +0 -5
  170. data/templates/vimeo.mustache +0 -5
  171. data/templates/yfrog.mustache +0 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 63d6aa188d0386a68d9d81be75ae88c844bfcf25
4
- data.tar.gz: 705d8c65d0578efc9bb5c21bffcf47183c1d0d87
3
+ metadata.gz: 888991c0d98fd255f0e123084956661cfe16550c
4
+ data.tar.gz: 7de707a9ff4443abfceecf1b6046bcc34af675c1
5
5
  SHA512:
6
- metadata.gz: 8518dc4c517c676a6afef5c61fb19bb2b249fce47883997ce1420cf75973cf67f75fe143c5c223f762beb3aced6955201eaeff8b5e1484442b634e8692b8b4e4
7
- data.tar.gz: 73286c370651b4dad2721246d044b14ac9f3ab52c5ef1c6855ffdf92a530c4dd8c493061222494f1c902d3c9d258cf2e4331e649fdcf5a94f932953f797cfacb
6
+ metadata.gz: 838ffafee83459b702e30a2f603b69a46b744ef462f4452fabaca1775fdd7cad437a437a70af44d83e4e5acfaedf82af724801ed1ad27679c6c86e2d77045dd1
7
+ data.tar.gz: 3960704c47e5db13667aa35af74bba172f8e23d4a54b707d842eab7944c535cb146ec235a90c7bf7a4582cd7f4c7babd17a9fc9bf749d12c0f5db1a8866fa606
data/.gitignore CHANGED
@@ -15,3 +15,4 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
+ *.swp
data/.rubocop.yml CHANGED
@@ -5,9 +5,9 @@ AllCops:
5
5
  - '**/Rakefile'
6
6
  Excludes: []
7
7
 
8
- # Use UTF-8 as the source file encoding.
9
- Encoding:
10
- Enabled: true
8
+ # Prefer ' strings when you don't need string interpolation or special symbols.
9
+ StringLiterals:
10
+ Enabled: false
11
11
 
12
12
  # Limit lines to 79 characters.
13
13
  LineLength:
@@ -20,457 +20,12 @@ MethodLength:
20
20
  CountComments: false # count full line comments?
21
21
  Max: 10
22
22
 
23
- # No hard tabs.
24
- Tab:
25
- Enabled: true
26
-
27
- # Avoid trailing whitespace.
28
- TrailingWhitespace:
29
- Enabled: true
30
-
31
- # Indent when as deep as case.
32
- CaseIndentation:
33
- Enabled: true
34
-
35
- # Use empty lines between defs.
36
- EmptyLineBetweenDefs:
37
- Enabled: true
38
-
39
- # Don't use several empty lines in a row.
40
- EmptyLines:
41
- Enabled: true
42
-
43
- # Use spaces around operators.
44
- SpaceAroundOperators:
45
- Enabled: true
46
-
47
- # Use spaces around { and before }.
48
- SpaceAroundBraces:
49
- Enabled: true
50
-
51
- # No spaces after ( or before ).
52
- SpaceInsideParens:
53
- Enabled: true
54
-
55
- # No spaces after [ or before ].
56
- SpaceInsideBrackets:
57
- Enabled: true
58
-
59
- # Use spaces after commas.
60
- SpaceAfterComma:
61
- Enabled: true
62
-
63
- # Use spaces after semicolons.
64
- SpaceAfterSemicolon:
65
- Enabled: true
66
-
67
- # Use spaces after colons.
68
- SpaceAfterColon:
69
- Enabled: true
70
-
71
- # Use spaces after if/elsif/unless/while/until/case/when.
72
- SpaceAfterControlKeyword:
73
- Enabled: true
74
-
75
- # Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax
76
- # { :a => 1, :b => 2 }.
77
- HashSyntax:
78
- Enabled: true
79
-
80
- # Use Unix-style line endings.
81
- EndOfLine:
82
- Enabled: true
83
-
84
- # Add underscores to large numeric literals to improve their readability.
85
- NumericLiterals:
86
- Enabled: true
87
-
88
- # Align the parameters of a method call if they span more than one line.
89
- AlignParameters:
90
- Enabled: true
91
-
92
- # Use def with parentheses when there are arguments.
93
- DefWithParentheses:
94
- Enabled: true
95
-
96
- # Omit the parentheses when the method doesn't accept any arguments.
97
- DefWithoutParentheses:
98
- Enabled: true
99
-
100
- # Never use if x; .... Use the ternary operator instead.
101
- IfWithSemicolon:
102
- Enabled: true
103
-
104
- # Never use then for multi-line if/unless.
105
- MultilineIfThen:
106
- Enabled: true
107
-
108
- # Favor the ternary operator(?:) over if/then/else/end constructs.
109
- OneLineConditional:
110
- Enabled: true
111
-
112
- # Avoid using {...} for multi-line blocks (multiline chaining is always ugly).
113
- # Prefer {...} over do...end for single-line blocks.
114
- Blocks:
115
- Enabled: true
116
-
117
- # Avoid parameter lists longer than three or four parameters.
118
- ParameterLists:
119
- Enabled: true
120
- Max: 5
121
- CountKeywordArgs: true
122
-
123
-
124
- # Prefer ' strings when you don't need string interpolation or special symbols.
125
- StringLiterals:
126
- Enabled: false
127
-
128
- # Avoid multi-line ?: (the ternary operator); use if/unless instead.
129
- MultilineTernaryOperator:
130
- Enabled: true
131
-
132
- # Use one expression per branch in a ternary operator.
133
- NestedTernaryOperator:
134
- Enabled: true
135
-
136
- # Never use unless with else. Rewrite these with the positive case first.
137
- UnlessElse:
138
- Enabled: true
139
-
140
- # Use &&/|| instead of and/or.
141
- AndOr:
142
- Enabled: true
143
-
144
- # Use when x then ... for one-line cases.
145
- WhenThen:
146
- Enabled: true
147
-
148
- # Favor modifier if/unless usage when you have a single-line body.
149
- IfUnlessModifier:
150
- Enabled: true
151
-
152
- # Favor modifier while/until usage when you have a single-line body.
153
- WhileUntilModifier:
154
- Enabled: true
155
-
156
- # Favor unless over if for negative conditions (or control flow or).
157
- FavorUnlessOverNegatedIf:
158
- Enabled: true
159
-
160
- # Favor until over while for negative conditions.
161
- FavorUntilOverNegatedWhile:
162
- Enabled: true
163
-
164
- # Use spaces around the = operator when assigning default values in def params.
165
- SpaceAroundEqualsInParameterDefault:
166
- Enabled: false
167
-
168
- # Use the new lambda literal syntax for single-line blocks.
169
- Lambda:
170
- Enabled: true
171
-
172
- # Use proc instead of Proc.new.
173
- Proc:
174
- Enabled: true
175
-
176
- # Don't use parentheses around the condition of an if/unless/while.
177
- ParenthesesAroundCondition:
178
- Enabled: true
179
- AllowSafeAssignment: true
180
-
181
- # Use snake_case for symbols, methods and variables.
182
- MethodAndVariableSnakeCase:
183
- Enabled: true
184
-
185
- # Use CamelCase for classes and modules.
186
- ClassAndModuleCamelCase:
187
- Enabled: true
188
-
189
- # Preferred collection methods.
190
- CollectionMethods:
191
- Enabled: true
192
- PreferredMethods:
193
- collect: 'map'
194
- inject: 'reduce'
195
- detect: 'find'
196
- find_all: 'select'
197
-
198
- # Prefer each over for.
199
- AvoidFor:
200
- Enabled: true
201
-
202
- # Avoid Perl-style global variables.
203
- AvoidPerlisms:
204
- Enabled: true
205
-
206
- # Avoid Perl-style regex back references.
207
- AvoidPerlBackrefs:
208
- Enabled: true
209
-
210
- # Avoid the use of class variables.
211
- AvoidClassVars:
212
- Enabled: true
213
-
214
- # Don't interpolate global, instance and class variables directly in strings.
215
- VariableInterpolation:
216
- Enabled: true
217
-
218
- # Don't use semicolons to terminate expressions.
219
- Semicolon:
220
- Enabled: true
221
- # For example; def area(height, width); height * width end
222
- AllowAfterParameterListInOneLineMethods: false
223
- # For example; def area(height, width) height * width; end
224
- AllowBeforeEndInOneLineMethods: true
225
-
226
- # Use sprintf instead of String#%.
227
- FavorSprintf:
228
- Enabled: true
229
-
230
- # Use Array#join instead of Array#*.
231
- FavorJoin:
232
- Enabled: true
233
-
234
- # Use alias_method instead of alias.
235
- Alias:
236
- Enabled: true
237
-
238
- # Use ! instead of not.
239
- Not:
240
- Enabled: true
241
-
242
- # Avoid using rescue in its modifier form.
243
- RescueModifier:
244
- Enabled: true
245
-
246
- # Never use return in an ensure block.
247
- EnsureReturn:
248
- Enabled: true
249
-
250
- # Don't suppress exception.
251
- HandleExceptions:
252
- Enabled: true
253
-
254
- # Use only ascii symbols in identifiers.
255
- AsciiIdentifiers:
256
- Enabled: true
257
-
258
- # Use only ascii symbols in comments.
259
- AsciiComments:
260
- Enabled: true
261
-
262
- # Do not use block comments.
263
- BlockComments:
264
- Enabled: true
265
-
266
- # Avoid rescuing the Exception class.
267
- RescueException:
268
- Enabled: true
269
-
270
- # Prefer literals to Array.new/Hash.new/String.new.
271
- EmptyLiteral:
272
- Enabled: true
273
-
274
- # When defining binary operators, name the argument other.
275
- OpMethod:
276
- Enabled: true
277
-
278
- # Name reduce arguments |a, e| (accumulator, element)
279
- ReduceArguments:
280
- Enabled: true
281
-
282
- # Use %r for regular expressions matching more than `MaxSlashes` '/'
283
- # characters.
284
- # Use %r only for regular expressions matching more than `MaxSlashes` '/'
285
- # character.
286
- RegexpLiteral:
287
- Enabled: true
288
- MaxSlashes: 1
289
-
290
- # Use self when defining module/class methods.
291
- ClassMethods:
292
- Enabled: true
293
-
294
- # Avoid single-line methods.
295
- SingleLineMethods:
296
- Enabled: true
297
- AllowIfMethodIsEmpty: true
298
-
299
- # Use %w or %W for arrays of words.
300
- WordArray:
301
- Enabled: true
302
-
303
- # Use spaces inside hash literal braces - or don't.
304
- SpaceInsideHashLiteralBraces:
305
- Enabled: true
306
- EnforcedStyleIsWithSpaces: true
307
-
308
- # Avoid the use of line continuation (/).
309
- LineContinuation:
310
- Enabled: true
311
-
312
- # Prefer attr_* methods to trivial readers/writers.
313
- # TrivialAccessors doesn't require exact name matches and doesn't allow
314
- # predicated methods by default.
315
- TrivialAccessors:
316
- Enabled: true
317
- ExactNameMatch: true # this is not the best way, but currently rubocop does not support something better https://github.com/bbatsov/rubocop/issues/421
318
- AllowPredicates: false
319
-
320
- # Comments should start with a space.
321
- LeadingCommentSpace:
322
- Enabled: true
323
-
324
- # Do not use :: for method call.
325
- ColonMethodCall:
326
- Enabled: true
327
-
328
- # Do not introduce global variables.
329
- AvoidGlobalVars:
330
- Enabled: true
331
-
332
- # The use of eval represents a serious security risk.
333
- Eval:
334
- Enabled: true
335
-
336
- # Symbol literals should use snake_case.
337
- SymbolName:
338
- Enabled: true
339
- AllowCamelCase: false
340
-
341
-
342
- # Constants should use SCREAMING_SNAKE_CASE.
343
- ConstantName:
344
- Enabled: true
345
-
346
- # Indent private/protected as deep as defs and keep blank lines around them.
347
- AccessControl:
348
- Enabled: true
349
-
350
- # Use Kernel#loop with break rather than begin/end/until or begin/end/while for
351
- # post-loop tests.
352
- Loop:
353
- Enabled: true
354
-
355
- # Avoid excessive block nesting
356
- BlockNesting:
357
- Enabled: true
358
- Max: 3
359
-
360
- # Avoid explicit use of the case equality operator(===).
361
- CaseEquality:
362
- Enabled: true
363
-
364
23
  # Document classes and non-namespace modules.
365
24
  Documentation:
366
25
  Enabled: false
367
26
 
368
- # Do not use parentheses for method calls with no arguments.
369
- MethodCallParentheses:
370
- Enabled: true
371
-
372
- # Checks for redundant do after while or until.
373
- WhileUntilDo:
374
- Enabled: true
375
-
376
- # Checks for uses of character literals.
377
- CharacterLiteral:
378
- Enabled: true
379
-
380
- # Avoid the use of BEGIN blocks.
381
- BeginBlock:
382
- Enabled: true
383
-
384
- # Avoid the use of END blocks.
385
- EndBlock:
386
- Enabled: true
387
-
388
- # Don't use return where it's not required.
389
- RedundantReturn:
390
- Enabled: true
391
-
392
- # Don't use begin blocks when they are not needed.
393
- RedundantBegin:
394
- Enabled: true
395
-
396
- # Don't use self where it's not needed.
397
- RedundantSelf:
398
- Enabled: true
399
-
400
- # Checks the position of the dot in multi-line method calls.
401
- DotPosition:
402
- Enabled: true
403
- Style: 'leading'
404
-
405
- # Checks for uses of Module#attr.
406
- Attr:
407
- Enabled: true
408
-
409
- #################### Lint ################################
410
-
411
- # Don't use assignment in conditions.
412
- AssignmentInCondition:
413
- Enabled: true
414
- AllowSafeAssignment: true
415
-
416
-
417
- # Align ends correctly.
418
- EndAlignment:
419
- Enabled: true
420
-
421
- # Align block ends correctly.
422
- BlockAlignment:
423
- Enabled: true
424
-
425
- # Possible use of operator/literal/variable in void context.
426
- Void:
427
- Enabled: true
428
-
429
- # Unreachable code.
430
- UnreachableCode:
431
- Enabled: true
432
-
433
- # Unused local variable.
434
- UnusedLocalVariable:
435
- Enabled: true
436
-
437
- # Do not use the same name as outer local variable
438
- # for block arguments or block local variables.
439
- ShadowingOuterLocalVariable:
440
- Enabled: true
441
-
442
- # END blocks should not be placed inside method definitions.
443
- EndInMethod:
444
- Enabled: true
445
-
446
- # Checks of literals used in conditions.
447
- LiteralInCondition:
448
- Enabled: true
449
-
450
- # Checks for empty ensure block.
451
- EmptyEnsure:
452
- Enabled: true
453
-
454
- # Checks formatting of special comments (TODO, FIXME, OPTIMIZE, HACK, REVIEW).
455
- CommentAnnotation:
456
- Enabled: true
457
- Keywords:
458
- - TODO
459
- - FIXME
460
- - OPTIMIZE
461
- - HACK
462
- - REVIEW
463
-
464
- # Checks for useless assignment to a local variable.
465
- UselessAssignment:
466
- Enabled: true
467
-
468
- # Checks for comparison of something with itself.
469
- UselessComparison:
470
- Enabled: true
471
-
472
- ##################### Rails ##################################
27
+ CaseEquality:
28
+ Enabled: false
473
29
 
474
- # Use sexy validations.
475
- Validation:
476
- Enabled: true
30
+ ClassVars:
31
+ Enabled: false