legendary 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/legendary/info.rb +1 -1
- data/lib/legendary/runner.rb +7 -2
- data/lib/legendary/version.rb +1 -1
- data/lib/legendary/vulnerabilities.rb +0 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf85edaab6da393e8c8adffb24f281cb6deb93a8
|
4
|
+
data.tar.gz: 0a201dcc5f2bc4c04916d51f9d4e9d3a5a1543ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e5ad45a1d97150585fcbad921f5455a29b2d022bccfc682d25e3029a65c055e74926d38ee07f5e3cc56c6a9e0806ef7fd724cdae5554a7503892f7689634e56
|
7
|
+
data.tar.gz: da00205721d68c6c87c38be878a1f034c7c6d8ea5285bc7716c954c28376b69c0219714de96b3b001ef5636a8bb682dc9c9597d09b0d121e63b20e56a7a605c3
|
data/lib/legendary/info.rb
CHANGED
@@ -32,7 +32,7 @@ module Legendary
|
|
32
32
|
# FIXME: speeds things up, but in theory a
|
33
33
|
# a gem might not have a release, but have vulnerable
|
34
34
|
# return false unless (outdated? || git_outdated?)
|
35
|
-
|
35
|
+
vulnerabilities.any?
|
36
36
|
end
|
37
37
|
|
38
38
|
def vulnerabilities
|
data/lib/legendary/runner.rb
CHANGED
@@ -10,15 +10,20 @@ module Legendary
|
|
10
10
|
|
11
11
|
Legendary.logger.info("Loading Gems")
|
12
12
|
|
13
|
+
success = true
|
14
|
+
|
13
15
|
Gems.new.each do |gem|
|
14
16
|
if gem.outdated?
|
15
|
-
|
17
|
+
Legendary.logger.info("#{gem.name} is outdated. #{gem.version} -> #{gem.latest_version} (it is #{gem.gemfile ? 'in your gemfile' : 'a dependency'})")
|
16
18
|
end
|
17
19
|
|
18
20
|
if gem.vulnerable?
|
19
|
-
|
21
|
+
Legendary.logger.info("#{gem.name} is vulnerable.")
|
22
|
+
success false
|
20
23
|
end
|
21
24
|
end
|
25
|
+
|
26
|
+
exit 1 unless success
|
22
27
|
end
|
23
28
|
end
|
24
29
|
end
|
data/lib/legendary/version.rb
CHANGED