solidus_reviews 1.2.0 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +6 -0
  3. data/.gem_release.yml +5 -0
  4. data/.gitignore +13 -6
  5. data/.rspec +1 -1
  6. data/.rubocop.yml +3 -321
  7. data/.rubocop_todo.yml +197 -0
  8. data/CHANGELOG.md +155 -0
  9. data/Gemfile +14 -17
  10. data/{LICENSE.md → LICENSE} +1 -1
  11. data/README.md +63 -41
  12. data/Rakefile +3 -20
  13. data/app/assets/stylesheets/spree/frontend/solidus_reviews.css +4 -0
  14. data/app/controllers/spree/feedback_reviews_controller.rb +2 -8
  15. data/app/controllers/spree/reviews_controller.rb +29 -2
  16. data/app/decorators/controllers/solidus_reviews/spree/{admin/products_controller_decorator.rb → products_controller_decorator.rb} +0 -4
  17. data/app/decorators/models/solidus_reviews/spree/product_decorator.rb +6 -5
  18. data/app/helpers/spree/reviews_helper.rb +6 -6
  19. data/app/models/spree/feedback_review.rb +2 -2
  20. data/app/models/spree/permission_sets/review_display.rb +11 -0
  21. data/app/models/spree/permission_sets/review_management.rb +11 -0
  22. data/app/models/spree/review.rb +25 -10
  23. data/app/models/spree/reviews_ability.rb +7 -2
  24. data/app/models/spree/reviews_configuration.rb +10 -1
  25. data/app/overrides/add_reviews_tab_to_admin.rb +12 -4
  26. data/app/overrides/add_reviews_to_admin_configuration_sidebar.rb +12 -5
  27. data/app/views/spree/admin/review_settings/edit.html.erb +7 -0
  28. data/app/views/spree/admin/reviews/edit.html.erb +4 -2
  29. data/app/views/spree/admin/reviews/index.html.erb +9 -5
  30. data/app/views/spree/api/reviews/_feedback_review.json.jbuilder +1 -1
  31. data/app/views/spree/api/reviews/_review.json.jbuilder +1 -1
  32. data/app/views/spree/reviews/_form.html.erb +6 -4
  33. data/app/views/spree/reviews/edit.html.erb +3 -0
  34. data/app/views/spree/shared/_review.html.erb +6 -4
  35. data/bin/console +17 -0
  36. data/bin/rails +5 -5
  37. data/bin/rails-engine +13 -0
  38. data/bin/rails-sandbox +16 -0
  39. data/bin/rake +7 -0
  40. data/bin/sandbox +86 -0
  41. data/bin/setup +8 -0
  42. data/config/locales/de-CH.yml +1 -1
  43. data/config/locales/de.yml +1 -1
  44. data/config/locales/en-GB.yml +2 -1
  45. data/config/locales/en.yml +2 -1
  46. data/config/locales/es.yml +2 -1
  47. data/config/locales/fr.yml +1 -1
  48. data/config/locales/it.yml +1 -1
  49. data/config/locales/pl.yml +1 -1
  50. data/config/locales/pt-BR.yml +1 -1
  51. data/config/locales/pt.yml +1 -1
  52. data/config/locales/ro.yml +1 -1
  53. data/config/locales/sv.yml +1 -1
  54. data/config/locales/tr.yml +1 -1
  55. data/config/locales/uk.yml +1 -1
  56. data/config/locales/zh-CN.yml +1 -1
  57. data/config/locales/zh-TW.yml +1 -1
  58. data/config/routes.rb +3 -1
  59. data/db/migrate/20120123141326_recalculate_ratings.rb +1 -2
  60. data/db/migrate/20190613165528_add_verified_purchaser_to_reviews.rb +2 -0
  61. data/lib/controllers/spree/api/feedback_reviews_controller.rb +91 -0
  62. data/lib/controllers/spree/api/reviews_controller.rb +16 -14
  63. data/lib/generators/solidus_reviews/install/install_generator.rb +8 -7
  64. data/lib/solidus_reviews/engine.rb +26 -0
  65. data/lib/solidus_reviews/version.rb +5 -0
  66. data/lib/solidus_reviews.rb +4 -4
  67. data/solidus_reviews.gemspec +31 -34
  68. data/spec/controllers/spree/admin/feedback_reviews_controller_spec.rb +1 -1
  69. data/spec/controllers/spree/admin/review_settings_controller_spec.rb +3 -4
  70. data/spec/controllers/spree/admin/reviews_controller_spec.rb +3 -3
  71. data/spec/controllers/spree/api/feedback_reviews_controller_spec.rb +136 -0
  72. data/spec/controllers/spree/api/reviews_controller_spec.rb +27 -25
  73. data/spec/controllers/spree/feedback_reviews_controller_spec.rb +8 -8
  74. data/spec/controllers/spree/reviews_controller_spec.rb +145 -8
  75. data/spec/features/admin_spec.rb +6 -6
  76. data/spec/features/reviews_spec.rb +33 -32
  77. data/spec/fixtures/thinking-cat.jpg +0 -0
  78. data/spec/models/feedback_review_spec.rb +13 -13
  79. data/spec/models/product_spec.rb +13 -10
  80. data/spec/models/review_spec.rb +64 -41
  81. data/spec/models/reviews_ability_spec.rb +14 -14
  82. data/spec/models/reviews_configuration_spec.rb +21 -10
  83. data/spec/spec_helper.rb +18 -13
  84. data/spec/support/config.rb +7 -0
  85. data/spec/support/factories.rb +3 -0
  86. metadata +52 -213
  87. data/CONTRIBUTING.md +0 -28
  88. data/lib/spree_reviews/engine.rb +0 -22
  89. data/spec/controllers/spree/products_controller_spec.rb +0 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6fc709261f34b4979904d11cceeb17b22a57be36089f37f77dea475262506c24
4
- data.tar.gz: 9a3b6b6f70b0867534f634426da005d312db19e21d5633bb9e5ca2e8ab6ba3ec
3
+ metadata.gz: f17ce08e72bf0a578195dda4763786e80ca5ce9b2f9126db7790f3f1571efa10
4
+ data.tar.gz: 7ffc6b1fd506cb9d21d5922f5fb049e1574d884ee184e7070a1ae76b3e3eb88a
5
5
  SHA512:
6
- metadata.gz: 8c4eaa7f6e301a830b196bd194c897a670a8c193607fe98542890625ed6a3d19b54c7ce8b8df9678ba45bc3db114b0a358c58d053a93be0e438b4fa6354939fe
7
- data.tar.gz: e2d8efba5a9ba5602318c40e1bcccb16291f49a68c577e76acf2db42b37e879bb9adfcbc56367b47dbfa84092964bdfe199e7aacb47b85c071c94d134c7906e4
6
+ metadata.gz: 959becf7cbddb80453025ac7601fa6aa25349849707455839040587612a505c014df75469d529249daba670414bf24e886b355da0426eb60ba3102bc45be38dc
7
+ data.tar.gz: d1e7b71a6aad1548bbedef2d40bbbd986ed39b20c1b6133d8ae73decb7cf7c135923c449cb26ce5d221a2604d8d578867ddba9695d116840ea05718705baacfc
data/.circleci/config.yml CHANGED
@@ -16,12 +16,18 @@ jobs:
16
16
  executor: solidusio_extensions/mysql
17
17
  steps:
18
18
  - solidusio_extensions/run-tests
19
+ lint-code:
20
+ executor: solidusio_extensions/sqlite-memory
21
+ steps:
22
+ - solidusio_extensions/lint-code
19
23
 
20
24
  workflows:
21
25
  "Run specs on supported Solidus versions":
22
26
  jobs:
23
27
  - run-specs-with-postgres
24
28
  - run-specs-with-mysql
29
+ - lint-code
30
+
25
31
  "Weekly run specs against master":
26
32
  triggers:
27
33
  - schedule:
data/.gem_release.yml ADDED
@@ -0,0 +1,5 @@
1
+ bump:
2
+ recurse: false
3
+ file: 'lib/solidus_reviews/version.rb'
4
+ message: Bump SolidusReviews to %{version}
5
+ tag: true
data/.gitignore CHANGED
@@ -1,13 +1,20 @@
1
1
  *.gem
2
- *.swp
3
- .bundle
4
- .idea
2
+ \#*
3
+ *~
4
+ .#*
5
5
  .DS_Store
6
+ .idea
7
+ .project
8
+ .sass-cache
9
+ coverage
6
10
  Gemfile.lock
7
- pkg/*
11
+ tmp
12
+ nbproject
13
+ pkg
14
+ *.swp
8
15
  spec/dummy
9
- coverage
16
+ spec/examples.txt
17
+ /sandbox
10
18
  .rvmrc
11
19
  .ruby-version
12
20
  .ruby-gemset
13
- spec/examples.txt
data/.rspec CHANGED
@@ -1,2 +1,2 @@
1
1
  --color
2
- -f documentation
2
+ --require spec_helper
data/.rubocop.yml CHANGED
@@ -1,322 +1,4 @@
1
- # Relaxed.Ruby.Style
1
+ inherit_from: .rubocop_todo.yml
2
2
 
3
- AllCops:
4
- Exclude:
5
- - 'vendor/**/*'
6
- - '**/vendor/**/*'
7
- - '*/spec/dummy/**/*'
8
- - 'sandbox/**/*'
9
- - '**/templates/**/*'
10
- TargetRubyVersion: 2.2
11
-
12
- # Sometimes I believe this reads better
13
- # This also causes spacing issues on multi-line fixes
14
- Style/BracesAroundHashParameters:
15
- Enabled: false
16
-
17
- # We use class vars and will have to continue doing so for compatability
18
- Style/ClassVars:
19
- Enabled: false
20
-
21
- # We need these names for backwards compatability
22
- Naming/PredicateName:
23
- Enabled: false
24
-
25
- Naming/AccessorMethodName:
26
- Enabled: false
27
-
28
- # This has been used for customization
29
- Style/MutableConstant:
30
- Enabled: false
31
-
32
- Style/ClassAndModuleChildren:
33
- Enabled: false
34
-
35
- Style/EmptyElse:
36
- Enabled: false
37
-
38
- Style/GuardClause:
39
- Enabled: false
40
-
41
- Style/Next:
42
- Enabled: false
43
-
44
- Style/NumericPredicate:
45
- Enabled: false
46
-
47
- Style/WordArray:
48
- Enabled: false
49
-
50
- Style/ConditionalAssignment:
51
- Enabled: false
52
-
53
- Performance/Count:
54
- Enabled: false
55
-
56
- Style/RaiseArgs:
57
- Enabled: false
58
-
59
- Naming/BinaryOperatorParameterName:
60
- Enabled: false
61
-
62
- # We can use good judgement here
63
- Style/RegexpLiteral:
64
- Enabled: false
65
-
66
- # Unicode comments are useful
67
- Style/AsciiComments:
68
- Enabled: false
69
-
70
- Layout/EndAlignment:
71
- Enabled: false
72
-
73
- Layout/ElseAlignment:
74
- Enabled: false
75
-
76
- Layout/IndentationWidth:
77
- Enabled: false
78
-
79
- Layout/AlignParameters:
80
- Enabled: false
81
-
82
- Layout/ClosingParenthesisIndentation:
83
- Enabled: false
84
-
85
- Layout/MultilineMethodCallIndentation:
86
- Enabled: false
87
-
88
- Layout/IndentArray:
89
- Enabled: false
90
-
91
- Layout/IndentHash:
92
- Enabled: false
93
-
94
- Layout/AlignHash:
95
- Enabled: false
96
-
97
- Style/TrailingCommaInArguments:
98
- Enabled: false
99
-
100
- Style/TrailingCommaInArrayLiteral:
101
- Enabled: false
102
-
103
- Style/TrailingCommaInHashLiteral:
104
- Enabled: false
105
-
106
- # Symbol Arrays are ok and the %i syntax widely unknown
107
- Style/SymbolArray:
108
- Enabled: false
109
-
110
- Rails/DynamicFindBy:
111
- Whitelist:
112
- - find_by_param
113
- - find_by_param!
114
-
115
- # We use a lot of
116
- #
117
- # expect {
118
- # something
119
- # }.to { happen }
120
- #
121
- # syntax in the specs files.
122
- Lint/AmbiguousBlockAssociation:
123
- Exclude:
124
- - '*/spec/**/*'
125
- - 'spec/**/*' # For the benefit of apps that inherit from this config
126
-
127
- # We use eval to add common_spree_dependencies into the Gemfiles of each of our gems
128
- Security/Eval:
129
- Exclude:
130
- - 'Gemfile'
131
- - 'common_spree_dependencies.rb'
132
- - '*/Gemfile'
133
-
134
- Naming/VariableNumber:
135
- Enabled: false
136
-
137
- # Write empty methods as you wish.
138
- Style/EmptyMethod:
139
- Enabled: false
140
-
141
- # From http://relaxed.ruby.style/
142
-
143
- Style/Alias:
144
- Enabled: false
145
- StyleGuide: http://relaxed.ruby.style/#stylealias
146
-
147
- Style/BeginBlock:
148
- Enabled: false
149
- StyleGuide: http://relaxed.ruby.style/#stylebeginblock
150
-
151
- Style/BlockDelimiters:
152
- Enabled: false
153
- StyleGuide: http://relaxed.ruby.style/#styleblockdelimiters
154
-
155
- Style/Documentation:
156
- Enabled: false
157
- StyleGuide: http://relaxed.ruby.style/#styledocumentation
158
-
159
- Layout/DotPosition:
160
- Enabled: false
161
- StyleGuide: http://relaxed.ruby.style/#styledotposition
162
-
163
- Style/DoubleNegation:
164
- Enabled: false
165
- StyleGuide: http://relaxed.ruby.style/#styledoublenegation
166
-
167
- Style/EndBlock:
168
- Enabled: false
169
- StyleGuide: http://relaxed.ruby.style/#styleendblock
170
-
171
- Style/FormatString:
172
- Enabled: false
173
- StyleGuide: http://relaxed.ruby.style/#styleformatstring
174
-
175
- Style/IfUnlessModifier:
176
- Enabled: false
177
- StyleGuide: http://relaxed.ruby.style/#styleifunlessmodifier
178
-
179
- Style/Lambda:
180
- Enabled: false
181
- StyleGuide: http://relaxed.ruby.style/#stylelambda
182
-
183
- Style/ModuleFunction:
184
- Enabled: false
185
- StyleGuide: http://relaxed.ruby.style/#stylemodulefunction
186
-
187
- Style/MultilineBlockChain:
188
- Enabled: false
189
- StyleGuide: http://relaxed.ruby.style/#stylemultilineblockchain
190
-
191
- Style/NegatedIf:
192
- Enabled: false
193
- StyleGuide: http://relaxed.ruby.style/#stylenegatedif
194
-
195
- Style/NegatedWhile:
196
- Enabled: false
197
- StyleGuide: http://relaxed.ruby.style/#stylenegatedwhile
198
-
199
- Style/ParallelAssignment:
200
- Enabled: false
201
- StyleGuide: http://relaxed.ruby.style/#styleparallelassignment
202
-
203
- Style/PercentLiteralDelimiters:
204
- Enabled: false
205
- StyleGuide: http://relaxed.ruby.style/#stylepercentliteraldelimiters
206
-
207
- Style/PerlBackrefs:
208
- Enabled: false
209
- StyleGuide: http://relaxed.ruby.style/#styleperlbackrefs
210
-
211
- Style/Semicolon:
212
- Enabled: false
213
- StyleGuide: http://relaxed.ruby.style/#stylesemicolon
214
-
215
- Style/SignalException:
216
- Enabled: false
217
- StyleGuide: http://relaxed.ruby.style/#stylesignalexception
218
-
219
- Style/SingleLineBlockParams:
220
- Enabled: false
221
- StyleGuide: http://relaxed.ruby.style/#stylesinglelineblockparams
222
-
223
- Style/SingleLineMethods:
224
- Enabled: false
225
- StyleGuide: http://relaxed.ruby.style/#stylesinglelinemethods
226
-
227
- Layout/SpaceBeforeBlockBraces:
228
- Enabled: false
229
- StyleGuide: http://relaxed.ruby.style/#stylespacebeforeblockbraces
230
-
231
- Layout/SpaceInsideParens:
232
- Enabled: false
233
- StyleGuide: http://relaxed.ruby.style/#stylespaceinsideparens
234
-
235
- Style/SpecialGlobalVars:
236
- Enabled: false
237
- StyleGuide: http://relaxed.ruby.style/#stylespecialglobalvars
238
-
239
- Style/StringLiterals:
240
- Enabled: false
241
- StyleGuide: http://relaxed.ruby.style/#stylestringliterals
242
-
243
- Style/SymbolProc:
244
- Enabled: false
245
-
246
- Style/TernaryParentheses:
247
- Enabled: false
248
-
249
- Style/WhileUntilModifier:
250
- Enabled: false
251
- StyleGuide: http://relaxed.ruby.style/#stylewhileuntilmodifier
252
-
253
- Lint/AmbiguousRegexpLiteral:
254
- Enabled: false
255
- StyleGuide: http://relaxed.ruby.style/#lintambiguousregexpliteral
256
-
257
- Lint/AssignmentInCondition:
258
- Enabled: false
259
- StyleGuide: http://relaxed.ruby.style/#lintassignmentincondition
260
-
261
- Metrics/AbcSize:
262
- Enabled: false
263
-
264
- Metrics/BlockNesting:
265
- Enabled: false
266
-
267
- Metrics/ClassLength:
268
- Enabled: false
269
-
270
- Metrics/ModuleLength:
271
- Enabled: false
272
-
273
- Metrics/BlockLength:
274
- Enabled: false
275
-
276
- Metrics/CyclomaticComplexity:
277
- Enabled: false
278
-
279
- Metrics/LineLength:
280
- Enabled: false
281
-
282
- Metrics/MethodLength:
283
- Enabled: false
284
-
285
- Metrics/ParameterLists:
286
- Enabled: false
287
-
288
- Metrics/PerceivedComplexity:
289
- Enabled: false
290
-
291
- Bundler/OrderedGems:
292
- Enabled: false
293
-
294
- Style/NumericLiterals:
295
- Enabled: false
296
-
297
- Style/FrozenStringLiteralComment:
298
- Enabled: true
299
- EnforcedStyle: always
300
-
301
- # json.() is idiomatic in jbuilder files
302
- Style/LambdaCall:
303
- Enabled: false
304
-
305
- Naming/UncommunicativeMethodParamName:
306
- AllowedNames:
307
- - id
308
- - to
309
- - _
310
-
311
- # Rubocop doesn't understand side-effects
312
- Style/IdenticalConditionalBranches:
313
- Enabled: false
314
-
315
- Naming/MemoizedInstanceVariableName:
316
- Enabled: false
317
-
318
- Lint/UselessComparison:
319
- Enabled: false
320
-
321
- Lint/HandleExceptions:
322
- Enabled: false
3
+ require:
4
+ - solidus_dev_support/rubocop
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,197 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2020-09-11 09:54:47 UTC using RuboCop version 0.87.1.
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
+ # Cop supports --auto-correct.
11
+ Lint/RedundantCopDisableDirective:
12
+ Exclude:
13
+ - 'lib/generators/solidus_reviews/install/install_generator.rb'
14
+
15
+ # Offense count: 1
16
+ # Configuration parameters: EnforcedStyleForLeadingUnderscores.
17
+ # SupportedStylesForLeadingUnderscores: disallowed, required, optional
18
+ Naming/MemoizedInstanceVariableName:
19
+ Exclude:
20
+ - 'app/controllers/spree/feedback_reviews_controller.rb'
21
+
22
+ # Offense count: 2
23
+ # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
24
+ # AllowedNames: io, id, to, by, on, in, at, ip, db, os, pp
25
+ Naming/MethodParameterName:
26
+ Exclude:
27
+ - 'app/helpers/spree/reviews_helper.rb'
28
+
29
+ # Offense count: 17
30
+ # Configuration parameters: EnforcedStyle.
31
+ # SupportedStyles: snake_case, normalcase, non_integer
32
+ Naming/VariableNumber:
33
+ Exclude:
34
+ - 'spec/controllers/spree/admin/feedback_reviews_controller_spec.rb'
35
+ - 'spec/models/feedback_review_spec.rb'
36
+ - 'spec/models/product_spec.rb'
37
+ - 'spec/models/review_spec.rb'
38
+
39
+ # Offense count: 3
40
+ RSpec/AnyInstance:
41
+ Exclude:
42
+ - 'spec/controllers/spree/admin/reviews_controller_spec.rb'
43
+ - 'spec/controllers/spree/reviews_controller_spec.rb'
44
+
45
+ # Offense count: 37
46
+ # Configuration parameters: Prefixes.
47
+ # Prefixes: when, with, without
48
+ RSpec/ContextWording:
49
+ Exclude:
50
+ - 'spec/controllers/spree/api/reviews_controller_spec.rb'
51
+ - 'spec/controllers/spree/reviews_controller_spec.rb'
52
+ - 'spec/features/admin_spec.rb'
53
+ - 'spec/features/reviews_spec.rb'
54
+ - 'spec/helpers/review_helper_spec.rb'
55
+ - 'spec/models/feedback_review_spec.rb'
56
+ - 'spec/models/product_spec.rb'
57
+ - 'spec/models/review_spec.rb'
58
+ - 'spec/models/reviews_ability_spec.rb'
59
+
60
+ # Offense count: 6
61
+ # Configuration parameters: CustomTransform, IgnoreMethods, SpecSuffixOnly.
62
+ RSpec/FilePath:
63
+ Exclude:
64
+ - 'spec/helpers/review_helper_spec.rb'
65
+ - 'spec/models/feedback_review_spec.rb'
66
+ - 'spec/models/product_spec.rb'
67
+ - 'spec/models/review_spec.rb'
68
+ - 'spec/models/reviews_ability_spec.rb'
69
+ - 'spec/models/reviews_configuration_spec.rb'
70
+
71
+ # Offense count: 12
72
+ # Configuration parameters: AssignmentOnly.
73
+ RSpec/InstanceVariable:
74
+ Exclude:
75
+ - 'spec/controllers/spree/reviews_controller_spec.rb'
76
+
77
+ # Offense count: 6
78
+ RSpec/LetSetup:
79
+ Exclude:
80
+ - 'spec/controllers/spree/admin/feedback_reviews_controller_spec.rb'
81
+ - 'spec/models/product_spec.rb'
82
+
83
+ # Offense count: 4
84
+ # Configuration parameters: .
85
+ # SupportedStyles: have_received, receive
86
+ RSpec/MessageSpies:
87
+ EnforcedStyle: receive
88
+
89
+ # Offense count: 67
90
+ RSpec/MultipleExpectations:
91
+ Max: 8
92
+
93
+ # Offense count: 3
94
+ # Configuration parameters: AllowSubject.
95
+ RSpec/MultipleMemoizedHelpers:
96
+ Max: 7
97
+
98
+ # Offense count: 94
99
+ # Configuration parameters: IgnoreSharedExamples.
100
+ RSpec/NamedSubject:
101
+ Exclude:
102
+ - 'spec/controllers/spree/api/feedback_reviews_controller_spec.rb'
103
+ - 'spec/controllers/spree/api/reviews_controller_spec.rb'
104
+ - 'spec/models/reviews_configuration_spec.rb'
105
+
106
+ # Offense count: 8
107
+ RSpec/NestedGroups:
108
+ Max: 4
109
+
110
+ # Offense count: 3
111
+ RSpec/StubbedMock:
112
+ Exclude:
113
+ - 'spec/controllers/spree/admin/reviews_controller_spec.rb'
114
+ - 'spec/controllers/spree/reviews_controller_spec.rb'
115
+
116
+ # Offense count: 1
117
+ RSpec/UnspecifiedException:
118
+ Exclude:
119
+ - 'spec/controllers/spree/feedback_reviews_controller_spec.rb'
120
+
121
+ # Offense count: 2
122
+ # Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
123
+ RSpec/VerifiedDoubles:
124
+ Exclude:
125
+ - 'spec/models/reviews_ability_spec.rb'
126
+
127
+ # Offense count: 1
128
+ # Configuration parameters: Include.
129
+ # Include: app/models/**/*.rb
130
+ Rails/InverseOf:
131
+ Exclude:
132
+ - 'app/models/spree/review.rb'
133
+
134
+ # Offense count: 2
135
+ Rails/ReflectionClassName:
136
+ Exclude:
137
+ - 'app/models/spree/feedback_review.rb'
138
+ - 'app/models/spree/review.rb'
139
+
140
+ # Offense count: 5
141
+ # Configuration parameters: ForbiddenMethods, AllowedMethods.
142
+ # ForbiddenMethods: decrement!, decrement_counter, increment!, increment_counter, insert, insert!, insert_all, insert_all!, toggle!, touch, touch_all, update_all, update_attribute, update_column, update_columns, update_counters, upsert, upsert_all
143
+ Rails/SkipsModelValidations:
144
+ Exclude:
145
+ - 'app/controllers/spree/admin/reviews_controller.rb'
146
+ - 'db/migrate/20120123141326_recalculate_ratings.rb'
147
+ - 'spec/controllers/spree/admin/reviews_controller_spec.rb'
148
+ - 'spec/models/product_spec.rb'
149
+
150
+ # Offense count: 10
151
+ # Cop supports --auto-correct.
152
+ # Configuration parameters: AutoCorrect, EnforcedStyle.
153
+ # SupportedStyles: nested, compact
154
+ Style/ClassAndModuleChildren:
155
+ Exclude:
156
+ - 'app/controllers/spree/admin/feedback_reviews_controller.rb'
157
+ - 'app/controllers/spree/admin/review_settings_controller.rb'
158
+ - 'app/controllers/spree/admin/reviews_controller.rb'
159
+ - 'app/controllers/spree/feedback_reviews_controller.rb'
160
+ - 'app/controllers/spree/reviews_controller.rb'
161
+ - 'app/helpers/spree/reviews_helper.rb'
162
+ - 'app/models/spree/feedback_review.rb'
163
+ - 'app/models/spree/review.rb'
164
+ - 'app/models/spree/reviews_ability.rb'
165
+ - 'app/models/spree/reviews_configuration.rb'
166
+
167
+ # Offense count: 2
168
+ Style/ClassVars:
169
+ Exclude:
170
+ - 'app/decorators/helpers/solidus_reviews/spree/api/api_helpers_decorator.rb'
171
+
172
+ # Offense count: 1
173
+ # Configuration parameters: EnforcedStyle.
174
+ # SupportedStyles: annotated, template, unannotated
175
+ Style/FormatStringToken:
176
+ Exclude:
177
+ - 'app/decorators/models/solidus_reviews/spree/product_decorator.rb'
178
+
179
+ # Offense count: 5
180
+ # Configuration parameters: MinBodyLength.
181
+ Style/GuardClause:
182
+ Exclude:
183
+ - 'app/controllers/spree/admin/reviews_controller.rb'
184
+ - 'lib/controllers/spree/api/feedback_reviews_controller.rb'
185
+ - 'lib/controllers/spree/api/reviews_controller.rb'
186
+
187
+ # Offense count: 1
188
+ Style/OptionalBooleanParameter:
189
+ Exclude:
190
+ - 'app/helpers/spree/reviews_helper.rb'
191
+
192
+ # Offense count: 10
193
+ # Cop supports --auto-correct.
194
+ # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
195
+ # URISchemes: http, https
196
+ Layout/LineLength:
197
+ Max: 150