polariscope 0.1.3 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +12 -0
- data/CHANGELOG.md +4 -0
- data/lib/polariscope/scanner/codebase_health_score.rb +14 -1
- data/lib/polariscope/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bedcc2db6f82679631ccdd4d7d3b007beaa22421639347301ab37e43796cab9a
|
4
|
+
data.tar.gz: fb9904ba457696f0409c7b6162ad99843c8abae2d23d26dfc10391bc306bdd53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c986b31f221691c6de5ffc81d354b07bbd96a2003b5537a8f59d2e74fd1733f39f348be129c6ec9d65b5491131aabda10ee14b8e6a27a55f73dfc7882210c09
|
7
|
+
data.tar.gz: 68377f2df1b43e99b9cd2ff88a2b9cfac558246dac6144ea77d011112bcf48b4e44f979a663499e2fdc21e751d1ac333a556dd99630d8073af4f9be6d5142dba
|
data/.rubocop.yml
CHANGED
@@ -11,6 +11,18 @@ AllCops:
|
|
11
11
|
RSpec/MultipleExpectations:
|
12
12
|
Max: 5
|
13
13
|
|
14
|
+
RSpec/NestedGroups:
|
15
|
+
Max: 5
|
16
|
+
|
17
|
+
RSpec/MultipleMemoizedHelpers:
|
18
|
+
Enabled: false
|
19
|
+
|
14
20
|
Style/FrozenStringLiteralComment:
|
15
21
|
Exclude:
|
16
22
|
- 'exe/polariscope'
|
23
|
+
|
24
|
+
Rails/TimeZone:
|
25
|
+
Enabled: false
|
26
|
+
|
27
|
+
Rails/Date:
|
28
|
+
Enabled: false
|
data/CHANGELOG.md
CHANGED
@@ -17,7 +17,8 @@ module Polariscope
|
|
17
17
|
|
18
18
|
begin
|
19
19
|
GemfileHealthScore.new(gemfile_path: gemfile_file.path, gemfile_lock_content: gemfile_lock_content,
|
20
|
-
bundler_audit_config_path: bundler_audit_config_file.path
|
20
|
+
bundler_audit_config_path: bundler_audit_config_file.path,
|
21
|
+
update_audit_database: update_audit_database?).health_score
|
21
22
|
ensure
|
22
23
|
gemfile_file.unlink
|
23
24
|
bundler_audit_config_file.unlink
|
@@ -51,6 +52,18 @@ module Polariscope
|
|
51
52
|
def blank?(value)
|
52
53
|
value.nil? || value == ''
|
53
54
|
end
|
55
|
+
|
56
|
+
def update_audit_database?
|
57
|
+
audit_db_missing? || audit_db_stale?
|
58
|
+
end
|
59
|
+
|
60
|
+
def audit_db_missing?
|
61
|
+
!Bundler::Audit::Database.exists?
|
62
|
+
end
|
63
|
+
|
64
|
+
def audit_db_stale?
|
65
|
+
((Time.now - Bundler::Audit::Database.new.last_updated_at) / 86_400) > 7
|
66
|
+
end
|
54
67
|
end
|
55
68
|
end
|
56
69
|
end
|
data/lib/polariscope/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: polariscope
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rails team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-08-
|
11
|
+
date: 2024-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|