neetob-ud 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.editorconfig +10 -0
- data/.env +1 -0
- data/.rubocop.yml +596 -0
- data/.ruby-version +1 -0
- data/.semaphore/semaphore.yml +30 -0
- data/CHANGELOG.md +96 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/Gemfile +28 -0
- data/Gemfile.lock +250 -0
- data/LICENSE.txt +21 -0
- data/README.md +412 -0
- data/Rakefile +16 -0
- data/config/secrets.yml +0 -0
- data/data/branch-protection-rules.json +25 -0
- data/data/config-vars-audit.json +18 -0
- data/data/config-vars-list.json +1 -0
- data/data/github-labels.json +197 -0
- data/env.sample +1 -0
- data/exe/neetob +25 -0
- data/install.sh +21 -0
- data/lib/neetob/cli/base.rb +96 -0
- data/lib/neetob/cli/fetchorupdate_repos/execute.rb +55 -0
- data/lib/neetob/cli/github/auth.rb +134 -0
- data/lib/neetob/cli/github/base.rb +42 -0
- data/lib/neetob/cli/github/commands.rb +54 -0
- data/lib/neetob/cli/github/issues/commands.rb +51 -0
- data/lib/neetob/cli/github/issues/create.rb +42 -0
- data/lib/neetob/cli/github/issues/list.rb +94 -0
- data/lib/neetob/cli/github/labels/commands.rb +65 -0
- data/lib/neetob/cli/github/labels/delete.rb +46 -0
- data/lib/neetob/cli/github/labels/delete_all.rb +50 -0
- data/lib/neetob/cli/github/labels/list.rb +38 -0
- data/lib/neetob/cli/github/labels/show.rb +39 -0
- data/lib/neetob/cli/github/labels/update.rb +42 -0
- data/lib/neetob/cli/github/labels/upsert.rb +64 -0
- data/lib/neetob/cli/github/login.rb +16 -0
- data/lib/neetob/cli/github/make_pr/base.rb +72 -0
- data/lib/neetob/cli/github/make_pr/commands.rb +37 -0
- data/lib/neetob/cli/github/make_pr/compliance_fix.rb +49 -0
- data/lib/neetob/cli/github/make_pr/script.rb +55 -0
- data/lib/neetob/cli/github/protect_branch.rb +48 -0
- data/lib/neetob/cli/github/search.rb +38 -0
- data/lib/neetob/cli/heroku/access/add.rb +38 -0
- data/lib/neetob/cli/heroku/access/commands.rb +41 -0
- data/lib/neetob/cli/heroku/access/list.rb +36 -0
- data/lib/neetob/cli/heroku/access/remove.rb +38 -0
- data/lib/neetob/cli/heroku/commands.rb +28 -0
- data/lib/neetob/cli/heroku/config_vars/audit.rb +64 -0
- data/lib/neetob/cli/heroku/config_vars/base.rb +19 -0
- data/lib/neetob/cli/heroku/config_vars/commands.rb +49 -0
- data/lib/neetob/cli/heroku/config_vars/list.rb +56 -0
- data/lib/neetob/cli/heroku/config_vars/remove.rb +39 -0
- data/lib/neetob/cli/heroku/config_vars/upsert.rb +80 -0
- data/lib/neetob/cli/heroku/execute.rb +37 -0
- data/lib/neetob/cli/local/commands.rb +19 -0
- data/lib/neetob/cli/local/ls.rb +29 -0
- data/lib/neetob/cli/sub_command_base.rb +17 -0
- data/lib/neetob/cli/ui.rb +41 -0
- data/lib/neetob/cli/users/audit.rb +121 -0
- data/lib/neetob/cli/users/commands.rb +30 -0
- data/lib/neetob/cli/users/commits.rb +171 -0
- data/lib/neetob/cli.rb +42 -0
- data/lib/neetob/exception_handler.rb +58 -0
- data/lib/neetob/utils.rb +16 -0
- data/lib/neetob/version.rb +5 -0
- data/lib/neetob.rb +10 -0
- data/neetob.gemspec +50 -0
- data/overcommit.yml +43 -0
- data/scripts/delete_unused_assets.rb +67 -0
- metadata +187 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c8ac0933c0767032dbab224167bb507b8943a1055ecbfaa29d054432eab041a4
|
4
|
+
data.tar.gz: e22f206d9aa048bfc29e054fe1983e955f5e1a64d71bd4c384faad8dfa9999da
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: fd2f1c7e78896f008cf88801092b5e10656c396e83dc8d3d3028cdfdbca2e0445712c9ea7b64a70e15e209aff914a136706d724cc21c17e64c2d2b47897fd89e
|
7
|
+
data.tar.gz: 31bf94ece8714c0b44371accf7b2f25bc464c2d9e60e8542445e8fbbc4646f6845b09c256c6153542719c6cfbe436fe39549eaba8f0d36c97f28effc3c3ad3e7
|
data/.editorconfig
ADDED
data/.env
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
AUTH_PARAMS='{"provider": "github","client_id": "9aefff37f98713262fd0","grant_type": "urn:ietf:params:oauth:grant-type:device_code","auth_uris": {"auth_req": "https://github.com/login/device/code","token_req": "https://github.com/login/oauth/access_token"},"scope": "repo,user"}'
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,596 @@
|
|
1
|
+
# cspell:Disable
|
2
|
+
AllCops:
|
3
|
+
TargetRubyVersion: 3.0.4
|
4
|
+
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
|
5
|
+
# to ignore them, so only the ones explicitly set in this file are enabled.
|
6
|
+
DisabledByDefault: true
|
7
|
+
# From time to time rubocop adds new cops to say rails etc.
|
8
|
+
# So rather than disabling them it's better to enable them,
|
9
|
+
# try it out and then disable them manually one by one.
|
10
|
+
NewCops: enable
|
11
|
+
Exclude:
|
12
|
+
- ".vscode/**/*"
|
13
|
+
- ".bundle/**/*"
|
14
|
+
- ".circleci/**/*"
|
15
|
+
- ".semaphore/**/*"
|
16
|
+
- "**/log/**/*"
|
17
|
+
- "**/public/**/*"
|
18
|
+
- "**/tmp/**/*"
|
19
|
+
- "**/templates/**/*"
|
20
|
+
- "**/vendor/**/*"
|
21
|
+
- "bin/**/*"
|
22
|
+
- "*.gemspec"
|
23
|
+
- "*.yml"
|
24
|
+
|
25
|
+
# ====================================================================================================
|
26
|
+
# All access modifier related rules
|
27
|
+
# ====================================================================================================
|
28
|
+
# Add a newline before and after private keyword or other access modifiers
|
29
|
+
Layout/EmptyLinesAroundAccessModifier:
|
30
|
+
Enabled: true
|
31
|
+
|
32
|
+
# This cop checks for redundant access modifiers, including those with no code,
|
33
|
+
# those which are repeated, and leading `public` modifiers in a class or module body.
|
34
|
+
Lint/UselessAccessModifier:
|
35
|
+
Enabled: true
|
36
|
+
|
37
|
+
# # bad
|
38
|
+
# class Foo
|
39
|
+
# private def bar; end
|
40
|
+
# private def baz; end
|
41
|
+
# end
|
42
|
+
# # good
|
43
|
+
# class Foo
|
44
|
+
# private
|
45
|
+
#
|
46
|
+
# def bar; end
|
47
|
+
# def baz; end
|
48
|
+
# end
|
49
|
+
Style/AccessModifierDeclarations:
|
50
|
+
Enabled: true
|
51
|
+
|
52
|
+
# # bad
|
53
|
+
# class Plumbus
|
54
|
+
# private
|
55
|
+
# def smooth; end
|
56
|
+
# end
|
57
|
+
# # good
|
58
|
+
# class Plumbus
|
59
|
+
# private
|
60
|
+
# def smooth; end
|
61
|
+
# end
|
62
|
+
Layout/AccessModifierIndentation:
|
63
|
+
Enabled: true
|
64
|
+
|
65
|
+
# ====================================================================================================
|
66
|
+
# All comment related rules
|
67
|
+
# ====================================================================================================
|
68
|
+
# Align comments with method definitions.
|
69
|
+
Layout/CommentIndentation:
|
70
|
+
Enabled: true
|
71
|
+
|
72
|
+
# Requires an empty line after frozen_string_literal: true comment
|
73
|
+
Layout/EmptyLineAfterMagicComment:
|
74
|
+
Enabled: true
|
75
|
+
|
76
|
+
# frozen_string_literal: true magic comment is required on the top of files
|
77
|
+
Style/FrozenStringLiteralComment:
|
78
|
+
Enabled: true
|
79
|
+
EnforcedStyle: always
|
80
|
+
SafeAutoCorrect: true
|
81
|
+
|
82
|
+
# ====================================================================================================
|
83
|
+
# All Class related rules
|
84
|
+
# ====================================================================================================
|
85
|
+
# Helps in brining the include statements etc to top of the class definition
|
86
|
+
Layout/ClassStructure:
|
87
|
+
Enabled: true
|
88
|
+
Description: "Enforces a canonical order of definitions within a class body."
|
89
|
+
StyleGuide: "https://github.com/rubocop/rails-style-guide#macro-style-methods"
|
90
|
+
Categories:
|
91
|
+
module_inclusions:
|
92
|
+
- include
|
93
|
+
- prepend
|
94
|
+
- extend
|
95
|
+
third_party:
|
96
|
+
- neeto_sso_track_widget_tokens
|
97
|
+
- devise
|
98
|
+
scopes:
|
99
|
+
- default_scope
|
100
|
+
- scope
|
101
|
+
attributes:
|
102
|
+
- attribute
|
103
|
+
- attr_reader
|
104
|
+
- attr_writer
|
105
|
+
- attr_accessor
|
106
|
+
enum:
|
107
|
+
- enum
|
108
|
+
store:
|
109
|
+
# https://api.rubyonrails.org/classes/ActiveRecord/Store.html
|
110
|
+
- store
|
111
|
+
associations:
|
112
|
+
- belongs_to
|
113
|
+
- has_one
|
114
|
+
- has_many
|
115
|
+
- has_and_belongs_to_many
|
116
|
+
other_macros:
|
117
|
+
- delegate
|
118
|
+
- accepts_nested_attributes_for
|
119
|
+
validations:
|
120
|
+
- validate
|
121
|
+
- validates
|
122
|
+
- validates_acceptance_of
|
123
|
+
- validates_associated
|
124
|
+
- validates_confirmation_of
|
125
|
+
- validates_exclusion_of
|
126
|
+
- validates_format_of
|
127
|
+
- validates_inclusion_of
|
128
|
+
- validates_length_of
|
129
|
+
- validates_numericality_of
|
130
|
+
- validates_presence_of
|
131
|
+
- validates_uniqueness_of
|
132
|
+
- validates_each
|
133
|
+
- validate_with
|
134
|
+
callbacks:
|
135
|
+
- before_validation
|
136
|
+
- after_validation
|
137
|
+
- before_save
|
138
|
+
- around_save
|
139
|
+
- after_save
|
140
|
+
- before_update
|
141
|
+
- around_update
|
142
|
+
- after_update
|
143
|
+
- before_create
|
144
|
+
- after_create
|
145
|
+
- before_destroy
|
146
|
+
- around_destroy
|
147
|
+
- after_destroy
|
148
|
+
- after_commit
|
149
|
+
- after_create_commit
|
150
|
+
ExpectedOrder:
|
151
|
+
- module_inclusions
|
152
|
+
- third_party
|
153
|
+
- scopes
|
154
|
+
- constants
|
155
|
+
- attributes
|
156
|
+
- enum
|
157
|
+
- store
|
158
|
+
- associations
|
159
|
+
- validations
|
160
|
+
- callbacks
|
161
|
+
- other_macros
|
162
|
+
- initializer
|
163
|
+
- public_class_methods
|
164
|
+
- public_methods
|
165
|
+
- protected_methods
|
166
|
+
- private_methods
|
167
|
+
|
168
|
+
# In a regular class definition, no empty lines around the body.
|
169
|
+
# bad
|
170
|
+
# class Foo
|
171
|
+
#
|
172
|
+
# def bar
|
173
|
+
# # ...
|
174
|
+
# end
|
175
|
+
#
|
176
|
+
# end
|
177
|
+
#
|
178
|
+
# good
|
179
|
+
# class Foo
|
180
|
+
# def bar
|
181
|
+
# # ...
|
182
|
+
# end
|
183
|
+
# end
|
184
|
+
Layout/EmptyLinesAroundClassBody:
|
185
|
+
Enabled: true
|
186
|
+
|
187
|
+
# ====================================================================================================
|
188
|
+
# All Method related rules
|
189
|
+
# ====================================================================================================
|
190
|
+
# This cop checks whether class/module/method definitions are separated by one or more empty lines.
|
191
|
+
Layout/EmptyLineBetweenDefs:
|
192
|
+
Enabled: true
|
193
|
+
|
194
|
+
# This cop checks the . position in multi-line method calls.
|
195
|
+
# The dot should be leading rather than trailing.
|
196
|
+
Layout/DotPosition:
|
197
|
+
Enabled: true
|
198
|
+
EnforcedStyle: leading
|
199
|
+
|
200
|
+
# No space in method name and the arguments
|
201
|
+
Lint/ParenthesesAsGroupedExpression:
|
202
|
+
Enabled: true
|
203
|
+
|
204
|
+
# Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg,
|
205
|
+
# when a boolean operator, && or ||, is chained along with this method/argument
|
206
|
+
Lint/RequireParentheses:
|
207
|
+
Enabled: true
|
208
|
+
|
209
|
+
# avoid redundant `return` expressions
|
210
|
+
Style/RedundantReturn:
|
211
|
+
Enabled: true
|
212
|
+
AllowMultipleReturnValues: true
|
213
|
+
|
214
|
+
# Ensures that exactly one space is used between a method name and the
|
215
|
+
# first argument for method calls without parentheses
|
216
|
+
Layout/SpaceBeforeFirstArg:
|
217
|
+
Enabled: true
|
218
|
+
|
219
|
+
# Methods that doesn't take any parameters shouldn't have paranthesis in its definition
|
220
|
+
Style/DefWithParentheses:
|
221
|
+
Enabled: true
|
222
|
+
|
223
|
+
# Defining a method with parameters needs parentheses.
|
224
|
+
Style/MethodDefParentheses:
|
225
|
+
Enabled: true
|
226
|
+
|
227
|
+
# # bad
|
228
|
+
# def some_method(arg1=:default, arg2=nil, arg3=[])
|
229
|
+
# # good
|
230
|
+
# def some_method(arg1 = :default, arg2 = nil, arg3 = [])
|
231
|
+
Layout/SpaceAroundEqualsInParameterDefault:
|
232
|
+
Enabled: true
|
233
|
+
|
234
|
+
# This cop checks for a line break before the first argument in a multi-line method call.
|
235
|
+
# # bad
|
236
|
+
# method(foo, bar,
|
237
|
+
# baz)
|
238
|
+
# # good
|
239
|
+
# method(
|
240
|
+
# foo, bar,
|
241
|
+
# baz)
|
242
|
+
Layout/FirstMethodArgumentLineBreak:
|
243
|
+
Enabled: true
|
244
|
+
|
245
|
+
# Method definitions after `private` or `protected` isolated calls need one
|
246
|
+
# extra level of indentation.
|
247
|
+
Layout/IndentationConsistency:
|
248
|
+
Enabled: true
|
249
|
+
EnforcedStyle: indented_internal_methods
|
250
|
+
|
251
|
+
# This cop checks the indentation of the method name part in method calls that span more than one line.
|
252
|
+
# # bad
|
253
|
+
# while myvariable
|
254
|
+
# .instance_method_call1
|
255
|
+
# .instance_method_call2
|
256
|
+
# # do something
|
257
|
+
# end
|
258
|
+
#
|
259
|
+
# # good
|
260
|
+
# while myvariable
|
261
|
+
# .instance_method_call1
|
262
|
+
# .instance_method_call2
|
263
|
+
#
|
264
|
+
# # do something
|
265
|
+
# end
|
266
|
+
Layout/MultilineMethodCallIndentation:
|
267
|
+
Enabled: true
|
268
|
+
EnforcedStyle: indented
|
269
|
+
|
270
|
+
# This cop ensures the indentation of the first parameter in a method definition.
|
271
|
+
Layout/FirstParameterIndentation:
|
272
|
+
Enabled: true
|
273
|
+
EnforcedStyle: consistent
|
274
|
+
|
275
|
+
# When we write method arguments in next line, indent it.
|
276
|
+
Layout/FirstArgumentIndentation:
|
277
|
+
Enabled: true
|
278
|
+
EnforcedStyle: consistent
|
279
|
+
|
280
|
+
# Alignment of args from second argument onwards should be indented
|
281
|
+
# # bad
|
282
|
+
# json.extract! comment,
|
283
|
+
# :id,
|
284
|
+
# :content,
|
285
|
+
# :created_at
|
286
|
+
# # good
|
287
|
+
# json.extract! comment,
|
288
|
+
# :id,
|
289
|
+
# :content,
|
290
|
+
# :created_at
|
291
|
+
Layout/ArgumentAlignment:
|
292
|
+
Enabled: true
|
293
|
+
EnforcedStyle: with_fixed_indentation
|
294
|
+
|
295
|
+
# In a regular method definition, no empty lines around the body.
|
296
|
+
Layout/EmptyLinesAroundMethodBody:
|
297
|
+
Enabled: true
|
298
|
+
|
299
|
+
# ====================================================================================================
|
300
|
+
# All Hash related rules
|
301
|
+
# ====================================================================================================
|
302
|
+
# EnforcedColonStyle: key
|
303
|
+
# # bad
|
304
|
+
# {
|
305
|
+
# foo: bar,
|
306
|
+
# ba: baz
|
307
|
+
# }
|
308
|
+
# {
|
309
|
+
# foo: bar,
|
310
|
+
# ba: baz
|
311
|
+
# }
|
312
|
+
# # good
|
313
|
+
# {
|
314
|
+
# foo: bar,
|
315
|
+
# ba: baz
|
316
|
+
# }
|
317
|
+
# EnforcedLastArgumentHashStyle: always_inspect
|
318
|
+
# # bad
|
319
|
+
# do_something({foo: 1,
|
320
|
+
# bar: 2})
|
321
|
+
# # good
|
322
|
+
# do_something(foo: 1,
|
323
|
+
# bar: 2)
|
324
|
+
Layout/HashAlignment:
|
325
|
+
Enabled: true
|
326
|
+
EnforcedColonStyle: key
|
327
|
+
EnforcedLastArgumentHashStyle: always_inspect
|
328
|
+
|
329
|
+
# This cop checks for a line break before the first element in a multi-line hash.
|
330
|
+
# # bad
|
331
|
+
# { a: 1,
|
332
|
+
# b: 2}
|
333
|
+
# # good
|
334
|
+
# {
|
335
|
+
# a: 1,
|
336
|
+
# b: 2 }
|
337
|
+
Layout/FirstHashElementLineBreak:
|
338
|
+
Enabled: true
|
339
|
+
|
340
|
+
# When using the `new_line` style:
|
341
|
+
# The closing brace of a multi-line hash literal must be on
|
342
|
+
# the line after the last element of the hash.
|
343
|
+
Layout/MultilineHashBraceLayout:
|
344
|
+
Enabled: true
|
345
|
+
EnforcedStyle: new_line
|
346
|
+
|
347
|
+
# # bad
|
348
|
+
# hash = {
|
349
|
+
# key: :value
|
350
|
+
# }
|
351
|
+
# but_in_a_method_call({
|
352
|
+
# its_like: :this
|
353
|
+
# })
|
354
|
+
# # good
|
355
|
+
# hash = {
|
356
|
+
# key: :value
|
357
|
+
# }
|
358
|
+
# and_in_a_method_call({
|
359
|
+
# no: :difference
|
360
|
+
# })
|
361
|
+
Layout/FirstHashElementIndentation:
|
362
|
+
Enabled: true
|
363
|
+
EnforcedStyle: consistent
|
364
|
+
|
365
|
+
# Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
|
366
|
+
Style/HashSyntax:
|
367
|
+
Enabled: true
|
368
|
+
|
369
|
+
# Use `{ a: 1 }` not `{a:1}`.
|
370
|
+
Layout/SpaceInsideHashLiteralBraces:
|
371
|
+
Enabled: true
|
372
|
+
|
373
|
+
# `no_comma`: Does not requires a comma after the last item in a hash
|
374
|
+
Style/TrailingCommaInHashLiteral:
|
375
|
+
Enabled: true
|
376
|
+
|
377
|
+
# ====================================================================================================
|
378
|
+
# All misc whitespace related rules
|
379
|
+
# ====================================================================================================
|
380
|
+
# bad
|
381
|
+
# def f(a:, b:2); {a:3}; end
|
382
|
+
# good
|
383
|
+
# def f(a:, b: 2); {a: 3}; end
|
384
|
+
Layout/SpaceAfterColon:
|
385
|
+
Enabled: true
|
386
|
+
|
387
|
+
# Ensures comma (,) is followed by some kind of space.
|
388
|
+
Layout/SpaceAfterComma:
|
389
|
+
Enabled: true
|
390
|
+
|
391
|
+
# Every ruby keyword should be surrounded by spaces
|
392
|
+
Layout/SpaceAroundKeyword:
|
393
|
+
Enabled: true
|
394
|
+
|
395
|
+
# Requires proper spacing around ruby operator symbols.
|
396
|
+
Layout/SpaceAroundOperators:
|
397
|
+
Enabled: true
|
398
|
+
## Allows multiple spaces for keeping alignment
|
399
|
+
# {
|
400
|
+
# 1 => 2,
|
401
|
+
# 11 => 3
|
402
|
+
# }
|
403
|
+
AllowForAlignment: true
|
404
|
+
|
405
|
+
# Ensures comma symbol is not preceded by space
|
406
|
+
Layout/SpaceBeforeComma:
|
407
|
+
Enabled: true
|
408
|
+
|
409
|
+
# Use `foo {}` not `foo{}`.
|
410
|
+
Layout/SpaceBeforeBlockBraces:
|
411
|
+
Enabled: true
|
412
|
+
|
413
|
+
# Use `foo { bar }` not `foo {bar}`.
|
414
|
+
Layout/SpaceInsideBlockBraces:
|
415
|
+
Enabled: true
|
416
|
+
|
417
|
+
# enforces that parentheses do not have spaces
|
418
|
+
Layout/SpaceInsideParens:
|
419
|
+
Enabled: true
|
420
|
+
|
421
|
+
# No trailing whitespace.
|
422
|
+
Layout/TrailingWhitespace:
|
423
|
+
Enabled: true
|
424
|
+
|
425
|
+
# Require a space after comment
|
426
|
+
Layout/LeadingCommentSpace:
|
427
|
+
Enabled: true
|
428
|
+
|
429
|
+
# ====================================================================================================
|
430
|
+
# All empty lines related rules
|
431
|
+
# ====================================================================================================
|
432
|
+
# The `lf` style means that LF (Line Feed) is enforced on
|
433
|
+
# all platforms.
|
434
|
+
# # bad
|
435
|
+
# puts 'Hello' # Return character is CR+LF on all platfoms.
|
436
|
+
#
|
437
|
+
# # good
|
438
|
+
# puts 'Hello' # Return character is LF on all platfoms.
|
439
|
+
Layout/EndOfLine:
|
440
|
+
Enabled: true
|
441
|
+
EnforcedStyle: lf
|
442
|
+
|
443
|
+
# In a regular module definition, no empty lines around the body.
|
444
|
+
Layout/EmptyLinesAroundModuleBody:
|
445
|
+
Enabled: true
|
446
|
+
|
447
|
+
# # bad
|
448
|
+
# def foo
|
449
|
+
# return if need_return?
|
450
|
+
# bar
|
451
|
+
# end
|
452
|
+
#
|
453
|
+
# # good
|
454
|
+
# def foo
|
455
|
+
# return if need_return?
|
456
|
+
#
|
457
|
+
# bar
|
458
|
+
# end
|
459
|
+
Layout/EmptyLineAfterGuardClause:
|
460
|
+
Enabled: true
|
461
|
+
|
462
|
+
# Requires a single final blank line to the file.
|
463
|
+
# `final_blank_line` ensures a blank line before EOF.
|
464
|
+
# # bad
|
465
|
+
# class Foo; end # EOF
|
466
|
+
#
|
467
|
+
# # good
|
468
|
+
# class Foo; end
|
469
|
+
#
|
470
|
+
# # EOF
|
471
|
+
Layout/TrailingEmptyLines:
|
472
|
+
Enabled: true
|
473
|
+
|
474
|
+
# This cop checks for two or more consecutive blank lines.
|
475
|
+
# This rule is not same as TrailingEmptyLines, because:
|
476
|
+
# 1) It looks for empty lines throughout the file. Not just the end.
|
477
|
+
# # bad - It has two empty lines.
|
478
|
+
# some_method
|
479
|
+
# # one empty line
|
480
|
+
# # two empty lines
|
481
|
+
# some_method
|
482
|
+
#
|
483
|
+
# # good
|
484
|
+
# some_method
|
485
|
+
# # one empty line
|
486
|
+
# some_method
|
487
|
+
Layout/EmptyLines:
|
488
|
+
Enabled: true
|
489
|
+
|
490
|
+
# ====================================================================================================
|
491
|
+
# All naming convetion related rules for variables
|
492
|
+
# ====================================================================================================
|
493
|
+
# Refer: https://www.bigbinary.com/learn-rubyonrails-book/n+1-queries-and-memoization#bb-generated-p-id-44
|
494
|
+
# Sadly this cannot be auto-corrected.
|
495
|
+
Naming/MemoizedInstanceVariableName:
|
496
|
+
Enabled: true
|
497
|
+
EnforcedStyleForLeadingUnderscores: required
|
498
|
+
|
499
|
+
# ====================================================================================================
|
500
|
+
# All misc rules that don't fall into other categories
|
501
|
+
# ====================================================================================================
|
502
|
+
# Prefer &&/|| over and/or.
|
503
|
+
Style/AndOr:
|
504
|
+
Enabled: true
|
505
|
+
|
506
|
+
# Align `when` with `case`.
|
507
|
+
Layout/CaseIndentation:
|
508
|
+
Enabled: true
|
509
|
+
|
510
|
+
Layout/LineLength:
|
511
|
+
Enabled: true
|
512
|
+
Max: 120
|
513
|
+
AllowedPatterns: [
|
514
|
+
'^\s*#', # line that begins with comment
|
515
|
+
'^\s*"', # line that begins with double quote (long string literal)
|
516
|
+
'^\s*%{', # line that begins with percent literals (long string literal)
|
517
|
+
"^\\s*'", # line that begins with single quote (long string literal)
|
518
|
+
'"$', # line that ends with double quote (long string variable assignment)
|
519
|
+
"'$", # line that ends with single quote (long string variable assignment)
|
520
|
+
'}$', # line that ends with percent literals (long regex variable assignment)
|
521
|
+
'\/$', # line that ends with slash (long regex variable assignment)
|
522
|
+
]
|
523
|
+
|
524
|
+
# Indent using two spaces
|
525
|
+
Layout/IndentationWidth:
|
526
|
+
Enabled: true
|
527
|
+
Width: 2
|
528
|
+
|
529
|
+
# Use spaces for indentation. Not tabs
|
530
|
+
Layout/IndentationStyle:
|
531
|
+
Enabled: true
|
532
|
+
EnforcedStyle: spaces
|
533
|
+
|
534
|
+
# Remove extra/unnecessary whitespace which's used for alignment.
|
535
|
+
# A developer shouldn't waste time indenting code with whitespaces.
|
536
|
+
Layout/ExtraSpacing:
|
537
|
+
Enabled: true
|
538
|
+
AllowForAlignment: false
|
539
|
+
|
540
|
+
# Helps in removing unwanted parentheses.
|
541
|
+
# # bad
|
542
|
+
# x += 1 while (x < 10)
|
543
|
+
# foo unless (bar || baz)
|
544
|
+
#
|
545
|
+
# if (x > 10)
|
546
|
+
# elsif (x < 3)
|
547
|
+
# end
|
548
|
+
#
|
549
|
+
# # good
|
550
|
+
# x += 1 while x < 10
|
551
|
+
# foo unless bar || baz
|
552
|
+
#
|
553
|
+
# if x > 10
|
554
|
+
# elsif x < 3
|
555
|
+
# end
|
556
|
+
Style/ParenthesesAroundCondition:
|
557
|
+
Enabled: true
|
558
|
+
|
559
|
+
# Enforce string literals to use double quotes everywhere
|
560
|
+
Style/StringLiterals:
|
561
|
+
Enabled: true
|
562
|
+
EnforcedStyle: double_quotes
|
563
|
+
|
564
|
+
# Use quotes for string literals when they are enough.
|
565
|
+
Style/RedundantPercentQ:
|
566
|
+
Enabled: true
|
567
|
+
|
568
|
+
# Align `end` with the matching keyword or starting expression except for
|
569
|
+
# assignments, where it should be aligned with the LHS.
|
570
|
+
Layout/EndAlignment:
|
571
|
+
Enabled: true
|
572
|
+
EnforcedStyleAlignWith: variable
|
573
|
+
|
574
|
+
# avoid lines terminated with a semicolon.
|
575
|
+
Style/Semicolon:
|
576
|
+
Enabled: true
|
577
|
+
# disallow multiple statements in a line
|
578
|
+
AllowAsExpressionSeparator: false
|
579
|
+
|
580
|
+
# Corrects usage of :true/:false to true/false
|
581
|
+
Lint/BooleanSymbol:
|
582
|
+
Enabled: true
|
583
|
+
|
584
|
+
# ====================================================================================================
|
585
|
+
# All flow(if/while/for/until) statements related
|
586
|
+
# ====================================================================================================
|
587
|
+
Lint/AssignmentInCondition:
|
588
|
+
Enabled: true
|
589
|
+
AllowSafeAssignment: true
|
590
|
+
|
591
|
+
# ====================================================================================================
|
592
|
+
# All Bundler cop rules
|
593
|
+
# ====================================================================================================
|
594
|
+
Bundler/OrderedGems:
|
595
|
+
Enabled: true
|
596
|
+
TreatCommentsAsGroupSeparators: true
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.0.4
|
@@ -0,0 +1,30 @@
|
|
1
|
+
version: v1.0
|
2
|
+
name: minitest
|
3
|
+
agent:
|
4
|
+
machine:
|
5
|
+
type: e1-standard-2
|
6
|
+
os_image: ubuntu2004
|
7
|
+
|
8
|
+
global_job_config:
|
9
|
+
prologue:
|
10
|
+
commands:
|
11
|
+
- checkout
|
12
|
+
- sem-version ruby 3.0.4
|
13
|
+
- bundle config path 'vendor/bundle'
|
14
|
+
- bundle install
|
15
|
+
env_vars:
|
16
|
+
- name: TZ
|
17
|
+
value: "/usr/share/zoneinfo/America/New_York"
|
18
|
+
- name: RAILS_ENV
|
19
|
+
value: "test"
|
20
|
+
- name: RACK_ENV
|
21
|
+
value: "test"
|
22
|
+
|
23
|
+
blocks:
|
24
|
+
- name: Rails Tests
|
25
|
+
task:
|
26
|
+
jobs:
|
27
|
+
- name: Rails Tests
|
28
|
+
commands:
|
29
|
+
- git clone https://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@github.com/bigbinary/neeto_compliance
|
30
|
+
- bundle exec rake test
|