simplycop 1.0.0.pre

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: c1262373f94916df67fe979d5755b4f198a4a1cf218619b19fc507e110fcb880
4
+ data.tar.gz: 3bc37c02fb65fa808d595e440d21ec92ad6219a3326b32aee79331d8b59f4698
5
+ SHA512:
6
+ metadata.gz: 02d5125d7b34c1939420c7b93e647eb15279d555b1c3a0552689fbff69056ba1fed1e14609e4a43cd13dcd37ba86d9ae18db38822e2b4ef1a32088b46b7ef854
7
+ data.tar.gz: b8d062d911ca139ee70bd15bdd97bd4edbd84009fe676fcc0f829cf395c9e222b87de68992bf1381d65f906b1cdb6eeb864bc6de91b68f65aa91f3acfd801ca3
@@ -0,0 +1,11 @@
1
+ require:
2
+ - './lib/simplycop/custom_cops/timecop_without_block.rb'
3
+
4
+ AllCops:
5
+ ExtraDetails: true
6
+
7
+ CustomCops/TimecopWithoutBlock:
8
+ Enabled: true
9
+ Details: >-
10
+ Time in all tests is faked to be midday. Using `Timecop.return` rather than the block format will spoil that for all subsequent tests.
11
+ `https://github.com/simplybusiness/chopin/pull/10607`
@@ -0,0 +1,34 @@
1
+ name: Ruby CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+
7
+ env:
8
+ CI: true
9
+
10
+ jobs:
11
+ build:
12
+ runs-on: ubuntu-18.04
13
+ defaults:
14
+ run:
15
+ working-directory: ./
16
+
17
+ strategy:
18
+ matrix:
19
+ ruby-version: [2.6.5, 2.7]
20
+
21
+ steps:
22
+ - uses: actions/checkout@v2
23
+ - name: Set up Ruby
24
+ uses: ruby/setup-ruby@v1
25
+ with:
26
+ ruby-version: ${{ matrix.ruby-version }}
27
+
28
+ - name: Install dependencies
29
+ run: bundle install
30
+ - name: Rubocop Check
31
+ run: bundle exec rubocop
32
+ - name: Run all tests
33
+ run: bundle exec rspec
34
+ shell: bash
@@ -0,0 +1,26 @@
1
+ name: Publish Ruby Gem
2
+
3
+ on:
4
+ push:
5
+ branches: [ add-github-action-workflow ]
6
+
7
+ jobs:
8
+ build:
9
+ name: Build and Publish
10
+ runs-on: ubuntu-18.04
11
+ steps:
12
+ - uses: actions/checkout@v2
13
+ - name: Set up Ruby 2.6
14
+ uses: actions/setup-ruby@v1
15
+ with:
16
+ version: 2.6.x
17
+ - name: Publish to RubyGems
18
+ run: |
19
+ mkdir -p $HOME/.gem
20
+ touch $HOME/.gem/credentials
21
+ chmod 0600 $HOME/.gem/credentials
22
+ printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
23
+ gem build *.gemspec
24
+ gem push *.gem
25
+ env:
26
+ GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_API_KEY}}
@@ -0,0 +1,17 @@
1
+
2
+ name: Check version
3
+
4
+ on:
5
+ pull_request:
6
+ branches:
7
+ - master
8
+ types: [opened, synchronize]
9
+ jobs:
10
+ build:
11
+ runs-on: ubuntu-18.04
12
+
13
+ steps:
14
+ - uses: simplybusiness/version-forget-me-not@v1
15
+ env:
16
+ ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17
+ VERSION_FILE_PATH: "lib/simplycop/version.rb"
@@ -0,0 +1,37 @@
1
+ Gemfile.lock
2
+ *.gem
3
+ *.rbc
4
+ /.config
5
+ /coverage/
6
+ /InstalledFiles
7
+ /pkg/
8
+ /spec/reports/
9
+ /spec/examples.txt
10
+ /test/tmp/
11
+ /test/version_tmp/
12
+ /tmp/
13
+
14
+ ## Specific to RubyMotion:
15
+ .dat*
16
+ .repl_history
17
+ build/
18
+
19
+ ## Documentation cache and generated files:
20
+ /.yardoc/
21
+ /_yardoc/
22
+ /doc/
23
+ /rdoc/
24
+
25
+ ## Environment normalization:
26
+ /.bundle/
27
+ /vendor/bundle
28
+ /lib/bundler/man/
29
+
30
+ # for a library or gem, you might want to ignore these files since the code is
31
+ # intended to run in multiple environments; otherwise, check them in:
32
+ # Gemfile.lock
33
+ # .ruby-version
34
+ # .ruby-gemset
35
+
36
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
37
+ .rvmrc
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --require spec_helper
@@ -0,0 +1,3 @@
1
+ inherit_from:
2
+ - .simplycop.yml
3
+ - .simplycop_rspec.yml
@@ -0,0 +1 @@
1
+ 2.6.5
@@ -0,0 +1,447 @@
1
+ inherit_from:
2
+ - .custom_simplycop.yml
3
+ - .simplycop_security.yml
4
+ - .simplycop_metaprogramming.yml
5
+
6
+ AllCops:
7
+ Exclude:
8
+ - 'db/schema.rb'
9
+ - 'vendor/**/*'
10
+
11
+ # Cop names are not displayed in offense messages by default. Change behavior
12
+ # by overriding DisplayCopNames, or by giving the -D/--display-cop-names
13
+ # option.
14
+ DisplayCopNames: true
15
+ # Style guide URLs are not displayed in offense messages by default. Change
16
+ # behavior by overriding DisplayStyleGuide, or by giving the
17
+ # -S/--display-style-guide option.
18
+ DisplayStyleGuide: true
19
+ UseCache: true
20
+ MaxFilesInCache: 5000
21
+ # Adapted from: https://github.com/simplybusiness/how-we-roll/blob/master/development/RUBYSTYLEGUIDE.markdown
22
+
23
+ Naming/VariableName:
24
+ Enabled: true
25
+ EnforcedStyle: snake_case
26
+ SupportedStyles:
27
+ - snake_case
28
+ - camelCase
29
+
30
+ Naming/FileName:
31
+ Enabled: true
32
+
33
+ Layout/TrailingEmptyLines:
34
+ Enabled: true
35
+ Severity: warning
36
+
37
+ Layout/TrailingWhitespace:
38
+ Enabled: true
39
+ Severity: warning
40
+
41
+ Lint/DuplicateMethods:
42
+ Enabled: true
43
+ Severity: warning
44
+
45
+ Style/SpecialGlobalVars:
46
+ Enabled: true
47
+ Severity: warning
48
+
49
+ Style/ColonMethodCall:
50
+ Enabled: true
51
+ Severity: warning
52
+
53
+ Style/RedundantReturn:
54
+ Enabled: true
55
+ Severity: warning
56
+
57
+ Style/NestedParenthesizedCalls:
58
+ Enabled: true
59
+
60
+ Layout/MultilineMethodCallIndentation:
61
+ Enabled: false
62
+
63
+ Style/RedundantParentheses:
64
+ Enabled: true
65
+
66
+ Style/RedundantInterpolation:
67
+ Enabled: false
68
+
69
+ Layout/AssignmentIndentation:
70
+ Enabled: false
71
+
72
+ Style/MutableConstant:
73
+ Enabled: false
74
+
75
+ Style/ZeroLengthPredicate:
76
+ Enabled: true
77
+
78
+ Style/ConditionalAssignment:
79
+ Enabled: true
80
+
81
+ Style/NestedModifier:
82
+ Enabled: true
83
+
84
+ Style/IfInsideElse:
85
+ Enabled: true
86
+
87
+ Lint/IneffectiveAccessModifier:
88
+ Enabled: false
89
+
90
+ Lint/ImplicitStringConcatenation:
91
+ Enabled: true
92
+
93
+ Lint/UselessAssignment:
94
+ Enabled: true
95
+ Severity: warning
96
+
97
+ Lint/UnusedBlockArgument:
98
+ Enabled: true
99
+ Severity: warning
100
+
101
+ Lint/UnderscorePrefixedVariableName:
102
+ Enabled: true
103
+ Severity: warning
104
+
105
+ Style/Documentation:
106
+ Enabled: false
107
+
108
+ Layout/SpaceInsideBlockBraces:
109
+ Enabled: false
110
+
111
+ Layout/SpaceInsideArrayLiteralBrackets:
112
+ Enabled: true
113
+
114
+ Layout/SpaceInsideReferenceBrackets:
115
+ Enabled: true
116
+
117
+ Layout/SpaceInsideHashLiteralBraces:
118
+ Enabled: false
119
+
120
+ Layout/SpaceInsideParens:
121
+ Enabled: false
122
+
123
+ Layout/SpaceBeforeComma:
124
+ Enabled: false
125
+
126
+ Layout/IndentationConsistency:
127
+ Enabled: true
128
+
129
+ Layout/CaseIndentation:
130
+ Enabled: false
131
+
132
+ Style/MethodDefParentheses:
133
+ Enabled: false
134
+
135
+ Style/MultilineTernaryOperator:
136
+ Enabled: true
137
+
138
+ Style/NestedTernaryOperator:
139
+ Enabled: true
140
+
141
+ Style/UnlessElse:
142
+ Enabled: true
143
+
144
+ Style/SymbolArray:
145
+ EnforcedStyle: brackets
146
+
147
+ Style/WordArray:
148
+ EnforcedStyle: brackets
149
+
150
+ Style/ParenthesesAroundCondition:
151
+ Enabled: true
152
+
153
+ Layout/MultilineBlockLayout:
154
+ Enabled: false
155
+
156
+ Layout/InitialIndentation:
157
+ Enabled: true
158
+
159
+ Style/OptionalArguments:
160
+ Enabled: true
161
+
162
+ Lint/DuplicateHashKey:
163
+ Enabled: false
164
+
165
+ Lint/CircularArgumentReference:
166
+ Enabled: true
167
+
168
+ Lint/AmbiguousOperator:
169
+ Enabled: true
170
+
171
+ Lint/AmbiguousRegexpLiteral:
172
+ Enabled: true
173
+
174
+ Layout/BlockAlignment:
175
+ Enabled: true
176
+
177
+ Layout/DefEndAlignment:
178
+ Enabled: true
179
+
180
+ Lint/DeprecatedClassMethods:
181
+ Enabled: true
182
+
183
+ Layout/EndAlignment:
184
+ Enabled: true
185
+
186
+ Lint/UselessAccessModifier:
187
+ Enabled: false
188
+
189
+ Lint/Void:
190
+ Enabled: true
191
+
192
+ Style/Alias:
193
+ Enabled: false
194
+
195
+ Layout/SpaceAroundBlockParameters:
196
+ Enabled: false
197
+
198
+ Layout/SpaceAroundEqualsInParameterDefault:
199
+ Enabled: false
200
+
201
+ Style/RedundantBegin:
202
+ Enabled: true
203
+
204
+ Style/RedundantException:
205
+ Enabled: true
206
+
207
+ Layout/EmptyLines:
208
+ Enabled: true
209
+
210
+ Style/SelfAssignment:
211
+ Enabled: true
212
+
213
+ Style/LambdaCall:
214
+ Enabled: true
215
+
216
+ Metrics/ModuleLength:
217
+ Enabled: true
218
+
219
+ Style/For:
220
+ Enabled: true
221
+
222
+ Layout/ExtraSpacing:
223
+ Enabled: false
224
+
225
+ Style/GuardClause:
226
+ Enabled: false
227
+
228
+ Style/FrozenStringLiteralComment:
229
+ Enabled: false
230
+
231
+ Style/StringLiterals:
232
+ Enabled: false
233
+
234
+ Metrics/ClassLength:
235
+ Max: 512
236
+ Enabled: true
237
+
238
+ Layout/LineLength:
239
+ Enabled: true
240
+ Max: 120
241
+
242
+ Layout/ArgumentAlignment:
243
+ Enabled: false
244
+
245
+ Style/HashEachMethods:
246
+ Enabled: false
247
+
248
+ Style/HashTransformKeys:
249
+ Enabled: false
250
+
251
+ Style/HashTransformValues:
252
+ Enabled: false
253
+
254
+ Layout/EmptyLinesAroundAttributeAccessor:
255
+ Enabled: true
256
+
257
+ Layout/SpaceAroundMethodCallOperator:
258
+ Enabled: true
259
+
260
+ Lint/DeprecatedOpenSSLConstant:
261
+ Enabled: true
262
+
263
+ Lint/DuplicateElsifCondition:
264
+ Enabled: true
265
+
266
+ Lint/MixedRegexpCaptureTypes:
267
+ Enabled: true
268
+
269
+ Lint/RaiseException:
270
+ Enabled: true
271
+
272
+ Lint/StructNewOverride:
273
+ Enabled: true
274
+
275
+ Style/AccessorGrouping:
276
+ Enabled: true
277
+
278
+ Style/ArrayCoercion:
279
+ Enabled: true
280
+
281
+ Style/BisectedAttrAccessor:
282
+ Enabled: true
283
+
284
+ Style/CaseLikeIf:
285
+ Enabled: true
286
+
287
+ Style/ExponentialNotation:
288
+ Enabled: false
289
+
290
+ Style/HashAsLastArrayItem:
291
+ Enabled: true
292
+
293
+ Style/HashLikeCase:
294
+ Enabled: false
295
+
296
+ Style/RedundantAssignment:
297
+ Enabled: true
298
+
299
+ Style/RedundantFetchBlock:
300
+ Enabled: true
301
+
302
+ Style/RedundantFileExtensionInRequire:
303
+ Enabled: true
304
+
305
+ Style/RedundantRegexpCharacterClass:
306
+ Enabled: true
307
+
308
+ Style/RedundantRegexpEscape:
309
+ Enabled: true
310
+
311
+ Style/SlicingWithRange:
312
+ Enabled: false
313
+
314
+ Layout/BeginEndAlignment:
315
+ Enabled: true
316
+
317
+ Lint/BinaryOperatorWithIdenticalOperands:
318
+ Enabled: true
319
+
320
+ Lint/ConstantDefinitionInBlock:
321
+ Enabled: true
322
+ Exclude:
323
+ - spec/**/*.rb
324
+
325
+ Lint/DuplicateRequire:
326
+ Enabled: true
327
+
328
+ Lint/DuplicateRescueException:
329
+ Enabled: true
330
+
331
+ Lint/EmptyConditionalBody:
332
+ Enabled: true
333
+
334
+ Lint/EmptyFile:
335
+ Enabled: true
336
+
337
+ Lint/FloatComparison:
338
+ Enabled: true
339
+
340
+ Lint/IdentityComparison:
341
+ Enabled: true
342
+
343
+ Lint/MissingSuper:
344
+ Enabled: false
345
+
346
+ Lint/OutOfRangeRegexpRef:
347
+ Enabled: true
348
+
349
+ Lint/SelfAssignment:
350
+ Enabled: true
351
+
352
+ Lint/TopLevelReturnWithArgument:
353
+ Enabled: true
354
+
355
+ Lint/TrailingCommaInAttributeDeclaration:
356
+ Enabled: true
357
+
358
+ Lint/UnreachableLoop:
359
+ Enabled: true
360
+
361
+ Lint/UselessMethodDefinition:
362
+ Enabled: true
363
+
364
+ Lint/UselessTimes:
365
+ Enabled: true
366
+
367
+ Style/CombinableLoops:
368
+ Enabled: true
369
+
370
+ Style/ExplicitBlockArgument:
371
+ Enabled: true
372
+
373
+ Style/GlobalStdStream:
374
+ Enabled: true
375
+
376
+ Style/KeywordParametersOrder:
377
+ Enabled: true
378
+
379
+ Style/OptionalBooleanParameter:
380
+ Enabled: true
381
+
382
+ Style/RedundantSelfAssignment:
383
+ Enabled: true
384
+
385
+ Style/SingleArgumentDig:
386
+ Enabled: true
387
+
388
+ Style/SoleNestedConditional:
389
+ Enabled: true
390
+
391
+ Style/StringConcatenation:
392
+ Enabled: true
393
+
394
+ Lint/DuplicateRegexpCharacterClassElement:
395
+ Enabled: true
396
+
397
+ Lint/EmptyBlock:
398
+ Enabled: true
399
+
400
+ Lint/ToEnumArguments:
401
+ Enabled: true
402
+
403
+ Lint/UnmodifiedReduceAccumulator:
404
+ Enabled: true
405
+
406
+ Style/ArgumentsForwarding:
407
+ Enabled: true
408
+
409
+ Style/DocumentDynamicEvalDefinition:
410
+ Enabled: false
411
+
412
+ Style/SwapValues:
413
+ Enabled: true
414
+
415
+ Lint/AmbiguousBlockAssociation:
416
+ Exclude:
417
+ - spec/**/*
418
+
419
+ Layout/FirstHashElementIndentation:
420
+ EnforcedStyle: consistent
421
+
422
+ Style/FormatString:
423
+ Enabled: false
424
+
425
+ Style/FormatStringToken:
426
+ Enabled: false
427
+
428
+ Style/NumericPredicate:
429
+ Enabled: false
430
+
431
+ Lint/NoReturnInBeginEndBlocks:
432
+ Enabled: true
433
+
434
+ Style/CollectionCompact:
435
+ Enabled: true
436
+
437
+ Style/NegatedIfElseCondition:
438
+ Enabled: true
439
+
440
+ Lint/DuplicateBranch:
441
+ Enabled: true
442
+
443
+ Lint/EmptyClass:
444
+ Enabled: true
445
+
446
+ Style/NilLambda:
447
+ Enabled: true