potassium 6.0.0 → 6.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) 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/.rubocop.yml +530 -0
  6. data/CHANGELOG.md +57 -0
  7. data/README.md +51 -45
  8. data/lib/potassium/assets/.circleci/config.yml.erb +83 -34
  9. data/lib/potassium/assets/.eslintrc.json +13 -4
  10. data/lib/potassium/assets/.github/pull_request_template.md +9 -0
  11. data/lib/potassium/assets/.rubocop.yml +13 -0
  12. data/lib/potassium/assets/README.yml +7 -7
  13. data/lib/potassium/assets/app/graphql/graphql_controller.rb +55 -0
  14. data/lib/potassium/assets/app/graphql/mutations/login_mutation.rb +23 -0
  15. data/lib/potassium/assets/app/graphql/queries/base_query.rb +4 -0
  16. data/lib/potassium/assets/app/graphql/types/base/base_argument.rb +4 -0
  17. data/lib/potassium/assets/app/graphql/types/base/base_enum.rb +4 -0
  18. data/lib/potassium/assets/app/graphql/types/base/base_field.rb +5 -0
  19. data/lib/potassium/assets/app/graphql/types/base/base_input_object.rb +5 -0
  20. data/lib/potassium/assets/app/graphql/types/base/base_interface.rb +7 -0
  21. data/lib/potassium/assets/app/graphql/types/base/base_object.rb +5 -0
  22. data/lib/potassium/assets/app/graphql/types/base/base_scalar.rb +4 -0
  23. data/lib/potassium/assets/app/graphql/types/base/base_union.rb +4 -0
  24. data/lib/potassium/assets/app/graphql/types/mutation_type.rb +10 -0
  25. data/lib/potassium/assets/app/graphql/types/query_type.rb +13 -0
  26. data/lib/potassium/assets/app/javascript/app.spec.js +1 -1
  27. data/lib/potassium/assets/app/uploaders/base_uploader.rb +1 -3
  28. data/lib/potassium/assets/app/views/shared/_gtm_body.html.erb +4 -0
  29. data/lib/potassium/assets/app/views/shared/_gtm_head.html.erb +7 -0
  30. data/lib/potassium/assets/config/graphql_playground.rb +20 -0
  31. data/lib/potassium/assets/config/puma.rb +1 -1
  32. data/lib/potassium/assets/config/shrine.rb +4 -1
  33. data/lib/potassium/assets/redis.yml +1 -2
  34. data/lib/potassium/assets/testing/rails_helper.rb +2 -0
  35. data/lib/potassium/cli/commands/create.rb +11 -19
  36. data/lib/potassium/cli_options.rb +70 -10
  37. data/lib/potassium/helpers/template-helpers.rb +4 -0
  38. data/lib/potassium/newest_version_ensurer.rb +19 -36
  39. data/lib/potassium/node_version_ensurer.rb +30 -0
  40. data/lib/potassium/recipes/admin.rb +26 -16
  41. data/lib/potassium/recipes/api.rb +92 -27
  42. data/lib/potassium/recipes/background_processor.rb +62 -18
  43. data/lib/potassium/recipes/ci.rb +9 -39
  44. data/lib/potassium/recipes/database.rb +4 -0
  45. data/lib/potassium/recipes/draper.rb +0 -9
  46. data/lib/potassium/recipes/file_storage.rb +2 -1
  47. data/lib/potassium/recipes/front_end.rb +84 -9
  48. data/lib/potassium/recipes/github.rb +93 -15
  49. data/lib/potassium/recipes/google_tag_manager.rb +94 -0
  50. data/lib/potassium/recipes/heroku.rb +42 -29
  51. data/lib/potassium/recipes/mailer.rb +18 -5
  52. data/lib/potassium/recipes/monitoring.rb +5 -0
  53. data/lib/potassium/recipes/schedule.rb +16 -1
  54. data/lib/potassium/recipes/style.rb +2 -2
  55. data/lib/potassium/templates/application.rb +5 -2
  56. data/lib/potassium/version.rb +5 -2
  57. data/potassium.gemspec +5 -2
  58. data/spec/features/api_spec.rb +25 -0
  59. data/spec/features/background_processor_spec.rb +19 -6
  60. data/spec/features/ci_spec.rb +7 -4
  61. data/spec/features/draper_spec.rb +1 -6
  62. data/spec/features/file_storage_spec.rb +5 -0
  63. data/spec/features/front_end_spec.rb +32 -1
  64. data/spec/features/github_spec.rb +53 -8
  65. data/spec/features/google_tag_manager_spec.rb +36 -0
  66. data/spec/features/graphql_spec.rb +71 -0
  67. data/spec/features/mailer_spec.rb +16 -0
  68. data/spec/features/schedule_spec.rb +11 -4
  69. data/spec/spec_helper.rb +1 -0
  70. data/spec/support/fake_octokit.rb +31 -0
  71. data/spec/support/potassium_test_helpers.rb +0 -1
  72. data/tmp/.keep +0 -0
  73. metadata +80 -15
  74. data/lib/potassium/assets/Dockerfile.ci +0 -6
  75. data/lib/potassium/assets/api/api_error_concern.rb +0 -32
  76. data/lib/potassium/assets/api/base_controller.rb +0 -7
  77. data/lib/potassium/assets/api/draper_responder.rb +0 -62
  78. data/lib/potassium/assets/api/responder.rb +0 -41
  79. data/lib/potassium/assets/bin/cibuild.erb +0 -117
  80. data/lib/potassium/assets/docker-compose.ci.yml +0 -12
  81. data/lib/potassium/assets/sidekiq_scheduler.yml +0 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0542ddf33e06d797cf282c823b87d5a418280c5b31b16f4f42b9b5b54499f474
4
- data.tar.gz: 265838f7ff77f19b6ffdd0c2ecdefd3d6c33ebde2c68ec210a167b403cb70b26
3
+ metadata.gz: e14355a0a57fd6a46a1cd70c835959c2bad07eb67ddf46406fab5d6d3b5ad1d7
4
+ data.tar.gz: 6c9d2885e8723911bfa0084feb4ab3a6697442314400ba4d3fc56c4117125cb8
5
5
  SHA512:
6
- metadata.gz: 94b505b8058415e3b2dbcfd7161ebdb1bc9e212bd19510004212cda9ea7cddd7eb25de0b6716a628bc66614177a12b41ce866c121212d1b106b3948084e05b30
7
- data.tar.gz: f41bfc6224f310f21ba12f9949c358333158343e1dd20665980e9cb3f6132436486f30b2ffc49500acf2c6566db7d46a9906291303583d3bec6ff2fcfc9d7ed4
6
+ metadata.gz: 136691a7fc128bb7365594deee8187e1c6e72bebb098d59157cfdc7e82134c7d790a67e5ca49edc4c445472a28b57ead05752bf89a127825c0b1c3c68f245706
7
+ data.tar.gz: 33685ddf7b75156fa20dda246ad7b848a9f4dd247f877445596c347daf58e6b8ac8f61333e1315c526f85c7ed298ed01d1cf9ed4909a218006bd84dac972fc81
data/.circleci/config.yml CHANGED
@@ -1,42 +1,107 @@
1
- version: 2
2
- jobs:
3
- build:
4
- working_directory: ~/app
5
- parallelism: 4
6
- shell: /bin/bash --login
1
+ version: 2.1
2
+
3
+ ruby-image: &ruby-image circleci/ruby:2.7.0-node
4
+ env-vars: &env-vars
5
+ BUNDLE_JOBS: 4
6
+ RAILS_ENV: test
7
+ RAKE_ENV: test
8
+ BUNDLE_PATH: /home/circleci/project/vendor/bundle
9
+ GEM_PATH: /home/circleci/project/vendor/bundle/ruby/2.7.0
7
10
 
11
+ executors:
12
+ ruby-executor:
8
13
  docker:
9
- - image: circleci/ruby:2.7.0-node
10
- environment:
11
- GEM_HOME: /home/circleci/app/vendor/bundle
12
- BUNDLE_JOBS: 4
13
- BUNDLE_RETRY: 3
14
- BUNDLE_PATH: /home/circleci/app/vendor/bundle
14
+ - image: *ruby-image
15
+ environment: *env-vars
16
+
17
+ commands:
18
+ setup:
19
+ description: checkout code, restore cache, install dependencies, save cache
20
+ steps:
21
+ - checkout
22
+
23
+ - restore_cache:
24
+ keys:
25
+ - potassium-vendor-bundle-{{ .Branch }}
26
+ - potassium-vendor-bundle-master
27
+ - potassium-vendor-bundle
28
+
29
+ - run:
30
+ name: Install bundle dependencies
31
+ command: |
32
+ gem install bundler:2.1.4
33
+ bundle _2.1.4_ install
34
+
35
+ - save_cache:
36
+ key: potassium-vendor-bundle-{{ .Branch }}
37
+ paths:
38
+ - vendor/bundle
39
+
40
+ jobs:
41
+ test:
42
+ parallelism: 6
43
+ executor: ruby-executor
44
+ steps:
45
+ - setup
15
46
 
47
+ - run:
48
+ name: Run rspec
49
+ command: |
50
+ RSPEC_JUNIT_ARGS="-r rspec_junit_formatter -f RspecJunitFormatter -o test_results/rspec.xml"
51
+ RSPEC_GENERAL_ARGS="-f progress --no-color -p 10"
52
+ SPLIT_ARGS="$(circleci tests glob spec/**/*_spec.rb | circleci tests split --split-by=timings)"
53
+ bundle exec rspec $RSPEC_GENERAL_ARGS $RSPEC_JUNIT_ARGS $SPLIT_ARGS
54
+
55
+ - store_test_results:
56
+ path: test_results
57
+
58
+ lint:
59
+ executor: ruby-executor
60
+ steps:
61
+ - setup
62
+
63
+ - run:
64
+ name: Install reviewdog
65
+ command: |
66
+ curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s -- -b ./bin
67
+
68
+ - run:
69
+ name: Get files to lint
70
+ command: git diff origin/master --name-only --diff-filter=d > tmp/files_to_lint
71
+
72
+ - run:
73
+ name: Run rubocop
74
+ shell: /bin/bash
75
+ command: |
76
+ cat tmp/files_to_lint | grep -E '.+\.(rb)$' | xargs bundle exec rubocop --force-exclusion \
77
+ | ./bin/reviewdog -reporter=github-pr-review -f=rubocop
78
+
79
+ deploy:
80
+ executor: ruby-executor
16
81
  steps:
17
- - checkout
18
- - setup_remote_docker
19
-
20
- - restore_cache:
21
- keys:
22
- - potassium-bundle-{{ .Branch }}-
23
- - potassium-bundle-master-
24
- - potassium-bundle-
25
- - run: gem install bundler:2.0.2
26
- - run: bundle _2.0.2_ install
27
- - run: gem install hound-cli
28
- - run:
29
- command: |
30
- bundle exec rspec --color --require spec_helper --profile 10 \
31
- --format progress --format documentation \
32
- --format RspecJunitFormatter --out test_results/rspec.xml \
33
- $(circleci tests glob spec/**/*_spec.rb | circleci tests split --split-by=timings)
34
- environment:
35
- RAILS_ENV: test
36
- RACK_ENV: test
37
- - save_cache:
38
- key: potassium-bundle-{{ .Branch }}-{{ epoch }}
39
- paths:
40
- - vendor/bundle
41
- - store_test_results:
42
- path: test_results
82
+ - setup
83
+
84
+ - run:
85
+ name: Setup rubygems
86
+ command: bash .circleci/setup-rubygems.sh
87
+
88
+ - run:
89
+ name: Publish to rubygems
90
+ command: |
91
+ gem build potassium.gemspec
92
+ version_tag=$(git describe --tags)
93
+ gem push potassium-${version_tag#v}.gem
94
+
95
+ workflows:
96
+ test_and_lint:
97
+ jobs:
98
+ - test
99
+ - lint:
100
+ context: org-global
101
+ - deploy:
102
+ context: org-global
103
+ filters:
104
+ tags:
105
+ only: /.*/
106
+ branches:
107
+ ignore: /.*/
@@ -0,0 +1,3 @@
1
+ mkdir ~/.gem
2
+ echo -e "---\r\n:rubygems_api_key: $RUBYGEMS_API_KEY" > ~/.gem/credentials
3
+ chmod 0600 /home/circleci/.gem/credentials
data/.gitignore CHANGED
@@ -6,7 +6,8 @@
6
6
  /doc/
7
7
  /pkg/
8
8
  /spec/reports/
9
- /tmp/
9
+ /tmp/*
10
+ !/tmp/.keep
10
11
  *.bundle
11
12
  *.so
12
13
  *.o
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