potassium 6.1.0 → 6.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +103 -38
  3. data/.circleci/setup-rubygems.sh +3 -0
  4. data/.gitignore +2 -1
  5. data/.node-version +1 -1
  6. data/.rubocop.yml +530 -0
  7. data/CHANGELOG.md +50 -1
  8. data/README.md +11 -3
  9. data/lib/potassium/assets/.circleci/config.yml.erb +107 -40
  10. data/lib/potassium/assets/.pryrc +0 -6
  11. data/lib/potassium/assets/.rubocop.yml +13 -0
  12. data/lib/potassium/assets/README.yml +45 -8
  13. data/lib/potassium/assets/active_admin/policies/admin_user_policy.rb +2 -0
  14. data/lib/potassium/assets/active_admin/policies/comment_policy.rb +2 -0
  15. data/lib/potassium/assets/active_admin/policies/default_policy.rb +49 -0
  16. data/lib/potassium/assets/active_admin/policies/page_policy.rb +2 -0
  17. data/lib/potassium/assets/app/javascript/app.spec.js +1 -1
  18. data/lib/potassium/assets/app/views/shared/_gtm_body.html.erb +4 -0
  19. data/lib/potassium/assets/app/views/shared/_gtm_head.html.erb +7 -0
  20. data/lib/potassium/assets/testing/.rspec +1 -0
  21. data/lib/potassium/assets/testing/devise_config.rb +6 -0
  22. data/lib/potassium/assets/testing/factory_bot_config.rb +3 -0
  23. data/lib/potassium/assets/testing/faker_config.rb +1 -0
  24. data/lib/potassium/assets/testing/power_types_config.rb +1 -0
  25. data/lib/potassium/assets/testing/rails_helper.rb +130 -49
  26. data/lib/potassium/assets/testing/shoulda_matchers_config.rb +8 -0
  27. data/lib/potassium/assets/testing/simplecov_config.rb +64 -0
  28. data/lib/potassium/assets/testing/system_tests_config.rb +6 -0
  29. data/lib/potassium/cli_options.rb +19 -3
  30. data/lib/potassium/helpers/template-helpers.rb +4 -0
  31. data/lib/potassium/recipes/admin.rb +27 -17
  32. data/lib/potassium/recipes/api.rb +2 -0
  33. data/lib/potassium/recipes/background_processor.rb +43 -32
  34. data/lib/potassium/recipes/ci.rb +9 -39
  35. data/lib/potassium/recipes/coverage.rb +35 -0
  36. data/lib/potassium/recipes/file_storage.rb +1 -1
  37. data/lib/potassium/recipes/front_end.rb +26 -13
  38. data/lib/potassium/recipes/google_tag_manager.rb +94 -0
  39. data/lib/potassium/recipes/heroku.rb +43 -31
  40. data/lib/potassium/recipes/mailer.rb +18 -5
  41. data/lib/potassium/recipes/monitoring.rb +5 -0
  42. data/lib/potassium/recipes/pundit.rb +29 -10
  43. data/lib/potassium/recipes/rails.rb +0 -4
  44. data/lib/potassium/recipes/schedule.rb +16 -1
  45. data/lib/potassium/recipes/spring.rb +9 -0
  46. data/lib/potassium/recipes/style.rb +2 -2
  47. data/lib/potassium/recipes/testing.rb +75 -18
  48. data/lib/potassium/templates/application.rb +7 -2
  49. data/lib/potassium/version.rb +7 -4
  50. data/potassium.gemspec +3 -1
  51. data/spec/features/background_processor_spec.rb +7 -5
  52. data/spec/features/ci_spec.rb +7 -4
  53. data/spec/features/coverage_spec.rb +26 -0
  54. data/spec/features/front_end_spec.rb +18 -1
  55. data/spec/features/google_tag_manager_spec.rb +36 -0
  56. data/spec/features/heroku_spec.rb +0 -4
  57. data/spec/features/mailer_spec.rb +16 -0
  58. data/spec/features/node_spec.rb +1 -1
  59. data/spec/features/pundit_spec.rb +34 -0
  60. data/spec/features/schedule_spec.rb +11 -4
  61. data/spec/features/testing_spec.rb +56 -0
  62. data/spec/support/potassium_test_helpers.rb +2 -3
  63. data/tmp/.keep +0 -0
  64. metadata +64 -15
  65. data/lib/potassium/assets/Dockerfile.ci +0 -6
  66. data/lib/potassium/assets/active_admin/admin_user_policy.rb +0 -2
  67. data/lib/potassium/assets/active_admin/comment_policy.rb +0 -2
  68. data/lib/potassium/assets/active_admin/pundit_page_policy.rb +0 -5
  69. data/lib/potassium/assets/bin/cibuild.erb +0 -117
  70. data/lib/potassium/assets/docker-compose.ci.yml +0 -12
  71. data/lib/potassium/assets/sidekiq_scheduler.yml +0 -9
data/.rubocop.yml ADDED
@@ -0,0 +1,530 @@
1
+ require:
2
+ - rubocop-rspec
3
+ - rubocop-rails
4
+ - rubocop-performance
5
+ AllCops:
6
+ Exclude:
7
+ - "vendor/**/*"
8
+ - "db/**/*"
9
+ - "bin/**/*"
10
+ TargetRubyVersion: 2.7
11
+ Rails:
12
+ Enabled: true
13
+ Performance:
14
+ Enabled: true
15
+ Layout/ParameterAlignment:
16
+ Description: Align the parameters of a method call if they span more than one line.
17
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-double-indent
18
+ Enabled: true
19
+ EnforcedStyle: with_fixed_indentation
20
+ SupportedStyles:
21
+ - with_first_parameter
22
+ - with_fixed_indentation
23
+ Metrics/BlockLength:
24
+ Enabled: false
25
+ Style/ClassAndModuleChildren:
26
+ Description: Checks style of children classes and modules.
27
+ Enabled: false
28
+ EnforcedStyle: nested
29
+ SupportedStyles:
30
+ - nested
31
+ - compact
32
+ Style/CommentAnnotation:
33
+ Description: Checks formatting of special comments (TODO, FIXME, OPTIMIZE, HACK,
34
+ REVIEW).
35
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#annotate-keywords
36
+ Enabled: false
37
+ Keywords:
38
+ - TODO
39
+ - FIXME
40
+ - OPTIMIZE
41
+ - HACK
42
+ - REVIEW
43
+ Naming/FileName:
44
+ Description: Use snake_case for source file names.
45
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
46
+ Enabled: false
47
+ Exclude: []
48
+ Style/FormatString:
49
+ Description: Enforce the use of Kernel#sprintf, Kernel#format or String#%.
50
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#sprintf
51
+ Enabled: false
52
+ EnforcedStyle: format
53
+ SupportedStyles:
54
+ - format
55
+ - sprintf
56
+ - percent
57
+ Style/FrozenStringLiteralComment:
58
+ Enabled: false
59
+ Style/GlobalVars:
60
+ Description: Do not introduce global variables.
61
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#instance-vars
62
+ Enabled: false
63
+ AllowedVariables: []
64
+ Style/GuardClause:
65
+ Description: Check for conditionals that can be replaced with guard clauses
66
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
67
+ Enabled: false
68
+ MinBodyLength: 1
69
+ Style/IfUnlessModifier:
70
+ Description: Favor modifier if/unless usage when you have a single-line body.
71
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
72
+ Enabled: false
73
+ Style/LambdaCall:
74
+ Description: Use lambda.call(...) instead of lambda.(...).
75
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc-call
76
+ Enabled: false
77
+ EnforcedStyle: call
78
+ SupportedStyles:
79
+ - call
80
+ - braces
81
+ Style/Next:
82
+ Description: Use `next` to skip iteration instead of a condition at the end.
83
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
84
+ Enabled: false
85
+ EnforcedStyle: skip_modifier_ifs
86
+ MinBodyLength: 3
87
+ SupportedStyles:
88
+ - skip_modifier_ifs
89
+ - always
90
+ Layout/MultilineOperationIndentation:
91
+ Description: Checks indentation of binary operations that span more than one line.
92
+ Enabled: true
93
+ EnforcedStyle: indented
94
+ SupportedStyles:
95
+ - aligned
96
+ - indented
97
+ Style/MutableConstant:
98
+ Description: Do not assign mutable objects to constants.
99
+ Enabled: false
100
+ Style/NumericLiterals:
101
+ Description: Add underscores to large numeric literals to improve their readability.
102
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics
103
+ Enabled: false
104
+ MinDigits: 5
105
+ Style/PercentLiteralDelimiters:
106
+ Description: Use `%`-literal delimiters consistently
107
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
108
+ Enabled: false
109
+ PreferredDelimiters:
110
+ "%": "()"
111
+ "%i": "()"
112
+ "%q": "()"
113
+ "%Q": "()"
114
+ "%r": "{}"
115
+ "%s": "()"
116
+ "%w": "()"
117
+ "%W": "()"
118
+ "%x": "()"
119
+ Naming/PredicateName:
120
+ Description: Check the names of predicate methods.
121
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
122
+ Enabled: true
123
+ NamePrefix:
124
+ - is_
125
+ - has_
126
+ - have_
127
+ ForbiddenPrefixes:
128
+ - is_
129
+ Style/RaiseArgs:
130
+ Description: Checks the arguments passed to raise/fail.
131
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages
132
+ Enabled: false
133
+ EnforcedStyle: exploded
134
+ SupportedStyles:
135
+ - compact
136
+ - exploded
137
+ Style/SignalException:
138
+ Description: Checks for proper usage of fail and raise.
139
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
140
+ Enabled: false
141
+ EnforcedStyle: semantic
142
+ SupportedStyles:
143
+ - only_raise
144
+ - only_fail
145
+ - semantic
146
+ Style/SingleLineMethods:
147
+ Description: Avoid single-line methods.
148
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
149
+ Enabled: false
150
+ AllowIfMethodIsEmpty: true
151
+ Style/StringLiterals:
152
+ Description: Checks if uses of quotes match the configured preference.
153
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
154
+ Enabled: false
155
+ EnforcedStyle: double_quotes
156
+ SupportedStyles:
157
+ - single_quotes
158
+ - double_quotes
159
+ Style/TrailingCommaInArguments:
160
+ Description: Checks for trailing comma in argument lists.
161
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
162
+ Enabled: true
163
+ Style/TrailingCommaInArrayLiteral:
164
+ Description: Checks for trailing comma in array and hash literals.
165
+ StyleGuide: https://github.com/rubocop-hq/ruby-style-guide#no-trailing-array-commas
166
+ Enabled: true
167
+ Style/TrailingCommaInHashLiteral:
168
+ Description: Checks for trailing comma in array and hash literals.
169
+ StyleGuide: https://github.com/rubocop-hq/ruby-style-guide#no-trailing-array-commas
170
+ Enabled: true
171
+ Style/TrivialAccessors:
172
+ Description: Prefer attr_* methods to trivial readers/writers.
173
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr_family
174
+ Enabled: false
175
+ ExactNameMatch: false
176
+ AllowPredicates: false
177
+ AllowDSLWriters: false
178
+ AllowedMethods:
179
+ - to_ary
180
+ - to_a
181
+ - to_c
182
+ - to_enum
183
+ - to_h
184
+ - to_hash
185
+ - to_i
186
+ - to_int
187
+ - to_io
188
+ - to_open
189
+ - to_path
190
+ - to_proc
191
+ - to_r
192
+ - to_regexp
193
+ - to_str
194
+ - to_s
195
+ - to_sym
196
+ Style/WhileUntilModifier:
197
+ Description: Favor modifier while/until usage when you have a single-line body.
198
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier
199
+ Enabled: false
200
+ Style/WordArray:
201
+ Description: Use %w or %W for arrays of words.
202
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-w
203
+ Enabled: false
204
+ MinSize: 0
205
+ WordRegex: !ruby/regexp /\A[\p{Word}]+\z/
206
+ Style/ExponentialNotation:
207
+ Enabled: true
208
+ Style/HashEachMethods:
209
+ Description: Use Hash#each_key and Hash#each_value.
210
+ Enabled: true
211
+ Style/HashTransformKeys:
212
+ Description: Prefer `transform_keys` over `each_with_object` and `map`.
213
+ Enabled: true
214
+ Style/HashTransformValues:
215
+ Description: Prefer `transform_values` over `each_with_object` and `map`.
216
+ Enabled: true
217
+ Metrics/AbcSize:
218
+ Description: A calculated magnitude based on number of assignments, branches, and
219
+ conditions.
220
+ Enabled: true
221
+ Max: 25
222
+ Metrics/BlockNesting:
223
+ Description: Avoid excessive block nesting
224
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count
225
+ Enabled: true
226
+ Max: 3
227
+ Metrics/ClassLength:
228
+ Description: Avoid classes longer than 100 lines of code.
229
+ Enabled: false
230
+ CountComments: false
231
+ Max: 100
232
+ Metrics/MethodLength:
233
+ Description: Avoid methods longer than 15 lines of code.
234
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
235
+ Enabled: true
236
+ CountComments: true
237
+ Max: 15
238
+ Exclude:
239
+ - "spec/**/*"
240
+ Metrics/ParameterLists:
241
+ Description: Avoid long parameter lists.
242
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
243
+ Enabled: false
244
+ Max: 5
245
+ CountKeywordArgs: true
246
+ Lint/AssignmentInCondition:
247
+ Description: Don't use assignment in conditions.
248
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
249
+ Enabled: false
250
+ AllowSafeAssignment: true
251
+ Layout/LineLength:
252
+ Description: Limit lines to 100 characters.
253
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#100-character-limits
254
+ Enabled: true
255
+ Max: 100
256
+ AllowURI: true
257
+ URISchemes:
258
+ - http
259
+ - https
260
+ Layout/EndAlignment:
261
+ Description: Align ends correctly.
262
+ Enabled: true
263
+ EnforcedStyleAlignWith: keyword
264
+ SupportedStylesAlignWith:
265
+ - keyword
266
+ - variable
267
+ Layout/DefEndAlignment:
268
+ Description: Align ends corresponding to defs correctly.
269
+ Enabled: true
270
+ EnforcedStyleAlignWith: start_of_line
271
+ SupportedStylesAlignWith:
272
+ - start_of_line
273
+ - def
274
+ Layout/SpaceAroundMethodCallOperator:
275
+ Description: Checks method call operators to not have spaces around them.
276
+ Enabled: true
277
+ Style/SymbolArray:
278
+ Description: Use %i or %I for arrays of symbols.
279
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-i
280
+ Enabled: false
281
+ Layout/ExtraSpacing:
282
+ Description: Do not use unnecessary spacing.
283
+ Enabled: false
284
+ Naming/AccessorMethodName:
285
+ Description: Check the naming of accessor methods for get_/set_.
286
+ Enabled: false
287
+ Style/Alias:
288
+ Description: Use alias_method instead of alias.
289
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
290
+ Enabled: false
291
+ Style/ArrayJoin:
292
+ Description: Use Array#join instead of Array#*.
293
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#array-join
294
+ Enabled: false
295
+ Style/AsciiComments:
296
+ Description: Use only ascii symbols in comments.
297
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-comments
298
+ Enabled: false
299
+ Naming/AsciiIdentifiers:
300
+ Description: Use only ascii symbols in identifiers.
301
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-identifiers
302
+ Enabled: false
303
+ Style/Attr:
304
+ Description: Checks for uses of Module#attr.
305
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr
306
+ Enabled: false
307
+ Style/BlockComments:
308
+ Description: Do not use block comments.
309
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-block-comments
310
+ Enabled: false
311
+ Style/CaseEquality:
312
+ Description: Avoid explicit use of the case equality operator(===).
313
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-case-equality
314
+ Enabled: false
315
+ Style/CharacterLiteral:
316
+ Description: Checks for uses of character literals.
317
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-character-literals
318
+ Enabled: false
319
+ Style/ClassVars:
320
+ Description: Avoid the use of class variables.
321
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-class-vars
322
+ Enabled: false
323
+ Style/ColonMethodCall:
324
+ Description: 'Do not use :: for method call.'
325
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#double-colons
326
+ Enabled: false
327
+ Style/PreferredHashMethods:
328
+ Description: Checks for use of deprecated Hash methods.
329
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-key
330
+ Enabled: false
331
+ Style/Documentation:
332
+ Description: Document classes and non-namespace modules.
333
+ Enabled: false
334
+ Style/DoubleNegation:
335
+ Description: Checks for uses of double negation (!!).
336
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
337
+ Enabled: false
338
+ Style/EachWithObject:
339
+ Description: Prefer `each_with_object` over `inject` or `reduce`.
340
+ Enabled: false
341
+ Style/EmptyElse:
342
+ Description: Avoid empty else-clauses.
343
+ Enabled: true
344
+ Style/EmptyLiteral:
345
+ Description: Prefer literals to Array.new/Hash.new/String.new.
346
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
347
+ Enabled: false
348
+ Layout/EndOfLine:
349
+ Description: Use Unix-style line endings.
350
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#crlf
351
+ Enabled: true
352
+ Style/EvenOdd:
353
+ Description: Favor the use of Fixnum#even? && Fixnum#odd?
354
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
355
+ Enabled: false
356
+ Lint/FlipFlop:
357
+ Description: Checks for flip flops
358
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-flip-flops
359
+ Enabled: false
360
+ Style/IfWithSemicolon:
361
+ Description: Do not use if x; .... Use the ternary operator instead.
362
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs
363
+ Enabled: false
364
+ Style/Lambda:
365
+ Description: Use the new lambda literal syntax for single-line blocks.
366
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#lambda-multi-line
367
+ Enabled: false
368
+ Style/LineEndConcatenation:
369
+ Description: Use \ instead of + or << to concatenate two string literals at line
370
+ end.
371
+ Enabled: false
372
+ Style/ModuleFunction:
373
+ Description: Checks for usage of `extend self` in modules.
374
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
375
+ Enabled: false
376
+ Style/MultilineBlockChain:
377
+ Description: Avoid multi-line chains of blocks.
378
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
379
+ Enabled: false
380
+ Layout/MultilineBlockLayout:
381
+ Description: Ensures newlines after multiline block do statements.
382
+ Enabled: false
383
+ Style/NegatedIf:
384
+ Description: Favor unless over if for negative conditions (or control flow or).
385
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#unless-for-negatives
386
+ Enabled: false
387
+ Style/NegatedWhile:
388
+ Description: Favor until over while for negative conditions.
389
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#until-for-negatives
390
+ Enabled: false
391
+ Style/NilComparison:
392
+ Description: Prefer x.nil? to x == nil.
393
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
394
+ Enabled: false
395
+ Style/OneLineConditional:
396
+ Description: Favor the ternary operator(?:) over if/then/else/end constructs.
397
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
398
+ Enabled: false
399
+ Naming/BinaryOperatorParameterName:
400
+ Description: When defining binary operators, name the argument other.
401
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#other-arg
402
+ Enabled: false
403
+ Style/PerlBackrefs:
404
+ Description: Avoid Perl-style regex back references.
405
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
406
+ Enabled: false
407
+ Style/Proc:
408
+ Description: Use proc instead of Proc.new.
409
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc
410
+ Enabled: false
411
+ Style/SelfAssignment:
412
+ Description: Checks for places where self-assignment shorthand should have been
413
+ used.
414
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#self-assignment
415
+ Enabled: false
416
+ Layout/SpaceBeforeFirstArg:
417
+ Description: Put a space between a method name and the first argument in a method
418
+ call without parentheses.
419
+ Enabled: true
420
+ Layout/SpaceAroundOperators:
421
+ Description: Use spaces around operators.
422
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
423
+ Enabled: true
424
+ Layout/SpaceInsideParens:
425
+ Description: No spaces after ( or before ).
426
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
427
+ Enabled: true
428
+ Style/SpecialGlobalVars:
429
+ Description: Avoid Perl-style global variables.
430
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
431
+ Enabled: false
432
+ Style/VariableInterpolation:
433
+ Description: Don't interpolate global, instance and class variables directly in
434
+ strings.
435
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
436
+ Enabled: false
437
+ Style/WhenThen:
438
+ Description: Use when x then ... for one-line cases.
439
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
440
+ Enabled: false
441
+ Lint/AmbiguousOperator:
442
+ Description: Checks for ambiguous operators in the first argument of a method invocation
443
+ without parentheses.
444
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-as-args
445
+ Enabled: false
446
+ Lint/AmbiguousRegexpLiteral:
447
+ Description: Checks for ambiguous regexp literals in the first argument of a method
448
+ invocation without parenthesis.
449
+ Enabled: false
450
+ Layout/BlockAlignment:
451
+ Description: Align block ends correctly.
452
+ Enabled: true
453
+ Layout/ConditionPosition:
454
+ Description: Checks for condition placed in a confusing position relative to the
455
+ keyword.
456
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#same-line-condition
457
+ Enabled: false
458
+ Lint/DeprecatedClassMethods:
459
+ Description: Check for deprecated class method calls.
460
+ Enabled: false
461
+ Lint/ElseLayout:
462
+ Description: Check for odd code arrangement in an else block.
463
+ Enabled: false
464
+ Lint/SuppressedException:
465
+ Description: Don't suppress exception.
466
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
467
+ Enabled: false
468
+ Lint/LiteralAsCondition:
469
+ Description: Checks of literals used in conditions.
470
+ Enabled: false
471
+ Lint/LiteralInInterpolation:
472
+ Description: Checks for literals used in interpolation.
473
+ Enabled: false
474
+ Lint/Loop:
475
+ Description: Use Kernel#loop with break rather than begin/end/until or begin/end/while
476
+ for post-loop tests.
477
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#loop-with-break
478
+ Enabled: false
479
+ Lint/ParenthesesAsGroupedExpression:
480
+ Description: Checks for method calls with a space before the opening parenthesis.
481
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
482
+ Enabled: false
483
+ Lint/RequireParentheses:
484
+ Description: Use parentheses in the method call to avoid confusion about precedence.
485
+ Enabled: false
486
+ Lint/UnderscorePrefixedVariableName:
487
+ Description: Do not use prefix `_` for a variable that is used.
488
+ Enabled: false
489
+ Lint/Void:
490
+ Description: Possible use of operator/literal/variable in void context.
491
+ Enabled: false
492
+ Lint/RaiseException:
493
+ Description: Checks for `raise` or `fail` statements which are raising `Exception` class.
494
+ Enabled: true
495
+ Lint/StructNewOverride:
496
+ Description: Disallow overriding the `Struct` built-in methods via `Struct.new`.
497
+ Enabled: true
498
+ Rails/Delegate:
499
+ Description: Prefer delegate method for delegations.
500
+ Enabled: false
501
+ Performance/RedundantBlockCall:
502
+ Description: Use `yield` instead of `block.call`.
503
+ Reference: https://github.com/JuanitoFatas/fast-ruby#proccall-vs-yield-code
504
+ Enabled: false
505
+ Style/OptionalBooleanParameter:
506
+ Description: 'Use keyword arguments when defining method with boolean argument.'
507
+ Enabled: false
508
+ Lint/MissingSuper:
509
+ Description: >-
510
+ This cop checks for the presence of constructors and lifecycle callbacks
511
+ without calls to `super`'.
512
+ Enabled: false
513
+ Style/RedundantFileExtensionInRequire:
514
+ Description: >-
515
+ Checks for the presence of superfluous `.rb` extension in
516
+ the filename provided to `require` and `require_relative`.
517
+ Enabled: false
518
+ RSpec/MultipleExpectations:
519
+ Max: 5
520
+ RSpec/NestedGroups:
521
+ Max: 5
522
+ RSpec/ExampleLength:
523
+ Max: 10
524
+ RSpec/LetSetup:
525
+ Enabled: false
526
+ RSpec/ExpectChange:
527
+ Enabled: true
528
+ EnforcedStyle: block
529
+ RSpec/BeforeAfterAll:
530
+ Enabled: false
data/CHANGELOG.md CHANGED
@@ -1,6 +1,55 @@
1
1
  # Changelog
2
2
 
3
- ## Unreleased
3
+ ## 6.5.0
4
+
5
+ Features
6
+ - Update node to latest LTS version, 14 [#363](https://github.com/platanus/potassium/pull/363)
7
+ - Update ActiveAdmin to 2.9 to fix CSV streaming issues [#384](https://github.com/platanus/potassium/pull/384)
8
+ - Separates Pundit's configuration for Active Admin from Application's configuration [#378](https://github.com/platanus/potassium/pull/378)
9
+ - Add SimpleCov recipe [#387](https://github.com/platanus/potassium/pull/387)
10
+ - Update Rails to 6.1 [#389](https://github.com/platanus/potassium/pull/389) & [#392](https://github.com/platanus/potassium/pull/392)
11
+ - Include `run_test` as a valid example group [#379](https://github.com/platanus/potassium/pull/379). This was added incorrectly in this [PR](https://github.com/platanus/potassium/pull/379).
12
+
13
+ Fixes
14
+ - Remove rails_stdout_logging gem because it is no longer needed after Rails 5 and it was generating a deprecation warning [#325](https://github.com/platanus/potassium/pull/325)
15
+
16
+ ## 6.4.0
17
+
18
+ Features
19
+ - Include `run_test` as a valid example group [#379](https://github.com/platanus/potassium/pull/379)
20
+ - Updates ActiveAdmin installation to use webpacker [#350](https://github.com/platanus/potassium/pull/350)
21
+ - Replaces Active Skin with Arctic Admin [#350](https://github.com/platanus/potassium/pull/350)
22
+
23
+ Fixes
24
+ - Forces `vue-loader` version to 15, as 16 requires `@vue/compiler-sfc`, which is a part of Vue 3 [#375](https://github.com/platanus/potassium/pull/375)
25
+ - Changes Content Security Policy added by GTM recipe to: [#375](https://github.com/platanus/potassium/pull/375)
26
+ - Include the same config regardless of environment
27
+ - Include `unsafe_eval` in `script_src`, as it is required for Vue's compiler build
28
+ - Changes the front-end test to avoid using the deprecated method `isVueInstance` [#376](https://github.com/platanus/potassium/pull/376)
29
+
30
+ ## 6.3.0
31
+
32
+ Features:
33
+ - Add `monitoring` recipe with scout gem [#353](https://github.com/platanus/potassium/pull/353)
34
+ - Change CircleCI config to use cache in tests, and remove old cibuild flow [#366](https://github.com/platanus/potassium/pull/366)
35
+
36
+ Fixes:
37
+ - Explicitly install project specified node version in CircleCI build [#352](https://github.com/platanus/potassium/pull/352)
38
+ - Fixes `tailwindCSS@^2` incompatibility with `postcss@^7` [#356](https://github.com/platanus/potassium/pull/356)
39
+ - Update marcel gem (shrine's mime type analyzer) to avoid mimemagic dependency [#357](https://github.com/platanus/potassium/pull/357)
40
+ - Explicitly set the frontend test environment to `jsdom` [#367](https://github.com/platanus/potassium/pull/367)
41
+
42
+ ## 6.2.0
43
+
44
+ Features:
45
+ - Add Google Tag Manager [#326](https://github.com/platanus/potassium/pull/326)
46
+ - Update rubocop and rubocop-rspec for potassium and generated projects [#337](https://github.com/platanus/potassium/pull/337)
47
+ - Adds `mailers` queue to `sidekiq.yml` when installing or creating mailer recipe [#341](https://github.com/platanus/potassium/pull/341)
48
+
49
+ Fixes:
50
+ - Change `backgroud_processor` cli option to a switch. As of [#137](https://github.com/platanus/potassium/pull/137) we no longer have `delayed_jobs` as an option, it's only `sidekiq` now [#340](https://github.com/platanus/potassium/pull/340)
51
+ - Fixes mailer recipe install when background_processor wasn't installed [#341](https://github.com/platanus/potassium/pull/341)
52
+ - Update `heroku` recipe to check if an app or pipeline name is valid before creating it on Heroku [#344](https://github.com/platanus/potassium/pull/344)
4
53
 
5
54
  ## 6.1.0
6
55
 
data/README.md CHANGED
@@ -52,6 +52,7 @@ Potassium Rails apps includes the following gems and technologies:
52
52
  taking too long
53
53
  - [Tzinfo-Data](https://github.com/tzinfo/tzinfo-data) for updating timezone information
54
54
  - [Faker](https://github.com/stympy/faker) for creating development data
55
+ - [Scout](https://github.com/scoutapp/scout_apm_ruby) for monitoring performance
55
56
 
56
57
  The following optional integrations are also added:
57
58
 
@@ -60,13 +61,13 @@ The following optional integrations are also added:
60
61
  - [ActiveAdmin](http://activeadmin.info) for admin interfaces
61
62
  - [ActiveAdminAddons](https://github.com/platanus/activeadmin_addons) for some help with ActiveAdmin
62
63
  - [Pundit](https://github.com/elabs/pundit) for role-based authorization
63
- - [DelayedJob](https://github.com/collectiveidea/delayed_job) to execute longer tasks in the background
64
64
  - [Sidekiq](https://github.com/mperham/sidekiq) a simple, efficient background processing for Ruby
65
65
  - [Sidekiq-scheduler](https://github.com/moove-it/sidekiq-scheduler) to run scheduled processes
66
66
  - Mailing configuration for [AWS SES](https://github.com/aws/aws-sdk-rails)
67
67
  and [Sendgrid](https://github.com/platanus/send_grid_mailer) with recipient interceptor support
68
68
  - [Sentry](https://sentry.io) to monitor exceptions and errors
69
69
  - [Vue.js](https://vuejs.org) or [Angular 2](https://angular.io/) for frontend development
70
+ - [Google Tag Manager](https://tagmanager.google.com/) for analytics
70
71
  - Creates the Github repository of your choice for the project. A local git repository will always be created.
71
72
 
72
73
  A few more things are added to the project:
@@ -92,7 +93,6 @@ The optional API support includes:
92
93
 
93
94
  When you choose to deploy to heroku a few extra things are added for the project.
94
95
 
95
- - Adds the [Rails Stdout Logging][logging-gem] gem to configure the app to log to standard out, which is how [Heroku's logging][heroku-logging] works
96
96
  - Adds a [Procfile][procfile] to define the processes to run in heroku
97
97
  - Setup continuous integration using docker and herokuish to maintain better parity between testing and production environments
98
98
  - Adds a `bin/release` file with the release phase script to run specific tasks before the app is deployed completely, for example `rails db:migrate:with_data`
@@ -128,7 +128,6 @@ Go to https://circleci.com/add-projects, choose the repository from the list and
128
128
 
129
129
  In order to enable code linting via CircleCI and ReviewDog, you need to activate the **Only build pull requests** option under the `Advanced settings` section for your project.
130
130
 
131
- [logging-gem]: https://github.com/heroku/rails_stdout_logging
132
131
  [heroku-logging]: https://devcenter.heroku.com/articles/logging#writing-to-your-log
133
132
  [procfile]: https://devcenter.heroku.com/articles/procfile
134
133
  [heroku-buildpack-ruby-version]: http://github.com/platanus/heroku-buildpack-ruby-version
@@ -154,6 +153,15 @@ It's important to remember that `bin/potassium_test create`:
154
153
  - Can receive the same options as `potassium create`
155
154
  - Runs with options with a default value. This is to avoid the "asking part" of the creation process. You need to enable what you want to test like this: `$ bin/potassium_test create --clockwork`
156
155
 
156
+ ## Publishing
157
+ On master branch.
158
+
159
+ 1. Change `VERSION` in `lib/potassium/version.rb`
160
+ 2. Change `Unreleased` title to current version in `CHANGELOG.md`
161
+ 3. Commit new release. For example: `Releasing v6.3.0`
162
+ 4. Create tag. For example: `git tag v6.3.0`
163
+ 5. Push tag: `git push origin v6.3.0`
164
+
157
165
  ## Contributing
158
166
 
159
167
  If you want to add functionality please go to