simplycop 1.9.5 → 1.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +2 -2
- data/.github/workflows/create-github-release.yml +10 -26
- data/.github/workflows/dobby-actions.yml +2 -2
- data/.github/workflows/publish_gem.yml +1 -1
- data/.github/workflows/version_forget_me_not.yml +1 -1
- data/.simplycop.yml +45 -3
- data/.simplycop_rails.yml +39 -0
- data/.simplycop_rspec.yml +6 -0
- data/lib/simplycop/security/check_for_vulnerable_code.rb +1 -1
- data/lib/simplycop/version.rb +1 -1
- data/simplycop.gemspec +3 -3
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04bc5ffd6bb383b44e116cea89ed9210c0cb836ffc45cd02468bb148f7857437
|
4
|
+
data.tar.gz: 12921bf54b6d0d10ff4bd3ff5ebddae025476b55c2f166d49c26b066bb88f225
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88d9b9612dba9b3710c109bd504cf9cb3471cf2dff06a308551fbdea26ed45abbebc7eb16350cbb0197c70f7627b3bbb7a229d0ba58a3cb148e475a141ef19f9
|
7
|
+
data.tar.gz: 227fd10a49bdba38b09fafe61e566a1bd4e6bcdeace81e5079e04156c3b0c2b028ee15a35904054adc68b9f8ea11408f0fdc1eb89dbc77101b486c96b6923d08
|
data/.github/workflows/ci.yml
CHANGED
@@ -5,30 +5,14 @@ on:
|
|
5
5
|
branches:
|
6
6
|
- "master"
|
7
7
|
|
8
|
+
permissions:
|
9
|
+
contents: write
|
10
|
+
|
8
11
|
jobs:
|
9
|
-
create-release:
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
-
|
15
|
-
|
16
|
-
with:
|
17
|
-
bundler-cache: true
|
18
|
-
- name: Get Gem Version
|
19
|
-
id: get-gem-version
|
20
|
-
run: echo "::set-output name=GEM_VERSION::$(bundle exec ruby -e 'puts Simplycop::VERSION')"
|
21
|
-
- name: Create Release
|
22
|
-
uses: actions/github-script@v5
|
23
|
-
env:
|
24
|
-
GEM_VERSION: ${{ steps.get-gem-version.outputs.GEM_VERSION }}
|
25
|
-
with:
|
26
|
-
result-encoding: string
|
27
|
-
script: |
|
28
|
-
const { GEM_VERSION } = process.env
|
29
|
-
github.rest.repos.createRelease({
|
30
|
-
owner: context.repo.owner,
|
31
|
-
repo: context.repo.repo,
|
32
|
-
tag_name: GEM_VERSION,
|
33
|
-
generate_release_notes: true,
|
34
|
-
})
|
12
|
+
create-new-release:
|
13
|
+
uses: simplybusiness/github-action-reusable-workflows/.github/workflows/create-github-release.yaml@v1
|
14
|
+
with:
|
15
|
+
gem_version_class: "Simplycop::VERSION"
|
16
|
+
secrets:
|
17
|
+
bnw-registry-user: ${{ secrets.GH_ACTIONS_NEXUS_USER }}
|
18
|
+
bnw-registry-password: ${{ secrets.GH_ACTIONS_NEXUS_PASSWORD }}
|
@@ -13,7 +13,7 @@ jobs:
|
|
13
13
|
BUNDLE_WITHOUT: "development:test"
|
14
14
|
steps:
|
15
15
|
- name: Chekcout action
|
16
|
-
uses: actions/checkout@
|
16
|
+
uses: actions/checkout@v3
|
17
17
|
with:
|
18
18
|
repository: 'simplybusiness/dobby'
|
19
19
|
ref: 'v3.0.0'
|
@@ -22,7 +22,7 @@ jobs:
|
|
22
22
|
with:
|
23
23
|
bundler-cache: true
|
24
24
|
- name: Bump version
|
25
|
-
uses: simplybusiness/dobby@v3.0.
|
25
|
+
uses: simplybusiness/dobby@v3.0.1
|
26
26
|
env:
|
27
27
|
DOBBY_APP_ID: ${{ secrets.DOBBY_APP_ID }}
|
28
28
|
DOBBY_PRIVATE_KEY: ${{ secrets.DOBBY_PRIVATE_KEY }}
|
data/.simplycop.yml
CHANGED
@@ -22,9 +22,6 @@ AllCops:
|
|
22
22
|
ExtraDetails: true
|
23
23
|
# Adapted from: https://github.com/simplybusiness/how-we-roll/blob/master/development/RUBYSTYLEGUIDE.markdown
|
24
24
|
|
25
|
-
Gemspec/DateAssignment:
|
26
|
-
Enabled: true
|
27
|
-
|
28
25
|
Layout/EmptyLineAfterMultilineCondition:
|
29
26
|
Enabled: true
|
30
27
|
|
@@ -316,3 +313,48 @@ Style/WordArray:
|
|
316
313
|
|
317
314
|
Style/ZeroLengthPredicate:
|
318
315
|
Enabled: true
|
316
|
+
|
317
|
+
Gemspec/DeprecatedAttributeAssignment: # new in 1.30
|
318
|
+
Enabled: true
|
319
|
+
|
320
|
+
Lint/ConstantOverwrittenInRescue: # new in 1.31
|
321
|
+
Enabled: true
|
322
|
+
|
323
|
+
Lint/EmptyInPattern: # new in 1.16
|
324
|
+
Enabled: true
|
325
|
+
|
326
|
+
Lint/IncompatibleIoSelectWithFiberScheduler: # new in 1.21
|
327
|
+
Enabled: true
|
328
|
+
|
329
|
+
Naming/BlockForwarding: # new in 1.24
|
330
|
+
Enabled: true
|
331
|
+
|
332
|
+
Style/EmptyHeredoc: # new in 1.32
|
333
|
+
Enabled: true
|
334
|
+
|
335
|
+
Style/FileRead: # new in 1.24
|
336
|
+
Enabled: true
|
337
|
+
|
338
|
+
Style/InPatternThen: # new in 1.16
|
339
|
+
Enabled: true
|
340
|
+
|
341
|
+
Style/MagicCommentFormat: # new in 1.35
|
342
|
+
Enabled: true
|
343
|
+
|
344
|
+
Style/MapCompactWithConditionalBlock: # new in 1.30
|
345
|
+
Enabled: true
|
346
|
+
|
347
|
+
Style/MultilineInPatternThen: # new in 1.16
|
348
|
+
Enabled: true
|
349
|
+
|
350
|
+
Style/NestedFileDirname: # new in 1.26
|
351
|
+
Enabled: true
|
352
|
+
|
353
|
+
Style/NumberedParameters: # new in 1.22
|
354
|
+
Enabled: true
|
355
|
+
|
356
|
+
Style/NumberedParametersLimit: # new in 1.22
|
357
|
+
Enabled: true
|
358
|
+
|
359
|
+
Style/ObjectThen: # new in 1.28
|
360
|
+
Enabled: true
|
data/.simplycop_rails.yml
CHANGED
@@ -61,3 +61,42 @@ Rails/WhereExists:
|
|
61
61
|
# Conflicts with Mongoid
|
62
62
|
Rails/WhereNot:
|
63
63
|
Enabled: false
|
64
|
+
|
65
|
+
Rails/ActionControllerTestCase: # new in 2.14
|
66
|
+
Enabled: true
|
67
|
+
|
68
|
+
Rails/AddColumnIndex: # new in 2.11
|
69
|
+
Enabled: true
|
70
|
+
|
71
|
+
Rails/DotSeparatedKeys: # new in 2.15
|
72
|
+
Enabled: true
|
73
|
+
|
74
|
+
Rails/DuplicateAssociation: # new in 2.14
|
75
|
+
Enabled: true
|
76
|
+
|
77
|
+
Rails/DuplicateScope: # new in 2.14
|
78
|
+
Enabled: true
|
79
|
+
|
80
|
+
Rails/EagerEvaluationLogMessage: # new in 2.11
|
81
|
+
Enabled: true
|
82
|
+
|
83
|
+
Rails/ExpandedDateRange: # new in 2.11
|
84
|
+
Enabled: true
|
85
|
+
|
86
|
+
Rails/I18nLazyLookup: # new in 2.14
|
87
|
+
Enabled: true
|
88
|
+
|
89
|
+
Rails/MigrationClassName: # new in 2.14
|
90
|
+
Enabled: true
|
91
|
+
|
92
|
+
Rails/RedundantTravelBack: # new in 2.12
|
93
|
+
Enabled: true
|
94
|
+
|
95
|
+
Rails/ToFormattedS: # new in 2.15
|
96
|
+
Enabled: true
|
97
|
+
|
98
|
+
Rails/TransactionExitStatement: # new in 2.14
|
99
|
+
Enabled: true
|
100
|
+
|
101
|
+
Rails/UnusedIgnoredColumns: # new in 2.11
|
102
|
+
Enabled: true
|
data/.simplycop_rspec.yml
CHANGED
@@ -5,7 +5,7 @@ module Security
|
|
5
5
|
def self.read_file
|
6
6
|
gem_path = File.expand_path("#{File.dirname(__FILE__)}../../../../")
|
7
7
|
|
8
|
-
file = File.
|
8
|
+
file = File.read("#{gem_path}/vuln_db.json").strip
|
9
9
|
json = JSON.parse(file)
|
10
10
|
json["vulnerabilities"]["rails"]
|
11
11
|
end
|
data/lib/simplycop/version.rb
CHANGED
data/simplycop.gemspec
CHANGED
@@ -17,9 +17,9 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
18
|
spec.require_paths = ['lib']
|
19
19
|
|
20
|
-
spec.add_dependency 'rubocop', '~> 1.
|
21
|
-
spec.add_dependency 'rubocop-rails', '~> 2.
|
22
|
-
spec.add_dependency 'rubocop-rspec', '~> 2.
|
20
|
+
spec.add_dependency 'rubocop', '~> 1.35.0'
|
21
|
+
spec.add_dependency 'rubocop-rails', '~> 2.15.0'
|
22
|
+
spec.add_dependency 'rubocop-rspec', '~> 2.12.0'
|
23
23
|
spec.add_development_dependency 'bundler', '>= 2.2.15'
|
24
24
|
spec.add_development_dependency 'rake', '>= 12.3.3'
|
25
25
|
spec.add_development_dependency 'rspec', '~> 3.10'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simplycop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simply Business
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -16,42 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: 1.35.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
26
|
+
version: 1.35.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rubocop-rails
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 2.
|
33
|
+
version: 2.15.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 2.
|
40
|
+
version: 2.15.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rubocop-rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 2.
|
47
|
+
version: 2.12.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 2.
|
54
|
+
version: 2.12.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|