neetob 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. checksums.yaml +7 -0
  2. data/.editorconfig +10 -0
  3. data/.env +1 -0
  4. data/.rubocop.yml +596 -0
  5. data/.ruby-version +1 -0
  6. data/.semaphore/semaphore.yml +31 -0
  7. data/CHANGELOG.md +5 -0
  8. data/CODE_OF_CONDUCT.md +84 -0
  9. data/Gemfile +26 -0
  10. data/Gemfile.lock +249 -0
  11. data/LICENSE.txt +21 -0
  12. data/README.md +381 -0
  13. data/Rakefile +16 -0
  14. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/github_access.rb +29 -0
  15. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/neeto_apps.rb +35 -0
  16. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/neeto_commons.rb +16 -0
  17. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/runner.rb +35 -0
  18. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/skippable.rb +19 -0
  19. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/sync_neeto_commons/sync_bin.rb +32 -0
  20. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/sync_neeto_commons/sync_formatters.rb +35 -0
  21. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/sync_neeto_commons/sync_husky.rb +33 -0
  22. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/sync_neeto_commons/sync_misc.rb +36 -0
  23. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/sync_neeto_commons/sync_test_support.rb +38 -0
  24. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/sync_neeto_commons.rb +36 -0
  25. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/verifiers/auto_update_prs_with_latest_master_verifier.rb +25 -0
  26. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/verifiers/base.rb +72 -0
  27. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/verifiers/bundler_version_verifier.rb +53 -0
  28. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/verifiers/circleci_config_verifier.rb +25 -0
  29. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/verifiers/common_gemfile_verifier.rb +25 -0
  30. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/verifiers/common_initializers_verifier.rb +25 -0
  31. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/verifiers/cypress_config_verifier.rb +46 -0
  32. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/verifiers/cypress_plugins_index_verifier.rb +25 -0
  33. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/verifiers/docker_file_dev_verifier.rb +25 -0
  34. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/verifiers/environment_config_verifier.rb +38 -0
  35. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/verifiers/gem_version_verifier.rb +38 -0
  36. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/verifiers/gems_verifier_base.rb +34 -0
  37. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/verifiers/gitignore_file_verifier.rb +39 -0
  38. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/verifiers/jsconfig_verifier.rb +100 -0
  39. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/verifiers/neeto_auth_gems_verifier.rb +20 -0
  40. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/verifiers/neeto_commons_sync_verifier.rb +42 -0
  41. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/verifiers/neeto_gems_version_verifier.rb +24 -0
  42. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/verifiers/newrelic_verifier.rb +25 -0
  43. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/verifiers/node_version_verifier.rb +63 -0
  44. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/verifiers/package_dependencies_version_verifier.rb +62 -0
  45. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/verifiers/package_json_verifier.rb +39 -0
  46. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/verifiers/roles_verifier.rb +22 -0
  47. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/verifiers/ruby_version_verifier.rb +25 -0
  48. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/verifiers/semaphoreci_config_verifier.rb +162 -0
  49. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/verifiers/sidekiq_queues_verifier.rb +34 -0
  50. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/verifiers/simplecov_config_verifier.rb +28 -0
  51. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/verifiers/sitemap_config_verifier.rb +29 -0
  52. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/verifiers/slugignore_file_verifier.rb +25 -0
  53. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/verifiers/sync_neeto_commons_verifier/bin_files_verifier.rb +29 -0
  54. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/verifiers/sync_neeto_commons_verifier/formatter_files_verifier.rb +29 -0
  55. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/verifiers/sync_neeto_commons_verifier/husky_files_verifier.rb +29 -0
  56. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/verifiers/sync_neeto_commons_verifier/misc_files_verifier.rb +29 -0
  57. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/verifiers/sync_neeto_commons_verifier/test_support_files_verifier.rb +28 -0
  58. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/verifiers/sync_neeto_commons_verifier.rb +31 -0
  59. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/verifiers/webpack_configuration_verifier.rb +44 -0
  60. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/verifiers/webpacker_config_verifier.rb +29 -0
  61. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/verifiers_list.rb +61 -0
  62. data/Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/version.rb +5 -0
  63. data/data/branch-protection-rules.json +25 -0
  64. data/data/config-vars-audit.json +18 -0
  65. data/data/config-vars-list.json +1 -0
  66. data/data/config-vars-upsert.json +3 -0
  67. data/data/github-labels.json +192 -0
  68. data/env.sample +1 -0
  69. data/exe/neetob +25 -0
  70. data/install.sh +21 -0
  71. data/lib/neetob/cli/base.rb +85 -0
  72. data/lib/neetob/cli/fetchorupdate_repos/execute.rb +53 -0
  73. data/lib/neetob/cli/github/auth.rb +134 -0
  74. data/lib/neetob/cli/github/base.rb +35 -0
  75. data/lib/neetob/cli/github/commands.rb +50 -0
  76. data/lib/neetob/cli/github/issues/commands.rb +51 -0
  77. data/lib/neetob/cli/github/issues/create.rb +42 -0
  78. data/lib/neetob/cli/github/issues/list.rb +94 -0
  79. data/lib/neetob/cli/github/labels/commands.rb +62 -0
  80. data/lib/neetob/cli/github/labels/delete.rb +44 -0
  81. data/lib/neetob/cli/github/labels/delete_all.rb +48 -0
  82. data/lib/neetob/cli/github/labels/list.rb +36 -0
  83. data/lib/neetob/cli/github/labels/show.rb +37 -0
  84. data/lib/neetob/cli/github/labels/update.rb +40 -0
  85. data/lib/neetob/cli/github/labels/upsert.rb +62 -0
  86. data/lib/neetob/cli/github/login.rb +16 -0
  87. data/lib/neetob/cli/github/make_pr/base.rb +72 -0
  88. data/lib/neetob/cli/github/make_pr/commands.rb +37 -0
  89. data/lib/neetob/cli/github/make_pr/compliance_fix.rb +49 -0
  90. data/lib/neetob/cli/github/make_pr/script.rb +55 -0
  91. data/lib/neetob/cli/github/protect_branch.rb +46 -0
  92. data/lib/neetob/cli/github/search.rb +38 -0
  93. data/lib/neetob/cli/heroku/access/add.rb +38 -0
  94. data/lib/neetob/cli/heroku/access/commands.rb +41 -0
  95. data/lib/neetob/cli/heroku/access/list.rb +36 -0
  96. data/lib/neetob/cli/heroku/access/remove.rb +38 -0
  97. data/lib/neetob/cli/heroku/commands.rb +28 -0
  98. data/lib/neetob/cli/heroku/config_vars/audit.rb +64 -0
  99. data/lib/neetob/cli/heroku/config_vars/base.rb +19 -0
  100. data/lib/neetob/cli/heroku/config_vars/commands.rb +49 -0
  101. data/lib/neetob/cli/heroku/config_vars/list.rb +56 -0
  102. data/lib/neetob/cli/heroku/config_vars/remove.rb +39 -0
  103. data/lib/neetob/cli/heroku/config_vars/upsert.rb +80 -0
  104. data/lib/neetob/cli/heroku/execute.rb +37 -0
  105. data/lib/neetob/cli/local/commands.rb +19 -0
  106. data/lib/neetob/cli/local/ls.rb +29 -0
  107. data/lib/neetob/cli/sub_command_base.rb +17 -0
  108. data/lib/neetob/cli/ui.rb +41 -0
  109. data/lib/neetob/cli/users/audit.rb +121 -0
  110. data/lib/neetob/cli/users/commands.rb +28 -0
  111. data/lib/neetob/cli/users/commits.rb +125 -0
  112. data/lib/neetob/cli.rb +40 -0
  113. data/lib/neetob/exception_handler.rb +58 -0
  114. data/lib/neetob/utils.rb +16 -0
  115. data/lib/neetob/version.rb +5 -0
  116. data/lib/neetob.rb +10 -0
  117. data/overcommit.yml +43 -0
  118. data/scripts/delete_unused_assets.rb +67 -0
  119. metadata +235 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 298d91d6bea215e78f7e8cb621ecb6e32814e6d4932dd82683bb75dac5839512
4
+ data.tar.gz: abd708eefddbe7b640b64cfd37ce3df0961d757655b653d6b6b9fd23a4b9e014
5
+ SHA512:
6
+ metadata.gz: c71aabe11df5e3fc710d6f5d315be21282871e5f23e2747a25480f9d8ef993c1028fb2afaf946fa983896e6a6d66149db9e8fa511ad81814cca22b270b713900
7
+ data.tar.gz: 94f83facc06fa92ccc44ea62aa9ecaf6389ef69049f774b93dda94c99b867d1cd124e0be46eb756c4943836fda2b7424e058f54c5f01b7dff3e7c560569e3711
data/.editorconfig ADDED
@@ -0,0 +1,10 @@
1
+ # VScode respects this. More info at editorconfig.org
2
+ root = true
3
+
4
+ [*]
5
+ charset = utf-8
6
+ end_of_line = lf
7
+ indent_size = 2
8
+ indent_style = space
9
+ insert_final_newline = true
10
+ trim_trailing_whitespace = true
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,31 @@
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
+ - cd neeto_compliance/ && git checkout 3404e3dc33764a0f6d9c976c1cd73f9b56a1c913 && cd ..
31
+ - bundle exec rake test
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2022-10-28
4
+
5
+ - Initial release