tainted_love 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (203) hide show
  1. checksums.yaml +7 -0
  2. data/.github/probots.yml +2 -0
  3. data/.gitignore +12 -0
  4. data/.rspec +3 -0
  5. data/.rubocop.yml +1188 -0
  6. data/.ruby-version +1 -0
  7. data/.travis.yml +7 -0
  8. data/CODE_OF_CONDUCT.md +73 -0
  9. data/Gemfile +8 -0
  10. data/Gemfile.lock +57 -0
  11. data/LICENSE.txt +21 -0
  12. data/README.md +85 -0
  13. data/Rakefile +8 -0
  14. data/bin/console +15 -0
  15. data/bin/setup +10 -0
  16. data/bin/test +7 -0
  17. data/dev.yml +28 -0
  18. data/docs/TaintedLove.html +482 -0
  19. data/docs/TaintedLove/Configuration.html +499 -0
  20. data/docs/TaintedLove/Replacer.html +129 -0
  21. data/docs/TaintedLove/Replacer/ActionViewHelpersMod.html +230 -0
  22. data/docs/TaintedLove/Replacer/Base.html +320 -0
  23. data/docs/TaintedLove/Replacer/HelperMod.html +226 -0
  24. data/docs/TaintedLove/Replacer/HelpersMod.html +230 -0
  25. data/docs/TaintedLove/Replacer/MarshalMod.html +178 -0
  26. data/docs/TaintedLove/Replacer/ObjectMod.html +282 -0
  27. data/docs/TaintedLove/Replacer/ReplaceActionController.html +329 -0
  28. data/docs/TaintedLove/Replacer/ReplaceActionView.html +317 -0
  29. data/docs/TaintedLove/Replacer/ReplaceActiveRecord.html +341 -0
  30. data/docs/TaintedLove/Replacer/ReplaceDigest.html +369 -0
  31. data/docs/TaintedLove/Replacer/ReplaceFile.html +245 -0
  32. data/docs/TaintedLove/Replacer/ReplaceKernel.html +211 -0
  33. data/docs/TaintedLove/Replacer/ReplaceMarshal.html +219 -0
  34. data/docs/TaintedLove/Replacer/ReplaceObject.html +231 -0
  35. data/docs/TaintedLove/Replacer/ReplaceRailsUserInput.html +374 -0
  36. data/docs/TaintedLove/Replacer/ReplaceSprokets.html +297 -0
  37. data/docs/TaintedLove/Replacer/SprocketsHelperMod.html +226 -0
  38. data/docs/TaintedLove/Reporter.html +117 -0
  39. data/docs/TaintedLove/Reporter/Base.html +466 -0
  40. data/docs/TaintedLove/Reporter/RackReporter.html +309 -0
  41. data/docs/TaintedLove/Reporter/SinatraReporter.html +402 -0
  42. data/docs/TaintedLove/Reporter/SinatraReporter/App.html +210 -0
  43. data/docs/TaintedLove/Reporter/StdoutReporter.html +305 -0
  44. data/docs/TaintedLove/SinatraReporter.html +387 -0
  45. data/docs/TaintedLove/SinatraReporter/App.html +210 -0
  46. data/docs/TaintedLove/StackTrace.html +650 -0
  47. data/docs/TaintedLove/Utils.html +550 -0
  48. data/docs/TaintedLove/Validator.html +129 -0
  49. data/docs/TaintedLove/Validator/ActionViewObjectSend.html +233 -0
  50. data/docs/TaintedLove/Validator/Base.html +200 -0
  51. data/docs/TaintedLove/Validator/ErbEval.html +229 -0
  52. data/docs/TaintedLove/Validator/RedisStoreSerialization.html +238 -0
  53. data/docs/TaintedLove/Validator/SproketsMarshal.html +233 -0
  54. data/docs/TaintedLove/Warning.html +665 -0
  55. data/docs/_index.html +371 -0
  56. data/docs/class_list.html +51 -0
  57. data/docs/css/common.css +1 -0
  58. data/docs/css/full_list.css +58 -0
  59. data/docs/css/style.css +496 -0
  60. data/docs/file.README.html +134 -0
  61. data/docs/file_list.html +56 -0
  62. data/docs/frames.html +17 -0
  63. data/docs/index.html +134 -0
  64. data/docs/js/app.js +292 -0
  65. data/docs/js/full_list.js +216 -0
  66. data/docs/js/jquery.js +4 -0
  67. data/docs/method_list.html +523 -0
  68. data/docs/top-level-namespace.html +110 -0
  69. data/example/.gitignore +31 -0
  70. data/example/.ruby-version +1 -0
  71. data/example/Gemfile +67 -0
  72. data/example/Gemfile.lock +226 -0
  73. data/example/README.md +24 -0
  74. data/example/Rakefile +8 -0
  75. data/example/app/assets/config/manifest.js +3 -0
  76. data/example/app/assets/images/.keep +0 -0
  77. data/example/app/assets/javascripts/application.js +16 -0
  78. data/example/app/assets/javascripts/cable.js +13 -0
  79. data/example/app/assets/javascripts/channels/.keep +0 -0
  80. data/example/app/assets/javascripts/products.coffee +3 -0
  81. data/example/app/assets/stylesheets/application.css +15 -0
  82. data/example/app/assets/stylesheets/products.scss +3 -0
  83. data/example/app/assets/stylesheets/scaffolds.scss +84 -0
  84. data/example/app/channels/application_cable/channel.rb +6 -0
  85. data/example/app/channels/application_cable/connection.rb +6 -0
  86. data/example/app/controllers/application_controller.rb +4 -0
  87. data/example/app/controllers/concerns/.keep +0 -0
  88. data/example/app/controllers/products_controller.rb +77 -0
  89. data/example/app/controllers/test_cases_controller.rb +20 -0
  90. data/example/app/helpers/application_helper.rb +4 -0
  91. data/example/app/helpers/products_helper.rb +4 -0
  92. data/example/app/helpers/test_cases_helper.rb +4 -0
  93. data/example/app/jobs/application_job.rb +4 -0
  94. data/example/app/mailers/application_mailer.rb +6 -0
  95. data/example/app/models/application_record.rb +5 -0
  96. data/example/app/models/concerns/.keep +0 -0
  97. data/example/app/models/product.rb +4 -0
  98. data/example/app/views/layouts/application.html.erb +15 -0
  99. data/example/app/views/layouts/mailer.html.erb +13 -0
  100. data/example/app/views/layouts/mailer.text.erb +1 -0
  101. data/example/app/views/products/_form.html.erb +32 -0
  102. data/example/app/views/products/_product.json.jbuilder +4 -0
  103. data/example/app/views/products/edit.html.erb +6 -0
  104. data/example/app/views/products/index.html.erb +31 -0
  105. data/example/app/views/products/index.json.jbuilder +3 -0
  106. data/example/app/views/products/new.html.erb +5 -0
  107. data/example/app/views/products/show.html.erb +19 -0
  108. data/example/app/views/products/show.json.jbuilder +3 -0
  109. data/example/app/views/test_cases/xss.html.erb +10 -0
  110. data/example/bin/bundle +5 -0
  111. data/example/bin/rails +11 -0
  112. data/example/bin/rake +11 -0
  113. data/example/bin/setup +38 -0
  114. data/example/bin/spring +18 -0
  115. data/example/bin/update +33 -0
  116. data/example/bin/yarn +11 -0
  117. data/example/config.ru +7 -0
  118. data/example/config/application.rb +21 -0
  119. data/example/config/boot.rb +6 -0
  120. data/example/config/cable.yml +10 -0
  121. data/example/config/credentials.yml.enc +1 -0
  122. data/example/config/database.yml +25 -0
  123. data/example/config/environment.rb +7 -0
  124. data/example/config/environments/development.rb +63 -0
  125. data/example/config/environments/production.rb +96 -0
  126. data/example/config/environments/test.rb +48 -0
  127. data/example/config/initializers/application_controller_renderer.rb +10 -0
  128. data/example/config/initializers/assets.rb +16 -0
  129. data/example/config/initializers/backtrace_silencers.rb +9 -0
  130. data/example/config/initializers/content_security_policy.rb +27 -0
  131. data/example/config/initializers/cookies_serializer.rb +7 -0
  132. data/example/config/initializers/filter_parameter_logging.rb +6 -0
  133. data/example/config/initializers/inflections.rb +18 -0
  134. data/example/config/initializers/mime_types.rb +6 -0
  135. data/example/config/initializers/tainted_love.rb +7 -0
  136. data/example/config/initializers/wrap_parameters.rb +16 -0
  137. data/example/config/locales/en.yml +33 -0
  138. data/example/config/puma.rb +36 -0
  139. data/example/config/routes.rb +10 -0
  140. data/example/config/spring.rb +8 -0
  141. data/example/config/storage.yml +34 -0
  142. data/example/db/migrate/20190311220346_create_products.rb +13 -0
  143. data/example/db/schema.rb +23 -0
  144. data/example/db/seeds.rb +9 -0
  145. data/example/lib/assets/.keep +0 -0
  146. data/example/lib/tasks/.keep +0 -0
  147. data/example/log/.keep +0 -0
  148. data/example/package.json +5 -0
  149. data/example/public/404.html +67 -0
  150. data/example/public/422.html +67 -0
  151. data/example/public/500.html +66 -0
  152. data/example/public/apple-touch-icon-precomposed.png +0 -0
  153. data/example/public/apple-touch-icon.png +0 -0
  154. data/example/public/favicon.ico +0 -0
  155. data/example/public/robots.txt +1 -0
  156. data/example/storage/.keep +0 -0
  157. data/example/test/application_system_test_case.rb +7 -0
  158. data/example/test/controllers/.keep +0 -0
  159. data/example/test/controllers/products_controller_test.rb +66 -0
  160. data/example/test/controllers/test_cases_controller_test.rb +39 -0
  161. data/example/test/fixtures/.keep +0 -0
  162. data/example/test/fixtures/files/.keep +0 -0
  163. data/example/test/fixtures/products.yml +11 -0
  164. data/example/test/helpers/.keep +0 -0
  165. data/example/test/integration/.keep +0 -0
  166. data/example/test/mailers/.keep +0 -0
  167. data/example/test/models/.keep +0 -0
  168. data/example/test/models/product_test.rb +9 -0
  169. data/example/test/replacers/replace_active_record_test.rb +31 -0
  170. data/example/test/replacers/replace_sprokets_test.rb +8 -0
  171. data/example/test/system/.keep +0 -0
  172. data/example/test/system/products_test.rb +49 -0
  173. data/example/test/test_helper.rb +37 -0
  174. data/example/tmp/.keep +0 -0
  175. data/example/vendor/.keep +0 -0
  176. data/lib/tainted_love.rb +57 -0
  177. data/lib/tainted_love/configuration.rb +16 -0
  178. data/lib/tainted_love/replacer/base.rb +25 -0
  179. data/lib/tainted_love/replacer/replace_action_controller.rb +61 -0
  180. data/lib/tainted_love/replacer/replace_action_view.rb +39 -0
  181. data/lib/tainted_love/replacer/replace_active_record.rb +47 -0
  182. data/lib/tainted_love/replacer/replace_digest.rb +39 -0
  183. data/lib/tainted_love/replacer/replace_file.rb +32 -0
  184. data/lib/tainted_love/replacer/replace_kernel.rb +44 -0
  185. data/lib/tainted_love/replacer/replace_marshal.rb +19 -0
  186. data/lib/tainted_love/replacer/replace_object.rb +30 -0
  187. data/lib/tainted_love/replacer/replace_rails_user_input.rb +59 -0
  188. data/lib/tainted_love/replacer/replace_sprokets.rb +25 -0
  189. data/lib/tainted_love/replacer/replace_yaml.rb +28 -0
  190. data/lib/tainted_love/reporter/base.rb +47 -0
  191. data/lib/tainted_love/reporter/file_reporter.rb +28 -0
  192. data/lib/tainted_love/reporter/stdout_reporter.rb +30 -0
  193. data/lib/tainted_love/stack_trace.rb +46 -0
  194. data/lib/tainted_love/utils.rb +80 -0
  195. data/lib/tainted_love/validator/action_view_object_send.rb +15 -0
  196. data/lib/tainted_love/validator/base.rb +16 -0
  197. data/lib/tainted_love/validator/erb_eval.rb +13 -0
  198. data/lib/tainted_love/validator/redis_store_serialization.rb +13 -0
  199. data/lib/tainted_love/validator/sprokets_marshal.rb +15 -0
  200. data/lib/tainted_love/version.rb +5 -0
  201. data/lib/tainted_love/warning.rb +30 -0
  202. data/tainted_love.gemspec +31 -0
  203. metadata +315 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: d0d4b253cbb40cf8c1c658682f4c9a9a8695a4a1b1d1b61d62124abc181e9d12
4
+ data.tar.gz: ead923b6e9b2e8fb89121cca2dc6af2c6d1211973ca2718ecd190ded5d72e815
5
+ SHA512:
6
+ metadata.gz: 34b5745138153509199f446220de3e3a398d5c342af104c2a0e6e8ef9ee35bbda9efbdccb60c8c05ec0fbeadc723213a23e8d68f77773004c8ef07ff1122c80d
7
+ data.tar.gz: 3d821a663b21ca2e3c9071a8df1b76f2958def79565bd4025c3523ad7d8aab0386298913688b729d6767faf7a475834207aa117dc5a66336f16a68f595f22e16
@@ -0,0 +1,2 @@
1
+ enabled:
2
+ - cla
data/.gitignore ADDED
@@ -0,0 +1,12 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
12
+ notes.org
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,1188 @@
1
+ AllCops:
2
+ Exclude:
3
+ - 'example/db/schema.rb'
4
+ DisabledByDefault: true
5
+ StyleGuideBaseURL: https://shopify.github.io/ruby-style-guide/
6
+
7
+ Lint/AssignmentInCondition:
8
+ Enabled: true
9
+
10
+ Layout/AccessModifierIndentation:
11
+ EnforcedStyle: indent
12
+ SupportedStyles:
13
+ - outdent
14
+ - indent
15
+ IndentationWidth:
16
+
17
+ Style/Alias:
18
+ EnforcedStyle: prefer_alias_method
19
+ SupportedStyles:
20
+ - prefer_alias
21
+ - prefer_alias_method
22
+
23
+ Layout/AlignHash:
24
+ EnforcedHashRocketStyle: key
25
+ EnforcedColonStyle: key
26
+ EnforcedLastArgumentHashStyle: ignore_implicit
27
+ SupportedLastArgumentHashStyles:
28
+ - always_inspect
29
+ - always_ignore
30
+ - ignore_implicit
31
+ - ignore_explicit
32
+
33
+ Layout/AlignParameters:
34
+ EnforcedStyle: with_fixed_indentation
35
+ SupportedStyles:
36
+ - with_first_parameter
37
+ - with_fixed_indentation
38
+ IndentationWidth:
39
+
40
+ Style/AndOr:
41
+ EnforcedStyle: always
42
+ SupportedStyles:
43
+ - always
44
+ - conditionals
45
+
46
+ Style/BarePercentLiterals:
47
+ EnforcedStyle: bare_percent
48
+ SupportedStyles:
49
+ - percent_q
50
+ - bare_percent
51
+
52
+ Style/BlockDelimiters:
53
+ EnforcedStyle: line_count_based
54
+ SupportedStyles:
55
+ - line_count_based
56
+ - semantic
57
+ - braces_for_chaining
58
+ ProceduralMethods:
59
+ - benchmark
60
+ - bm
61
+ - bmbm
62
+ - create
63
+ - each_with_object
64
+ - measure
65
+ - new
66
+ - realtime
67
+ - tap
68
+ - with_object
69
+ FunctionalMethods:
70
+ - let
71
+ - let!
72
+ - subject
73
+ - watch
74
+ IgnoredMethods:
75
+ - lambda
76
+ - proc
77
+ - it
78
+
79
+ Style/BracesAroundHashParameters:
80
+ EnforcedStyle: no_braces
81
+ SupportedStyles:
82
+ - braces
83
+ - no_braces
84
+ - context_dependent
85
+
86
+ Layout/CaseIndentation:
87
+ EnforcedStyle: end
88
+ SupportedStyles:
89
+ - case
90
+ - end
91
+ IndentOneStep: false
92
+ IndentationWidth:
93
+
94
+ Style/ClassAndModuleChildren:
95
+ EnforcedStyle: nested
96
+ SupportedStyles:
97
+ - nested
98
+ - compact
99
+
100
+ Style/ClassCheck:
101
+ EnforcedStyle: is_a?
102
+ SupportedStyles:
103
+ - is_a?
104
+ - kind_of?
105
+
106
+ Style/CommandLiteral:
107
+ EnforcedStyle: percent_x
108
+ SupportedStyles:
109
+ - backticks
110
+ - percent_x
111
+ - mixed
112
+ AllowInnerBackticks: false
113
+
114
+ Style/CommentAnnotation:
115
+ Keywords:
116
+ - TODO
117
+ - FIXME
118
+ - OPTIMIZE
119
+ - HACK
120
+ - REVIEW
121
+
122
+ Style/ConditionalAssignment:
123
+ EnforcedStyle: assign_to_condition
124
+ SupportedStyles:
125
+ - assign_to_condition
126
+ - assign_inside_condition
127
+ SingleLineConditionsOnly: true
128
+
129
+ Layout/DotPosition:
130
+ EnforcedStyle: leading
131
+ SupportedStyles:
132
+ - leading
133
+ - trailing
134
+
135
+ Style/EmptyElse:
136
+ EnforcedStyle: both
137
+ SupportedStyles:
138
+ - empty
139
+ - nil
140
+ - both
141
+
142
+ Layout/EmptyLineBetweenDefs:
143
+ AllowAdjacentOneLineDefs: false
144
+
145
+ Layout/EmptyLinesAroundBlockBody:
146
+ EnforcedStyle: no_empty_lines
147
+ SupportedStyles:
148
+ - empty_lines
149
+ - no_empty_lines
150
+
151
+ Layout/EmptyLinesAroundClassBody:
152
+ EnforcedStyle: no_empty_lines
153
+ SupportedStyles:
154
+ - empty_lines
155
+ - empty_lines_except_namespace
156
+ - no_empty_lines
157
+
158
+ Layout/EmptyLinesAroundModuleBody:
159
+ EnforcedStyle: no_empty_lines
160
+ SupportedStyles:
161
+ - empty_lines
162
+ - empty_lines_except_namespace
163
+ - no_empty_lines
164
+
165
+ Layout/ExtraSpacing:
166
+ AllowForAlignment: true
167
+ ForceEqualSignAlignment: false
168
+
169
+ Naming/FileName:
170
+ Exclude: []
171
+ ExpectMatchingDefinition: false
172
+ Regex:
173
+ IgnoreExecutableScripts: true
174
+
175
+ Layout/FirstParameterIndentation:
176
+ EnforcedStyle: consistent
177
+ SupportedStyles:
178
+ - consistent
179
+ - special_for_inner_method_call
180
+ - special_for_inner_method_call_in_parentheses
181
+ IndentationWidth:
182
+
183
+ Style/For:
184
+ EnforcedStyle: each
185
+ SupportedStyles:
186
+ - for
187
+ - each
188
+
189
+ Style/FormatString:
190
+ EnforcedStyle: format
191
+ SupportedStyles:
192
+ - format
193
+ - sprintf
194
+ - percent
195
+
196
+ Style/FrozenStringLiteralComment:
197
+ Details: >-
198
+ Add `# frozen_string_literal: true` to the top of the file. Frozen string
199
+ literals will become the default in a future Ruby version, and we want to
200
+ make sure we're ready.
201
+ EnforcedStyle: when_needed
202
+ SupportedStyles:
203
+ - when_needed
204
+ - always
205
+ - never
206
+ Exclude:
207
+ - 'spec/**/*.rb'
208
+ - 'example/test/**/*.rb'
209
+
210
+ Style/GlobalVars:
211
+ AllowedVariables: []
212
+
213
+ Style/HashSyntax:
214
+ EnforcedStyle: ruby19
215
+ SupportedStyles:
216
+ - ruby19
217
+ - hash_rockets
218
+ - no_mixed_keys
219
+ - ruby19_no_mixed_keys
220
+ UseHashRocketsWithSymbolValues: false
221
+ PreferHashRocketsForNonAlnumEndingSymbols: false
222
+
223
+ Layout/IndentationConsistency:
224
+ EnforcedStyle: normal
225
+ SupportedStyles:
226
+ - normal
227
+ - rails
228
+
229
+ Layout/IndentationWidth:
230
+ Width: 2
231
+
232
+ Layout/IndentArray:
233
+ EnforcedStyle: consistent
234
+ SupportedStyles:
235
+ - special_inside_parentheses
236
+ - consistent
237
+ - align_brackets
238
+ IndentationWidth:
239
+
240
+ Layout/IndentAssignment:
241
+ IndentationWidth:
242
+
243
+ Layout/IndentHash:
244
+ EnforcedStyle: consistent
245
+ SupportedStyles:
246
+ - special_inside_parentheses
247
+ - consistent
248
+ - align_braces
249
+ IndentationWidth:
250
+
251
+ Style/LambdaCall:
252
+ EnforcedStyle: call
253
+ SupportedStyles:
254
+ - call
255
+ - braces
256
+
257
+ Style/Next:
258
+ EnforcedStyle: skip_modifier_ifs
259
+ MinBodyLength: 3
260
+ SupportedStyles:
261
+ - skip_modifier_ifs
262
+ - always
263
+
264
+ Style/NonNilCheck:
265
+ IncludeSemanticChanges: false
266
+
267
+ Style/MethodCallWithArgsParentheses:
268
+ Enabled: true
269
+ IgnoreMacros: true
270
+ IgnoredMethods:
271
+ - require
272
+ - require_relative
273
+ - require_dependency
274
+ - yield
275
+ - raise
276
+ - puts
277
+ Exclude:
278
+ - Gemfile
279
+
280
+ Style/MethodDefParentheses:
281
+ EnforcedStyle: require_parentheses
282
+ SupportedStyles:
283
+ - require_parentheses
284
+ - require_no_parentheses
285
+ - require_no_parentheses_except_multiline
286
+
287
+ Naming/MethodName:
288
+ EnforcedStyle: snake_case
289
+ SupportedStyles:
290
+ - snake_case
291
+ - camelCase
292
+
293
+ Layout/MultilineArrayBraceLayout:
294
+ EnforcedStyle: symmetrical
295
+ SupportedStyles:
296
+ - symmetrical
297
+ - new_line
298
+ - same_line
299
+
300
+ Layout/MultilineHashBraceLayout:
301
+ EnforcedStyle: symmetrical
302
+ SupportedStyles:
303
+ - symmetrical
304
+ - new_line
305
+ - same_line
306
+
307
+ Layout/MultilineMethodCallBraceLayout:
308
+ EnforcedStyle: symmetrical
309
+ SupportedStyles:
310
+ - symmetrical
311
+ - new_line
312
+ - same_line
313
+
314
+ Layout/MultilineMethodCallIndentation:
315
+ EnforcedStyle: indented
316
+ SupportedStyles:
317
+ - aligned
318
+ - indented
319
+ - indented_relative_to_receiver
320
+ IndentationWidth: 2
321
+
322
+ Layout/MultilineMethodDefinitionBraceLayout:
323
+ EnforcedStyle: symmetrical
324
+ SupportedStyles:
325
+ - symmetrical
326
+ - new_line
327
+ - same_line
328
+
329
+ Style/NumericLiteralPrefix:
330
+ EnforcedOctalStyle: zero_only
331
+ SupportedOctalStyles:
332
+ - zero_with_o
333
+ - zero_only
334
+
335
+ Style/ParenthesesAroundCondition:
336
+ AllowSafeAssignment: true
337
+
338
+ Style/PercentQLiterals:
339
+ EnforcedStyle: lower_case_q
340
+ SupportedStyles:
341
+ - lower_case_q
342
+ - upper_case_q
343
+
344
+ Naming/PredicateName:
345
+ NamePrefix:
346
+ - is_
347
+ NamePrefixBlacklist:
348
+ - is_
349
+ NameWhitelist:
350
+ - is_a?
351
+ Exclude:
352
+ - 'spec/**/*'
353
+
354
+ Style/PreferredHashMethods:
355
+ EnforcedStyle: short
356
+ SupportedStyles:
357
+ - short
358
+ - verbose
359
+
360
+ Style/RaiseArgs:
361
+ EnforcedStyle: exploded
362
+ SupportedStyles:
363
+ - compact
364
+ - exploded
365
+
366
+ Style/RedundantReturn:
367
+ AllowMultipleReturnValues: false
368
+
369
+ Style/RegexpLiteral:
370
+ EnforcedStyle: mixed
371
+ SupportedStyles:
372
+ - slashes
373
+ - percent_r
374
+ - mixed
375
+ AllowInnerSlashes: false
376
+
377
+ Style/SafeNavigation:
378
+ ConvertCodeThatCanStartToReturnNil: false
379
+ Enabled: true
380
+
381
+ Lint/SafeNavigationChain:
382
+ Enabled: true
383
+
384
+ Style/Semicolon:
385
+ AllowAsExpressionSeparator: false
386
+
387
+ Style/SignalException:
388
+ EnforcedStyle: only_raise
389
+ SupportedStyles:
390
+ - only_raise
391
+ - only_fail
392
+ - semantic
393
+
394
+ Style/SingleLineMethods:
395
+ AllowIfMethodIsEmpty: true
396
+
397
+ Layout/SpaceBeforeFirstArg:
398
+ AllowForAlignment: true
399
+
400
+ Style/SpecialGlobalVars:
401
+ EnforcedStyle: use_english_names
402
+ SupportedStyles:
403
+ - use_perl_names
404
+ - use_english_names
405
+
406
+ Style/StabbyLambdaParentheses:
407
+ EnforcedStyle: require_parentheses
408
+ SupportedStyles:
409
+ - require_parentheses
410
+ - require_no_parentheses
411
+
412
+ Style/StringLiteralsInInterpolation:
413
+ EnforcedStyle: single_quotes
414
+ SupportedStyles:
415
+ - single_quotes
416
+ - double_quotes
417
+
418
+ Layout/SpaceAroundBlockParameters:
419
+ EnforcedStyleInsidePipes: no_space
420
+ SupportedStylesInsidePipes:
421
+ - space
422
+ - no_space
423
+
424
+ Layout/SpaceAroundEqualsInParameterDefault:
425
+ EnforcedStyle: space
426
+ SupportedStyles:
427
+ - space
428
+ - no_space
429
+
430
+ Layout/SpaceAroundOperators:
431
+ AllowForAlignment: true
432
+
433
+ Layout/SpaceBeforeBlockBraces:
434
+ EnforcedStyle: space
435
+ EnforcedStyleForEmptyBraces: space
436
+ SupportedStyles:
437
+ - space
438
+ - no_space
439
+
440
+ Layout/SpaceInsideBlockBraces:
441
+ EnforcedStyle: space
442
+ SupportedStyles:
443
+ - space
444
+ - no_space
445
+ EnforcedStyleForEmptyBraces: no_space
446
+ SpaceBeforeBlockParameters: true
447
+
448
+ Layout/SpaceInsideHashLiteralBraces:
449
+ EnforcedStyle: space
450
+ EnforcedStyleForEmptyBraces: no_space
451
+ SupportedStyles:
452
+ - space
453
+ - no_space
454
+ - compact
455
+
456
+ Layout/SpaceInsideStringInterpolation:
457
+ EnforcedStyle: no_space
458
+ SupportedStyles:
459
+ - space
460
+ - no_space
461
+
462
+ Style/SymbolProc:
463
+ IgnoredMethods:
464
+ - respond_to
465
+ - define_method
466
+
467
+ Style/TernaryParentheses:
468
+ EnforcedStyle: require_no_parentheses
469
+ SupportedStyles:
470
+ - require_parentheses
471
+ - require_no_parentheses
472
+ AllowSafeAssignment: true
473
+
474
+ Layout/TrailingBlankLines:
475
+ EnforcedStyle: final_newline
476
+ SupportedStyles:
477
+ - final_newline
478
+ - final_blank_line
479
+
480
+ Style/TrivialAccessors:
481
+ ExactNameMatch: true
482
+ AllowPredicates: true
483
+ AllowDSLWriters: false
484
+ IgnoreClassMethods: false
485
+ Whitelist:
486
+ - to_ary
487
+ - to_a
488
+ - to_c
489
+ - to_enum
490
+ - to_h
491
+ - to_hash
492
+ - to_i
493
+ - to_int
494
+ - to_io
495
+ - to_open
496
+ - to_path
497
+ - to_proc
498
+ - to_r
499
+ - to_regexp
500
+ - to_str
501
+ - to_s
502
+ - to_sym
503
+
504
+ Naming/VariableName:
505
+ EnforcedStyle: snake_case
506
+ SupportedStyles:
507
+ - snake_case
508
+ - camelCase
509
+
510
+ Style/WhileUntilModifier:
511
+ Enabled: true
512
+
513
+ Style/WordArray:
514
+ EnforcedStyle: percent
515
+ SupportedStyles:
516
+ - percent
517
+ - brackets
518
+ MinSize: 0
519
+ WordRegex: !ruby/regexp /\A[\p{Word}\n\t]+\z/
520
+
521
+ Metrics/BlockNesting:
522
+ Max: 3
523
+
524
+ Metrics/LineLength:
525
+ Max: 120
526
+ AllowHeredoc: true
527
+ AllowURI: true
528
+ URISchemes:
529
+ - http
530
+ - https
531
+ IgnoreCopDirectives: false
532
+ IgnoredPatterns:
533
+ - '\A\s*(remote_)?test(_\w+)?\s.*(do|->)(\s|\Z)'
534
+
535
+ Metrics/ParameterLists:
536
+ Max: 5
537
+ CountKeywordArgs: false
538
+
539
+ Layout/BlockAlignment:
540
+ EnforcedStyleAlignWith: either
541
+ SupportedStylesAlignWith:
542
+ - either
543
+ - start_of_block
544
+ - start_of_line
545
+
546
+ Layout/EndAlignment:
547
+ EnforcedStyleAlignWith: variable
548
+ SupportedStylesAlignWith:
549
+ - keyword
550
+ - variable
551
+ - start_of_line
552
+
553
+ Layout/DefEndAlignment:
554
+ EnforcedStyleAlignWith: start_of_line
555
+ SupportedStylesAlignWith:
556
+ - start_of_line
557
+ - def
558
+
559
+ Lint/InheritException:
560
+ EnforcedStyle: runtime_error
561
+ SupportedStyles:
562
+ - runtime_error
563
+ - standard_error
564
+
565
+ Lint/UnusedBlockArgument:
566
+ IgnoreEmptyBlocks: true
567
+ AllowUnusedKeywordArguments: false
568
+
569
+ Lint/UnusedMethodArgument:
570
+ AllowUnusedKeywordArguments: false
571
+ IgnoreEmptyMethods: true
572
+
573
+ Performance/RedundantMerge:
574
+ MaxKeyValuePairs: 2
575
+
576
+ Rails/ActionFilter:
577
+ EnforcedStyle: action
578
+ SupportedStyles:
579
+ - action
580
+ - filter
581
+ Include:
582
+ - app/controllers/**/*.rb
583
+
584
+ Rails/Date:
585
+ EnforcedStyle: flexible
586
+ SupportedStyles:
587
+ - strict
588
+ - flexible
589
+
590
+ Rails/DynamicFindBy:
591
+ Whitelist:
592
+ - find_by_sql
593
+
594
+ Rails/Exit:
595
+ Include:
596
+ - app/**/*.rb
597
+ - config/**/*.rb
598
+ - lib/**/*.rb
599
+ Exclude:
600
+ - 'lib/**/*.rake'
601
+
602
+ Rails/FindBy:
603
+ Include:
604
+ - app/models/**/*.rb
605
+
606
+ Rails/FindEach:
607
+ Include:
608
+ - app/models/**/*.rb
609
+
610
+ Rails/HasAndBelongsToMany:
611
+ Include:
612
+ - app/models/**/*.rb
613
+
614
+ Rails/NotNullColumn:
615
+ Include:
616
+ - db/migrate/*.rb
617
+
618
+ Rails/Output:
619
+ Include:
620
+ - app/**/*.rb
621
+ - config/**/*.rb
622
+ - db/**/*.rb
623
+ - lib/**/*.rb
624
+
625
+ Rails/ReadWriteAttribute:
626
+ Include:
627
+ - app/models/**/*.rb
628
+
629
+ Rails/RequestReferer:
630
+ EnforcedStyle: referer
631
+ SupportedStyles:
632
+ - referer
633
+ - referrer
634
+
635
+ Rails/SafeNavigation:
636
+ ConvertTry: false
637
+
638
+ Rails/ScopeArgs:
639
+ Include:
640
+ - app/models/**/*.rb
641
+
642
+ Rails/TimeZone:
643
+ EnforcedStyle: flexible
644
+ SupportedStyles:
645
+ - strict
646
+ - flexible
647
+
648
+ Rails/UniqBeforePluck:
649
+ EnforcedStyle: conservative
650
+ SupportedStyles:
651
+ - conservative
652
+ - aggressive
653
+
654
+ Rails/Validation:
655
+ Include:
656
+ - app/models/**/*.rb
657
+
658
+ Naming/AccessorMethodName:
659
+ Enabled: true
660
+
661
+ Layout/AlignArray:
662
+ Enabled: true
663
+
664
+ Style/ArrayJoin:
665
+ Enabled: true
666
+
667
+ Naming/AsciiIdentifiers:
668
+ Enabled: true
669
+
670
+ Style/Attr:
671
+ Enabled: true
672
+
673
+ Style/BeginBlock:
674
+ Enabled: true
675
+
676
+ Style/BlockComments:
677
+ Enabled: true
678
+
679
+ Layout/BlockEndNewline:
680
+ Enabled: true
681
+
682
+ Style/CaseEquality:
683
+ Enabled: true
684
+
685
+ Style/CharacterLiteral:
686
+ Enabled: true
687
+
688
+ Naming/ClassAndModuleCamelCase:
689
+ Enabled: true
690
+
691
+ Style/ClassMethods:
692
+ Enabled: true
693
+
694
+ Style/ClassVars:
695
+ Enabled: true
696
+
697
+ Layout/ClosingParenthesisIndentation:
698
+ Enabled: true
699
+
700
+ Style/ColonMethodCall:
701
+ Enabled: true
702
+
703
+ Layout/CommentIndentation:
704
+ Enabled: true
705
+
706
+ Naming/ConstantName:
707
+ Enabled: true
708
+
709
+ Style/DateTime:
710
+ Enabled: true
711
+
712
+ Style/DefWithParentheses:
713
+ Enabled: true
714
+
715
+ Style/EachForSimpleLoop:
716
+ Enabled: true
717
+
718
+ Style/EachWithObject:
719
+ Enabled: true
720
+
721
+ Layout/ElseAlignment:
722
+ Enabled: true
723
+
724
+ Style/EmptyCaseCondition:
725
+ Enabled: true
726
+
727
+ Layout/EmptyLines:
728
+ Enabled: true
729
+
730
+ Layout/EmptyLinesAroundAccessModifier:
731
+ Enabled: true
732
+
733
+ Layout/EmptyLinesAroundMethodBody:
734
+ Enabled: true
735
+
736
+ Style/EmptyLiteral:
737
+ Enabled: true
738
+
739
+ Style/EndBlock:
740
+ Enabled: true
741
+
742
+ Layout/EndOfLine:
743
+ Enabled: true
744
+
745
+ Style/EvenOdd:
746
+ Enabled: true
747
+
748
+ Layout/InitialIndentation:
749
+ Enabled: true
750
+
751
+ Lint/FlipFlop:
752
+ Enabled: true
753
+
754
+ Style/IfInsideElse:
755
+ Enabled: true
756
+
757
+ Style/IfUnlessModifierOfIfUnless:
758
+ Enabled: true
759
+
760
+ Style/IfWithSemicolon:
761
+ Enabled: true
762
+
763
+ Style/IdenticalConditionalBranches:
764
+ Enabled: true
765
+
766
+ Style/InfiniteLoop:
767
+ Enabled: true
768
+
769
+ Layout/LeadingCommentSpace:
770
+ Enabled: true
771
+
772
+ Style/LineEndConcatenation:
773
+ Enabled: true
774
+
775
+ Style/MethodCallWithoutArgsParentheses:
776
+ Enabled: true
777
+
778
+ Style/MethodMissingSuper:
779
+ Enabled: true
780
+
781
+ Style/MissingRespondToMissing:
782
+ Enabled: true
783
+
784
+ Layout/MultilineBlockLayout:
785
+ Enabled: true
786
+
787
+ Style/MultilineIfThen:
788
+ Enabled: true
789
+
790
+ Style/MultilineMemoization:
791
+ Enabled: true
792
+
793
+ Style/MultilineTernaryOperator:
794
+ Enabled: true
795
+
796
+ Style/NegatedIf:
797
+ Enabled: true
798
+
799
+ Style/NegatedWhile:
800
+ Enabled: true
801
+
802
+ Style/NestedModifier:
803
+ Enabled: true
804
+
805
+ Style/NestedParenthesizedCalls:
806
+ Enabled: true
807
+
808
+ Style/NestedTernaryOperator:
809
+ Enabled: true
810
+
811
+ Style/NilComparison:
812
+ Enabled: true
813
+
814
+ Style/Not:
815
+ Enabled: true
816
+
817
+ Style/OneLineConditional:
818
+ Enabled: true
819
+
820
+ Naming/BinaryOperatorParameterName:
821
+ Enabled: true
822
+
823
+ Style/OptionalArguments:
824
+ Enabled: true
825
+
826
+ Style/ParallelAssignment:
827
+ Enabled: true
828
+
829
+ Style/PerlBackrefs:
830
+ Enabled: true
831
+
832
+ Style/Proc:
833
+ Enabled: true
834
+
835
+ Style/RedundantBegin:
836
+ Enabled: true
837
+
838
+ Style/RedundantException:
839
+ Enabled: true
840
+
841
+ Style/RedundantFreeze:
842
+ Enabled: true
843
+
844
+ Style/RedundantParentheses:
845
+ Enabled: true
846
+
847
+ Style/RedundantSelf:
848
+ Enabled: true
849
+
850
+ Layout/RescueEnsureAlignment:
851
+ Enabled: true
852
+
853
+ Style/RescueModifier:
854
+ Enabled: true
855
+
856
+ Style/SelfAssignment:
857
+ Enabled: true
858
+
859
+ Layout/SpaceAfterColon:
860
+ Enabled: true
861
+
862
+ Layout/SpaceAfterComma:
863
+ Enabled: true
864
+
865
+ Layout/SpaceAfterMethodName:
866
+ Enabled: true
867
+
868
+ Layout/SpaceAfterNot:
869
+ Enabled: true
870
+
871
+ Layout/SpaceAfterSemicolon:
872
+ Enabled: true
873
+
874
+ Layout/SpaceBeforeComma:
875
+ Enabled: true
876
+
877
+ Layout/SpaceBeforeComment:
878
+ Enabled: true
879
+
880
+ Layout/SpaceBeforeSemicolon:
881
+ Enabled: true
882
+
883
+ Layout/SpaceAroundKeyword:
884
+ Enabled: true
885
+
886
+ Layout/SpaceInsideArrayPercentLiteral:
887
+ Enabled: true
888
+
889
+ Layout/SpaceInsidePercentLiteralDelimiters:
890
+ Enabled: true
891
+
892
+ Layout/SpaceInsideArrayLiteralBrackets:
893
+ Enabled: true
894
+
895
+ Layout/SpaceInsideParens:
896
+ Enabled: true
897
+
898
+ Layout/SpaceInsideRangeLiteral:
899
+ Enabled: true
900
+
901
+ Style/SymbolLiteral:
902
+ Enabled: true
903
+
904
+ Layout/Tab:
905
+ Enabled: true
906
+
907
+ Layout/TrailingWhitespace:
908
+ Enabled: true
909
+
910
+ Style/UnlessElse:
911
+ Enabled: true
912
+
913
+ Style/UnneededCapitalW:
914
+ Enabled: true
915
+
916
+ Style/UnneededInterpolation:
917
+ Enabled: true
918
+
919
+ Style/UnneededPercentQ:
920
+ Enabled: true
921
+
922
+ Style/VariableInterpolation:
923
+ Enabled: true
924
+
925
+ Style/WhenThen:
926
+ Enabled: true
927
+
928
+ Style/WhileUntilDo:
929
+ Enabled: true
930
+
931
+ Style/ZeroLengthPredicate:
932
+ Enabled: true
933
+
934
+ Layout/IndentHeredoc:
935
+ EnforcedStyle: squiggly
936
+
937
+ Lint/AmbiguousOperator:
938
+ Enabled: true
939
+
940
+ Lint/AmbiguousRegexpLiteral:
941
+ Enabled: true
942
+
943
+ Lint/CircularArgumentReference:
944
+ Enabled: true
945
+
946
+ Layout/ConditionPosition:
947
+ Enabled: true
948
+
949
+ Lint/Debugger:
950
+ Enabled: true
951
+
952
+ Lint/DeprecatedClassMethods:
953
+ Enabled: true
954
+
955
+ Lint/DuplicateMethods:
956
+ Enabled: true
957
+
958
+ Lint/DuplicatedKey:
959
+ Enabled: true
960
+
961
+ Lint/EachWithObjectArgument:
962
+ Enabled: true
963
+
964
+ Lint/ElseLayout:
965
+ Enabled: true
966
+
967
+ Lint/EmptyEnsure:
968
+ Enabled: true
969
+
970
+ Lint/EmptyInterpolation:
971
+ Enabled: true
972
+
973
+ Lint/EndInMethod:
974
+ Enabled: true
975
+
976
+ Lint/EnsureReturn:
977
+ Enabled: true
978
+
979
+ Lint/FloatOutOfRange:
980
+ Enabled: true
981
+
982
+ Lint/FormatParameterMismatch:
983
+ Enabled: true
984
+
985
+ Lint/HandleExceptions:
986
+ Enabled: true
987
+
988
+ Lint/ImplicitStringConcatenation:
989
+ Description: Checks for adjacent string literals on the same line, which could
990
+ better be represented as a single string literal.
991
+
992
+ Lint/IneffectiveAccessModifier:
993
+ Description: Checks for attempts to use `private` or `protected` to set the visibility
994
+ of a class method, which does not work.
995
+
996
+ Lint/LiteralAsCondition:
997
+ Enabled: true
998
+
999
+ Lint/LiteralInInterpolation:
1000
+ Enabled: true
1001
+
1002
+ Lint/Loop:
1003
+ Description: Use Kernel#loop with break rather than begin/end/until or begin/end/while
1004
+ for post-loop tests.
1005
+
1006
+ Lint/NestedMethodDefinition:
1007
+ Enabled: true
1008
+
1009
+ Lint/NextWithoutAccumulator:
1010
+ Description: Do not omit the accumulator when calling `next` in a `reduce`/`inject`
1011
+ block.
1012
+
1013
+ Lint/NonLocalExitFromIterator:
1014
+ Enabled: true
1015
+
1016
+ Lint/ParenthesesAsGroupedExpression:
1017
+ Enabled: true
1018
+
1019
+ Lint/PercentStringArray:
1020
+ Enabled: true
1021
+
1022
+ Lint/PercentSymbolArray:
1023
+ Enabled: true
1024
+
1025
+ Lint/RandOne:
1026
+ Description: Checks for `rand(1)` calls. Such calls always return `0` and most
1027
+ likely a mistake.
1028
+
1029
+ Lint/RequireParentheses:
1030
+ Enabled: true
1031
+
1032
+ Lint/RescueException:
1033
+ Enabled: true
1034
+
1035
+ Lint/ShadowedException:
1036
+ Enabled: true
1037
+
1038
+ Lint/ShadowingOuterLocalVariable:
1039
+ Enabled: true
1040
+
1041
+ Lint/StringConversionInInterpolation:
1042
+ Enabled: true
1043
+
1044
+ Lint/UnderscorePrefixedVariableName:
1045
+ Enabled: true
1046
+
1047
+ Lint/UnifiedInteger:
1048
+ Enabled: true
1049
+
1050
+ Lint/UnneededCopDisableDirective:
1051
+ Enabled: true
1052
+
1053
+ Lint/UnneededCopEnableDirective:
1054
+ Enabled: true
1055
+
1056
+ Lint/UnneededSplatExpansion:
1057
+ Enabled: true
1058
+
1059
+ Lint/UnreachableCode:
1060
+ Enabled: true
1061
+
1062
+ Lint/UselessAccessModifier:
1063
+ ContextCreatingMethods: []
1064
+
1065
+ Lint/UselessAssignment:
1066
+ Enabled: true
1067
+
1068
+ Lint/UselessComparison:
1069
+ Enabled: true
1070
+
1071
+ Lint/UselessElseWithoutRescue:
1072
+ Enabled: true
1073
+
1074
+ Lint/UselessSetterCall:
1075
+ Enabled: true
1076
+
1077
+ Lint/Void:
1078
+ Enabled: true
1079
+
1080
+ Performance/CaseWhenSplat:
1081
+ Enabled: true
1082
+
1083
+ Performance/Count:
1084
+ SafeMode: true
1085
+
1086
+ Performance/Detect:
1087
+ SafeMode: true
1088
+
1089
+ Performance/DoubleStartEndWith:
1090
+ Enabled: true
1091
+
1092
+ Performance/EndWith:
1093
+ Enabled: true
1094
+
1095
+ Performance/FixedSize:
1096
+ Enabled: true
1097
+
1098
+ Performance/FlatMap:
1099
+ EnabledForFlattenWithoutParams: false
1100
+
1101
+ Performance/LstripRstrip:
1102
+ Enabled: true
1103
+
1104
+ Performance/RangeInclude:
1105
+ Enabled: true
1106
+
1107
+ Performance/RedundantMatch:
1108
+ Enabled: true
1109
+
1110
+ Performance/RedundantSortBy:
1111
+ Enabled: true
1112
+
1113
+ Performance/RegexpMatch:
1114
+ Enabled: true
1115
+
1116
+ Performance/ReverseEach:
1117
+ Enabled: true
1118
+
1119
+ Performance/Sample:
1120
+ Enabled: true
1121
+
1122
+ Performance/Size:
1123
+ Enabled: true
1124
+
1125
+ Performance/CompareWithBlock:
1126
+ Enabled: true
1127
+
1128
+ Performance/StartWith:
1129
+ Enabled: true
1130
+
1131
+ Performance/StringReplacement:
1132
+ Enabled: true
1133
+
1134
+ Rails/DelegateAllowBlank:
1135
+ Enabled: true
1136
+
1137
+ Rails/HttpPositionalArguments:
1138
+ Include:
1139
+ - spec/**/*
1140
+ - test/**/*
1141
+
1142
+ Rails/InverseOf:
1143
+ Enabled: true
1144
+
1145
+ Rails/OutputSafety:
1146
+ Enabled: true
1147
+
1148
+ Rails/PluralizationGrammar:
1149
+ Enabled: true
1150
+
1151
+ Security/Eval:
1152
+ Enabled: false
1153
+
1154
+ Security/JSONLoad:
1155
+ Enabled: true
1156
+
1157
+ Security/Open:
1158
+ Enabled: true
1159
+ Exclude:
1160
+ - spec/**/*
1161
+
1162
+ Lint/BigDecimalNew:
1163
+ Enabled: true
1164
+
1165
+ Style/TrailingBodyOnClass:
1166
+ Enabled: true
1167
+
1168
+ Style/TrailingBodyOnModule:
1169
+ Enabled: true
1170
+
1171
+ Style/TrailingCommaInArrayLiteral:
1172
+ EnforcedStyleForMultiline: comma
1173
+ Enabled: true
1174
+
1175
+ Style/TrailingCommaInHashLiteral:
1176
+ EnforcedStyleForMultiline: comma
1177
+ Enabled: true
1178
+
1179
+ Layout/SpaceInsideReferenceBrackets:
1180
+ EnforcedStyle: no_space
1181
+ EnforcedStyleForEmptyBrackets: no_space
1182
+ Enabled: true
1183
+
1184
+ Style/ModuleFunction:
1185
+ EnforcedStyle: extend_self
1186
+
1187
+ Lint/OrderedMagicComments:
1188
+ Enabled: true