impressionist-cody 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. checksums.yaml +7 -0
  2. data/.github/workflows/main.yml +25 -0
  3. data/.gitignore +17 -0
  4. data/.rspec +1 -0
  5. data/.rubocop.yml +27 -0
  6. data/.rubocop_todo.yml +660 -0
  7. data/CHANGELOG.rdoc +96 -0
  8. data/Gemfile +22 -0
  9. data/LICENSE.txt +20 -0
  10. data/README.md +265 -0
  11. data/Rakefile +20 -0
  12. data/UPGRADE_GUIDE.md +13 -0
  13. data/app/assets/config/manifest.js +3 -0
  14. data/app/controllers/impressionist_controller.rb +166 -0
  15. data/app/models/impression.rb +2 -0
  16. data/app/models/impressionist/bots.rb +1468 -0
  17. data/app/models/impressionist/impressionable.rb +62 -0
  18. data/impressionist.gemspec +30 -0
  19. data/lib/generators/active_record/impressionist_generator.rb +22 -0
  20. data/lib/generators/active_record/templates/create_impressions_table.rb.erb +32 -0
  21. data/lib/generators/impressionist_generator.rb +13 -0
  22. data/lib/generators/mongo_mapper/impressionist_generator.rb +8 -0
  23. data/lib/generators/mongoid/impressionist_generator.rb +8 -0
  24. data/lib/generators/templates/impression.rb.erb +8 -0
  25. data/lib/impressionist/bots.rb +21 -0
  26. data/lib/impressionist/controllers/mongoid/impressionist_controller.rb +10 -0
  27. data/lib/impressionist/counter_cache.rb +76 -0
  28. data/lib/impressionist/engine.rb +45 -0
  29. data/lib/impressionist/is_impressionable.rb +23 -0
  30. data/lib/impressionist/load.rb +11 -0
  31. data/lib/impressionist/models/active_record/impression.rb +14 -0
  32. data/lib/impressionist/models/active_record/impressionist/impressionable.rb +12 -0
  33. data/lib/impressionist/models/mongo_mapper/impression.rb +18 -0
  34. data/lib/impressionist/models/mongo_mapper/impressionist/impressionable.rb +21 -0
  35. data/lib/impressionist/models/mongoid/impression.rb +26 -0
  36. data/lib/impressionist/models/mongoid/impressionist/impressionable.rb +28 -0
  37. data/lib/impressionist/rails_toggle.rb +26 -0
  38. data/lib/impressionist/setup_association.rb +53 -0
  39. data/lib/impressionist/update_counters.rb +77 -0
  40. data/lib/impressionist/version.rb +3 -0
  41. data/lib/impressionist.rb +12 -0
  42. data/logo.png +0 -0
  43. data/spec/controllers/articles_controller_spec.rb +113 -0
  44. data/spec/controllers/dummy_controller_spec.rb +13 -0
  45. data/spec/controllers/impressionist_uniqueness_spec.rb +463 -0
  46. data/spec/controllers/posts_controller_spec.rb +36 -0
  47. data/spec/controllers/widgets_controller_spec.rb +103 -0
  48. data/spec/counter_caching_spec.rb +49 -0
  49. data/spec/dummy/.ruby-version +1 -0
  50. data/spec/dummy/Rakefile +6 -0
  51. data/spec/dummy/app/assets/config/manifest.js +1 -0
  52. data/spec/dummy/app/assets/images/.keep +0 -0
  53. data/spec/dummy/app/assets/stylesheets/application.css +15 -0
  54. data/spec/dummy/app/channels/application_cable/channel.rb +4 -0
  55. data/spec/dummy/app/channels/application_cable/connection.rb +4 -0
  56. data/spec/dummy/app/controllers/application_controller.rb +2 -0
  57. data/spec/dummy/app/controllers/articles_controller.rb +22 -0
  58. data/spec/dummy/app/controllers/concerns/.keep +0 -0
  59. data/spec/dummy/app/controllers/dummy_controller.rb +6 -0
  60. data/spec/dummy/app/controllers/posts_controller.rb +23 -0
  61. data/spec/dummy/app/controllers/profiles_controller.rb +14 -0
  62. data/spec/dummy/app/controllers/widgets_controller.rb +12 -0
  63. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  64. data/spec/dummy/app/javascript/packs/application.js +15 -0
  65. data/spec/dummy/app/jobs/application_job.rb +7 -0
  66. data/spec/dummy/app/mailers/application_mailer.rb +4 -0
  67. data/spec/dummy/app/models/application_record.rb +3 -0
  68. data/spec/dummy/app/models/article.rb +3 -0
  69. data/spec/dummy/app/models/concerns/.keep +0 -0
  70. data/spec/dummy/app/models/dummy.rb +7 -0
  71. data/spec/dummy/app/models/post.rb +3 -0
  72. data/spec/dummy/app/models/profile.rb +6 -0
  73. data/spec/dummy/app/models/user.rb +3 -0
  74. data/spec/dummy/app/models/widget.rb +3 -0
  75. data/spec/dummy/app/views/articles/index.html.erb +1 -0
  76. data/spec/dummy/app/views/articles/show.html.erb +1 -0
  77. data/spec/dummy/app/views/dummy/index.html.erb +0 -0
  78. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  79. data/spec/dummy/app/views/layouts/mailer.html.erb +13 -0
  80. data/spec/dummy/app/views/layouts/mailer.text.erb +1 -0
  81. data/spec/dummy/app/views/posts/edit.html.erb +0 -0
  82. data/spec/dummy/app/views/posts/index.html.erb +0 -0
  83. data/spec/dummy/app/views/posts/show.html.erb +0 -0
  84. data/spec/dummy/app/views/profiles/show.html.erb +3 -0
  85. data/spec/dummy/app/views/widgets/index.html.erb +0 -0
  86. data/spec/dummy/app/views/widgets/new.html.erb +0 -0
  87. data/spec/dummy/app/views/widgets/show.html.erb +0 -0
  88. data/spec/dummy/bin/rails +4 -0
  89. data/spec/dummy/bin/rake +4 -0
  90. data/spec/dummy/bin/setup +33 -0
  91. data/spec/dummy/config/application.rb +20 -0
  92. data/spec/dummy/config/boot.rb +5 -0
  93. data/spec/dummy/config/cable.yml +10 -0
  94. data/spec/dummy/config/database.yml +25 -0
  95. data/spec/dummy/config/environment.rb +5 -0
  96. data/spec/dummy/config/environments/development.rb +62 -0
  97. data/spec/dummy/config/environments/production.rb +112 -0
  98. data/spec/dummy/config/environments/test.rb +49 -0
  99. data/spec/dummy/config/initializers/application_controller_renderer.rb +8 -0
  100. data/spec/dummy/config/initializers/assets.rb +12 -0
  101. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  102. data/spec/dummy/config/initializers/content_security_policy.rb +28 -0
  103. data/spec/dummy/config/initializers/cookies_serializer.rb +5 -0
  104. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  105. data/spec/dummy/config/initializers/impression.rb +8 -0
  106. data/spec/dummy/config/initializers/inflections.rb +16 -0
  107. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  108. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  109. data/spec/dummy/config/locales/en.yml +33 -0
  110. data/spec/dummy/config/puma.rb +38 -0
  111. data/spec/dummy/config/routes.rb +4 -0
  112. data/spec/dummy/config/spring.rb +6 -0
  113. data/spec/dummy/config/storage.yml +34 -0
  114. data/spec/dummy/config.ru +5 -0
  115. data/spec/dummy/config.ru2 +4 -0
  116. data/spec/dummy/db/development.sqlite3 +0 -0
  117. data/spec/dummy/db/migrate/20110201153144_create_articles.rb +13 -0
  118. data/spec/dummy/db/migrate/20110210205028_create_posts.rb +13 -0
  119. data/spec/dummy/db/migrate/20111127184039_create_widgets.rb +15 -0
  120. data/spec/dummy/db/migrate/20150207135825_create_profiles.rb +10 -0
  121. data/spec/dummy/db/migrate/20150207140310_create_friendly_id_slugs.rb +18 -0
  122. data/spec/dummy/db/migrate/20200720143817_create_impressions_table.rb +32 -0
  123. data/spec/dummy/db/schema.rb +77 -0
  124. data/spec/dummy/lib/assets/.keep +0 -0
  125. data/spec/dummy/log/.keep +0 -0
  126. data/spec/dummy/log/development.log +129 -0
  127. data/spec/dummy/public/404.html +67 -0
  128. data/spec/dummy/public/422.html +67 -0
  129. data/spec/dummy/public/500.html +66 -0
  130. data/spec/dummy/public/apple-touch-icon-precomposed.png +0 -0
  131. data/spec/dummy/public/apple-touch-icon.png +0 -0
  132. data/spec/dummy/public/favicon.ico +0 -0
  133. data/spec/dummy/storage/.keep +0 -0
  134. data/spec/fixtures/articles.yml +3 -0
  135. data/spec/fixtures/impressions.yml +43 -0
  136. data/spec/fixtures/posts.yml +3 -0
  137. data/spec/fixtures/profiles.yml +4 -0
  138. data/spec/fixtures/widgets.yml +4 -0
  139. data/spec/initializers_spec.rb +21 -0
  140. data/spec/models/bots_spec.rb +25 -0
  141. data/spec/models/impression_spec.rb +66 -0
  142. data/spec/rails_generators/rails_generators_spec.rb +23 -0
  143. data/spec/rails_helper.rb +11 -0
  144. data/spec/rails_toggle_spec.rb +31 -0
  145. data/spec/setup_association_spec.rb +48 -0
  146. data/spec/spec_helper.rb +43 -0
  147. data/upgrade_migrations/version_0_3_0.rb +27 -0
  148. data/upgrade_migrations/version_0_4_0.rb +9 -0
  149. data/upgrade_migrations/version_1_5_2.rb +12 -0
  150. metadata +302 -0
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,660 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2020-04-25 21:43:29 -0400 using RuboCop version 0.82.0.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 1
10
+ # Configuration parameters: Include.
11
+ # Include: **/*.gemspec
12
+ Gemspec/RubyVersionGlobalsUsage:
13
+ Exclude:
14
+ - "impressionist.gemspec"
15
+ Gemspec/RequiredRubyVersion:
16
+ Exclude:
17
+ - "impressionist.gemspec"
18
+
19
+ # Offense count: 1
20
+ # Cop supports --auto-correct.
21
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
22
+ # SupportedStyles: outdent, indent
23
+ Layout/AccessModifierIndentation:
24
+ Exclude:
25
+ - "lib/impressionist/engine.rb"
26
+
27
+ # Offense count: 2
28
+ # Cop supports --auto-correct.
29
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
30
+ # SupportedStyles: with_first_argument, with_fixed_indentation
31
+ Layout/ArgumentAlignment:
32
+ Exclude:
33
+ - "lib/impressionist/is_impressionable.rb"
34
+ - "lib/impressionist/models/mongo_mapper/impressionist/impressionable.rb"
35
+
36
+ # Offense count: 1455
37
+ # Cop supports --auto-correct.
38
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
39
+ # SupportedStyles: with_first_element, with_fixed_indentation
40
+ Layout/ArrayAlignment:
41
+ Exclude:
42
+ - "app/models/impressionist/bots.rb"
43
+
44
+ # Offense count: 1
45
+ # Cop supports --auto-correct.
46
+ # Configuration parameters: EnforcedStyleAlignWith.
47
+ # SupportedStylesAlignWith: either, start_of_block, start_of_line
48
+ Layout/BlockAlignment:
49
+ Exclude:
50
+ - "lib/impressionist/engine.rb"
51
+
52
+ # Offense count: 3
53
+ # Cop supports --auto-correct.
54
+ Layout/ClosingParenthesisIndentation:
55
+ Exclude:
56
+ - "app/controllers/impressionist_controller.rb"
57
+ - "lib/impressionist/controllers/mongoid/impressionist_controller.rb"
58
+
59
+ # Offense count: 1
60
+ # Cop supports --auto-correct.
61
+ Layout/CommentIndentation:
62
+ Exclude:
63
+ - "app/controllers/impressionist_controller.rb"
64
+
65
+ # Offense count: 6
66
+ # Cop supports --auto-correct.
67
+ # Configuration parameters: EnforcedStyle.
68
+ # SupportedStyles: leading, trailing
69
+ Layout/DotPosition:
70
+ Exclude:
71
+ - "lib/impressionist/counter_cache.rb"
72
+ - "lib/impressionist/models/active_record/impressionist/impressionable.rb"
73
+ - "lib/impressionist/models/mongoid/impressionist/impressionable.rb"
74
+ - "lib/impressionist/setup_association.rb"
75
+ - "lib/impressionist/update_counters.rb"
76
+
77
+ # Offense count: 1
78
+ # Cop supports --auto-correct.
79
+ Layout/EmptyLineAfterGuardClause:
80
+ Exclude:
81
+ - "app/models/impressionist/bots.rb"
82
+
83
+ # Offense count: 1
84
+ # Cop supports --auto-correct.
85
+ # Configuration parameters: AllowAdjacentOneLineDefs, NumberOfEmptyLines.
86
+ Layout/EmptyLineBetweenDefs:
87
+ Exclude:
88
+ - "lib/impressionist/counter_cache.rb"
89
+
90
+ # Offense count: 6
91
+ # Cop supports --auto-correct.
92
+ Layout/EmptyLines:
93
+ Exclude:
94
+ - "Rakefile"
95
+ - "app/controllers/impressionist_controller.rb"
96
+ - "lib/impressionist/counter_cache.rb"
97
+ - "lib/impressionist/engine.rb"
98
+ - "lib/impressionist/models/mongoid/impressionist/impressionable.rb"
99
+
100
+ # Offense count: 1
101
+ # Cop supports --auto-correct.
102
+ # Configuration parameters: EnforcedStyle.
103
+ # SupportedStyles: around, only_before
104
+ Layout/EmptyLinesAroundAccessModifier:
105
+ Exclude:
106
+ - "lib/impressionist/setup_association.rb"
107
+
108
+ # Offense count: 6
109
+ # Cop supports --auto-correct.
110
+ # Configuration parameters: EnforcedStyle.
111
+ # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines, beginning_only, ending_only
112
+ Layout/EmptyLinesAroundClassBody:
113
+ Exclude:
114
+ - "lib/generators/impressionist_generator.rb"
115
+ - "lib/impressionist/engine.rb"
116
+ - "lib/impressionist/models/active_record/impression.rb"
117
+ - "lib/impressionist/models/mongoid/impression.rb"
118
+ - "lib/impressionist/rails_toggle.rb"
119
+ - "lib/impressionist/update_counters.rb"
120
+
121
+ # Offense count: 4
122
+ # Cop supports --auto-correct.
123
+ Layout/EmptyLinesAroundMethodBody:
124
+ Exclude:
125
+ - "app/controllers/impressionist_controller.rb"
126
+ - "lib/impressionist/counter_cache.rb"
127
+ - "lib/impressionist/models/mongoid/impressionist/impressionable.rb"
128
+ - "upgrade_migrations/version_0_3_0.rb"
129
+
130
+ # Offense count: 19
131
+ # Cop supports --auto-correct.
132
+ # Configuration parameters: EnforcedStyle.
133
+ # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
134
+ Layout/EmptyLinesAroundModuleBody:
135
+ Exclude:
136
+ - "app/models/impressionist/bots.rb"
137
+ - "app/models/impressionist/impressionable.rb"
138
+ - "lib/impressionist/counter_cache.rb"
139
+ - "lib/impressionist/is_impressionable.rb"
140
+ - "lib/impressionist/models/active_record/impressionist/impressionable.rb"
141
+ - "lib/impressionist/models/mongo_mapper/impressionist/impressionable.rb"
142
+ - "lib/impressionist/models/mongoid/impressionist/impressionable.rb"
143
+ - "lib/impressionist/rails_toggle.rb"
144
+ - "lib/impressionist/update_counters.rb"
145
+
146
+ # Offense count: 2
147
+ # Cop supports --auto-correct.
148
+ # Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
149
+ Layout/ExtraSpacing:
150
+ Exclude:
151
+ - "lib/impressionist/counter_cache.rb"
152
+
153
+ # Offense count: 1
154
+ # Cop supports --auto-correct.
155
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
156
+ # SupportedStyles: consistent, consistent_relative_to_receiver, special_for_inner_method_call, special_for_inner_method_call_in_parentheses
157
+ Layout/FirstArgumentIndentation:
158
+ Exclude:
159
+ - "lib/impressionist/controllers/mongoid/impressionist_controller.rb"
160
+
161
+ # Offense count: 1
162
+ # Cop supports --auto-correct.
163
+ # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
164
+ # SupportedHashRocketStyles: key, separator, table
165
+ # SupportedColonStyles: key, separator, table
166
+ # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
167
+ Layout/HashAlignment:
168
+ Exclude:
169
+ - "lib/impressionist/controllers/mongoid/impressionist_controller.rb"
170
+
171
+ # Offense count: 18
172
+ # Cop supports --auto-correct.
173
+ # Configuration parameters: EnforcedStyle.
174
+ # SupportedStyles: normal, indented_internal_methods
175
+ Layout/IndentationConsistency:
176
+ Exclude:
177
+ - "lib/impressionist/counter_cache.rb"
178
+ - "lib/impressionist/engine.rb"
179
+ - "lib/impressionist/models/mongoid/impressionist/impressionable.rb"
180
+ - "lib/impressionist/rails_toggle.rb"
181
+ - "lib/impressionist/setup_association.rb"
182
+
183
+ # Offense count: 8
184
+ # Cop supports --auto-correct.
185
+ # Configuration parameters: IndentationWidth, EnforcedStyle.
186
+ # SupportedStyles: spaces, tabs
187
+ Layout/IndentationStyle:
188
+ Exclude:
189
+ - "lib/impressionist/controllers/mongoid/impressionist_controller.rb"
190
+
191
+ # Offense count: 24
192
+ # Cop supports --auto-correct.
193
+ # Configuration parameters: Width, IgnoredPatterns.
194
+ Layout/IndentationWidth:
195
+ Exclude:
196
+ - "app/models/impressionist/impressionable.rb"
197
+ - "lib/impressionist/controllers/mongoid/impressionist_controller.rb"
198
+ - "lib/impressionist/counter_cache.rb"
199
+ - "lib/impressionist/engine.rb"
200
+ - "lib/impressionist/models/active_record/impressionist/impressionable.rb"
201
+ - "lib/impressionist/models/mongo_mapper/impressionist/impressionable.rb"
202
+ - "lib/impressionist/models/mongoid/impressionist/impressionable.rb"
203
+ - "lib/impressionist/rails_toggle.rb"
204
+ - "lib/impressionist/setup_association.rb"
205
+
206
+ # Offense count: 2
207
+ # Cop supports --auto-correct.
208
+ # Configuration parameters: AllowDoxygenCommentStyle, AllowGemfileRubyComment.
209
+ Layout/LeadingCommentSpace:
210
+ Exclude:
211
+ - "app/controllers/impressionist_controller.rb"
212
+ - "lib/impressionist/bots.rb"
213
+
214
+ # Offense count: 6
215
+ # Cop supports --auto-correct.
216
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
217
+ # SupportedStyles: aligned, indented, indented_relative_to_receiver
218
+ Layout/MultilineMethodCallIndentation:
219
+ Exclude:
220
+ - "lib/impressionist/counter_cache.rb"
221
+ - "lib/impressionist/models/active_record/impressionist/impressionable.rb"
222
+ - "lib/impressionist/models/mongoid/impressionist/impressionable.rb"
223
+ - "lib/impressionist/setup_association.rb"
224
+ - "lib/impressionist/update_counters.rb"
225
+
226
+ # Offense count: 21
227
+ # Cop supports --auto-correct.
228
+ Layout/SpaceAfterComma:
229
+ Exclude:
230
+ - "app/controllers/impressionist_controller.rb"
231
+ - "app/models/impressionist/bots.rb"
232
+ - "lib/impressionist/bots.rb"
233
+ - "upgrade_migrations/version_0_3_0.rb"
234
+
235
+ # Offense count: 1
236
+ # Cop supports --auto-correct.
237
+ # Configuration parameters: EnforcedStyleInsidePipes.
238
+ # SupportedStylesInsidePipes: space, no_space
239
+ Layout/SpaceAroundBlockParameters:
240
+ Exclude:
241
+ - "app/controllers/impressionist_controller.rb"
242
+
243
+ # Offense count: 13
244
+ # Cop supports --auto-correct.
245
+ # Configuration parameters: EnforcedStyle.
246
+ # SupportedStyles: space, no_space
247
+ Layout/SpaceAroundEqualsInParameterDefault:
248
+ Exclude:
249
+ - "app/controllers/impressionist_controller.rb"
250
+ - "app/models/impressionist/impressionable.rb"
251
+ - "lib/impressionist/controllers/mongoid/impressionist_controller.rb"
252
+ - "lib/impressionist/counter_cache.rb"
253
+ - "lib/impressionist/is_impressionable.rb"
254
+ - "lib/impressionist/models/mongo_mapper/impressionist/impressionable.rb"
255
+ - "lib/impressionist/models/mongoid/impressionist/impressionable.rb"
256
+
257
+ # Offense count: 5
258
+ # Cop supports --auto-correct.
259
+ # Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator.
260
+ # SupportedStylesForExponentOperator: space, no_space
261
+ Layout/SpaceAroundOperators:
262
+ Exclude:
263
+ - "app/controllers/impressionist_controller.rb"
264
+ - "lib/impressionist/controllers/mongoid/impressionist_controller.rb"
265
+ - "lib/impressionist/counter_cache.rb"
266
+ - "lib/impressionist/models/mongo_mapper/impression.rb"
267
+
268
+ # Offense count: 2
269
+ # Cop supports --auto-correct.
270
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
271
+ # SupportedStyles: space, no_space
272
+ # SupportedStylesForEmptyBraces: space, no_space
273
+ Layout/SpaceBeforeBlockBraces:
274
+ Exclude:
275
+ - "app/controllers/impressionist_controller.rb"
276
+
277
+ # Offense count: 3
278
+ # Cop supports --auto-correct.
279
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
280
+ # SupportedStyles: space, no_space
281
+ # SupportedStylesForEmptyBraces: space, no_space
282
+ Layout/SpaceInsideBlockBraces:
283
+ Exclude:
284
+ - "app/controllers/impressionist_controller.rb"
285
+
286
+ # Offense count: 4
287
+ # Cop supports --auto-correct.
288
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
289
+ # SupportedStyles: space, no_space, compact
290
+ # SupportedStylesForEmptyBraces: space, no_space
291
+ Layout/SpaceInsideHashLiteralBraces:
292
+ Exclude:
293
+ - "app/controllers/impressionist_controller.rb"
294
+ - "lib/impressionist/update_counters.rb"
295
+
296
+ # Offense count: 3
297
+ # Cop supports --auto-correct.
298
+ # Configuration parameters: EnforcedStyle.
299
+ # SupportedStyles: final_newline, final_blank_line
300
+ Layout/TrailingEmptyLines:
301
+ Exclude:
302
+ - "Gemfile"
303
+ - "lib/impressionist/setup_association.rb"
304
+ - "upgrade_migrations/version_1_5_2.rb"
305
+
306
+ # Offense count: 1
307
+ # Cop supports --auto-correct.
308
+ # Configuration parameters: AllowInHeredoc.
309
+ Layout/TrailingWhitespace:
310
+ Exclude:
311
+ - "lib/impressionist/setup_association.rb"
312
+
313
+ # Offense count: 1
314
+ Lint/DuplicateMethods:
315
+ Exclude:
316
+ - "lib/impressionist/setup_association.rb"
317
+
318
+ # Offense count: 1
319
+ # Cop supports --auto-correct.
320
+ Lint/RedundantStringCoercion:
321
+ Exclude:
322
+ - "app/controllers/impressionist_controller.rb"
323
+
324
+ # Offense count: 2
325
+ # Cop supports --auto-correct.
326
+ Lint/SendWithMixinArgument:
327
+ Exclude:
328
+ - "lib/impressionist/models/active_record/impressionist/impressionable.rb"
329
+ - "lib/impressionist/models/mongoid/impressionist/impressionable.rb"
330
+
331
+ # Offense count: 1
332
+ # Cop supports --auto-correct.
333
+ # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
334
+ Lint/UnusedBlockArgument:
335
+ Exclude:
336
+ - "lib/impressionist/engine.rb"
337
+
338
+ # Offense count: 3
339
+ # Configuration parameters: IgnoredMethods.
340
+ Metrics/AbcSize:
341
+ Max: 23
342
+
343
+ # Offense count: 11
344
+ # Configuration parameters: CountComments, ExcludedMethods.
345
+ # ExcludedMethods: refine
346
+ Metrics/BlockLength:
347
+ Max: 336
348
+
349
+ # Offense count: 3
350
+ # Configuration parameters: CountComments, ExcludedMethods.
351
+ Metrics/MethodLength:
352
+ Max: 15
353
+
354
+ # Offense count: 2
355
+ # Configuration parameters: CountComments.
356
+ Metrics/ModuleLength:
357
+ Max: 1462
358
+
359
+ # Offense count: 2
360
+ # Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros.
361
+ # NamePrefix: is_, has_, have_
362
+ # ForbiddenPrefixes: is_, has_, have_
363
+ # AllowedMethods: is_a?
364
+ # MethodDefinitionMacros: define_method, define_singleton_method
365
+ Naming/PredicateName:
366
+ Exclude:
367
+ - "spec/**/*"
368
+ - "lib/impressionist/is_impressionable.rb"
369
+ - "lib/impressionist/models/mongo_mapper/impressionist/impressionable.rb"
370
+
371
+ # Offense count: 6
372
+ # Configuration parameters: Prefixes.
373
+ # Prefixes: when, with, without
374
+ RSpec/ContextWording:
375
+ Exclude:
376
+ - "spec/controllers/impressionist_uniqueness_spec.rb"
377
+ - "spec/controllers/widgets_controller_spec.rb"
378
+
379
+ # Offense count: 31
380
+ # Configuration parameters: Max.
381
+ RSpec/ExampleLength:
382
+ Exclude:
383
+ - "spec/controllers/articles_controller_spec.rb"
384
+ - "spec/controllers/impressionist_uniqueness_spec.rb"
385
+ - "spec/controllers/posts_controller_spec.rb"
386
+ - "spec/controllers/widgets_controller_spec.rb"
387
+ - "spec/rails_generators/rails_generators_spec.rb"
388
+ - "spec/setup_association_spec.rb"
389
+
390
+ # Offense count: 5
391
+ # Configuration parameters: CustomTransform, IgnoreMethods.
392
+ RSpec/FilePath:
393
+ Exclude:
394
+ - "spec/bots_spec.rb"
395
+ - "spec/controllers/impressionist_uniqueness_spec.rb"
396
+ - "spec/models/bots_spec.rb"
397
+ - "spec/rails_toggle_spec.rb"
398
+ - "spec/setup_association_spec.rb"
399
+
400
+ # Offense count: 77
401
+ # Configuration parameters: AssignmentOnly.
402
+ RSpec/InstanceVariable:
403
+ Exclude:
404
+ - "spec/controllers/articles_controller_spec.rb"
405
+ - "spec/controllers/impressionist_uniqueness_spec.rb"
406
+ - "spec/controllers/widgets_controller_spec.rb"
407
+ - "spec/model_spec.rb"
408
+ - "spec/models/model_spec.rb"
409
+
410
+ # Offense count: 5
411
+ # Configuration parameters: .
412
+ # SupportedStyles: have_received, receive
413
+ RSpec/MessageSpies:
414
+ EnforcedStyle: receive
415
+
416
+ # Offense count: 29
417
+ # Configuration parameters: AggregateFailuresByDefault.
418
+ RSpec/MultipleExpectations:
419
+ Max: 8
420
+
421
+ # Offense count: 4
422
+ RSpec/NestedGroups:
423
+ Max: 4
424
+
425
+ # Offense count: 2
426
+ RSpec/RepeatedExample:
427
+ Exclude:
428
+ - "spec/controllers/widgets_controller_spec.rb"
429
+
430
+ # Offense count: 1
431
+ # Cop supports --auto-correct.
432
+ # Configuration parameters: EnforcedStyle, Include.
433
+ # SupportedStyles: action, filter
434
+ # Include: app/controllers/**/*.rb
435
+ Rails/ActionFilter:
436
+ Exclude:
437
+ - "app/controllers/impressionist_controller.rb"
438
+
439
+ # Offense count: 1
440
+ # Cop supports --auto-correct.
441
+ Rails/ApplicationRecord:
442
+ Exclude:
443
+ - "lib/impressionist/models/active_record/impression.rb"
444
+
445
+ # Offense count: 1
446
+ # Cop supports --auto-correct.
447
+ # Configuration parameters: NotNilAndNotEmpty, NotBlank, UnlessBlank.
448
+ Rails/Present:
449
+ Exclude:
450
+ - "app/controllers/impressionist_controller.rb"
451
+
452
+ # Offense count: 1
453
+ # Configuration parameters: Include.
454
+ # Include: **/Rakefile, **/*.rake
455
+ Rails/RakeEnvironment:
456
+ Exclude:
457
+ - "lib/capistrano/tasks/**/*.rake"
458
+ - "Rakefile"
459
+
460
+ # Offense count: 1
461
+ # Configuration parameters: Blacklist, Whitelist.
462
+ # Blacklist: decrement!, decrement_counter, increment!, increment_counter, toggle!, touch, update_all, update_attribute, update_column, update_columns, update_counters
463
+ Rails/SkipsModelValidations:
464
+ Exclude:
465
+ - "lib/impressionist/update_counters.rb"
466
+
467
+ # Offense count: 2
468
+ # Cop supports --auto-correct.
469
+ # Configuration parameters: EnforcedStyle.
470
+ # SupportedStyles: strict, flexible
471
+ Rails/TimeZone:
472
+ Exclude:
473
+ - "app/models/impressionist/impressionable.rb"
474
+ - "lib/impressionist/models/mongoid/impressionist/impressionable.rb"
475
+
476
+ # Offense count: 1
477
+ # Cop supports --auto-correct.
478
+ # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
479
+ # SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
480
+ # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
481
+ # FunctionalMethods: let, let!, subject, watch
482
+ # IgnoredMethods: lambda, proc, it
483
+ Style/BlockDelimiters:
484
+ Exclude:
485
+ - "lib/impressionist/counter_cache.rb"
486
+
487
+ # Offense count: 1
488
+ Style/ClassVars:
489
+ Exclude:
490
+ - "lib/impressionist.rb"
491
+
492
+ # Offense count: 1
493
+ Style/CommentedKeyword:
494
+ Exclude:
495
+ - "app/models/impressionist/impressionable.rb"
496
+
497
+ # Offense count: 1
498
+ # Cop supports --auto-correct.
499
+ # Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
500
+ # SupportedStyles: assign_to_condition, assign_inside_condition
501
+ Style/ConditionalAssignment:
502
+ Exclude:
503
+ - "app/controllers/impressionist_controller.rb"
504
+
505
+ # Offense count: 24
506
+ Style/Documentation:
507
+ Enabled: false
508
+
509
+ # Offense count: 1
510
+ # Cop supports --auto-correct.
511
+ Style/EachWithObject:
512
+ Exclude:
513
+ - "app/controllers/impressionist_controller.rb"
514
+
515
+ # Offense count: 1
516
+ # Cop supports --auto-correct.
517
+ Style/ExpandPathArguments:
518
+ Exclude:
519
+ - "lib/generators/impressionist_generator.rb"
520
+
521
+ # Offense count: 1
522
+ # Cop supports --auto-correct.
523
+ # Configuration parameters: EnforcedStyle.
524
+ # SupportedStyles: format, sprintf, percent
525
+ Style/FormatString:
526
+ Exclude:
527
+ - "lib/generators/active_record/impressionist_generator.rb"
528
+
529
+ # Offense count: 1
530
+ # Configuration parameters: EnforcedStyle.
531
+ # SupportedStyles: annotated, template, unannotated
532
+ Style/FormatStringToken:
533
+ Exclude:
534
+ - "lib/generators/active_record/impressionist_generator.rb"
535
+
536
+ # Offense count: 41
537
+ # Cop supports --auto-correct.
538
+ # Configuration parameters: EnforcedStyle.
539
+ # SupportedStyles: always, always_true, never
540
+ Style/FrozenStringLiteralComment:
541
+ Enabled: false
542
+
543
+ # Offense count: 3
544
+ # Configuration parameters: MinBodyLength.
545
+ Style/GuardClause:
546
+ Exclude:
547
+ - "app/controllers/impressionist_controller.rb"
548
+
549
+ # Offense count: 136
550
+ # Cop supports --auto-correct.
551
+ # Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
552
+ # SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
553
+ Style/HashSyntax:
554
+ Enabled: false
555
+
556
+ # Offense count: 3
557
+ # Cop supports --auto-correct.
558
+ Style/IfUnlessModifier:
559
+ Exclude:
560
+ - "app/controllers/impressionist_controller.rb"
561
+ - "app/models/impressionist/impressionable.rb"
562
+
563
+ # Offense count: 1
564
+ Style/MultilineTernaryOperator:
565
+ Exclude:
566
+ - "lib/impressionist/models/mongoid/impressionist/impressionable.rb"
567
+
568
+ # Offense count: 5
569
+ # Cop supports --auto-correct.
570
+ # Configuration parameters: EnforcedStyle.
571
+ # SupportedStyles: literals, strict
572
+ Style/MutableConstant:
573
+ Exclude:
574
+ - "app/models/impressionist/bots.rb"
575
+ - "app/models/impressionist/impressionable.rb"
576
+ - "lib/impressionist/bots.rb"
577
+ - "lib/impressionist/version.rb"
578
+
579
+ # Offense count: 1
580
+ # Cop supports --auto-correct.
581
+ Style/Not:
582
+ Exclude:
583
+ - "lib/impressionist/rails_toggle.rb"
584
+
585
+ # Offense count: 1
586
+ # Cop supports --auto-correct.
587
+ # Configuration parameters: Strict.
588
+ Style/NumericLiterals:
589
+ MinDigits: 6
590
+
591
+ # Offense count: 1
592
+ # Cop supports --auto-correct.
593
+ Style/RedundantBegin:
594
+ Exclude:
595
+ - "lib/impressionist/counter_cache.rb"
596
+
597
+ # Offense count: 2
598
+ # Cop supports --auto-correct.
599
+ # Configuration parameters: AllowMultipleReturnValues.
600
+ Style/RedundantReturn:
601
+ Exclude:
602
+ - "app/controllers/impressionist_controller.rb"
603
+
604
+ # Offense count: 4
605
+ # Cop supports --auto-correct.
606
+ Style/RedundantSelf:
607
+ Exclude:
608
+ - "app/controllers/impressionist_controller.rb"
609
+ - "lib/impressionist/counter_cache.rb"
610
+
611
+ # Offense count: 2
612
+ # Cop supports --auto-correct.
613
+ Style/RescueModifier:
614
+ Exclude:
615
+ - "app/controllers/impressionist_controller.rb"
616
+
617
+ # Offense count: 1670
618
+ # Cop supports --auto-correct.
619
+ # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
620
+ # SupportedStyles: single_quotes, double_quotes
621
+ Style/StringLiterals:
622
+ Enabled: false
623
+
624
+ # Offense count: 40
625
+ # Cop supports --auto-correct.
626
+ # Configuration parameters: MinSize.
627
+ # SupportedStyles: percent, brackets
628
+ Style/SymbolArray:
629
+ EnforcedStyle: brackets
630
+
631
+ # Offense count: 1
632
+ # Cop supports --auto-correct.
633
+ # Configuration parameters: IgnoredMethods.
634
+ # IgnoredMethods: respond_to, define_method
635
+ Style/SymbolProc:
636
+ Exclude:
637
+ - "app/controllers/impressionist_controller.rb"
638
+
639
+ # Offense count: 1
640
+ # Cop supports --auto-correct.
641
+ # Configuration parameters: EnforcedStyle, AllowSafeAssignment.
642
+ # SupportedStyles: require_parentheses, require_no_parentheses, require_parentheses_when_complex
643
+ Style/TernaryParentheses:
644
+ Exclude:
645
+ - "lib/impressionist/controllers/mongoid/impressionist_controller.rb"
646
+
647
+ # Offense count: 2
648
+ # Cop supports --auto-correct.
649
+ # Configuration parameters: MinSize, WordRegex.
650
+ # SupportedStyles: percent, brackets
651
+ Style/WordArray:
652
+ EnforcedStyle: brackets
653
+
654
+ # Offense count: 401
655
+ # Cop supports --auto-correct.
656
+ # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
657
+ # URISchemes: http, https
658
+ Layout/LineLength:
659
+ Max: 197
660
+