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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5ac4b3cc8c9d05fbbff30808ba7771c78bc1f841
4
- data.tar.gz: 14440bea8e2dcd757aab109d4d522c77483f61c2
3
+ metadata.gz: cf85edaab6da393e8c8adffb24f281cb6deb93a8
4
+ data.tar.gz: 0a201dcc5f2bc4c04916d51f9d4e9d3a5a1543ed
5
5
  SHA512:
6
- metadata.gz: 5fe704860adfdabafb77c69a0ce1643f7058010432438f705638f1076221afa629350910fcf690ed2ff11e3678de13632ac60c80192c0002a20ab6b3bd193a7d
7
- data.tar.gz: 1f4f4c7706692d6ca059e043165eb02606a5c8a60b8e75cfd89416269e2aad710eb5e8e21244ec9c52ed45cd3746cfd7d5ef1484f23a61cb8bf88f19398545a8
6
+ metadata.gz: 1e5ad45a1d97150585fcbad921f5455a29b2d022bccfc682d25e3029a65c055e74926d38ee07f5e3cc56c6a9e0806ef7fd724cdae5554a7503892f7689634e56
7
+ data.tar.gz: da00205721d68c6c87c38be878a1f034c7c6d8ea5285bc7716c954c28376b69c0219714de96b3b001ef5636a8bb682dc9c9597d09b0d121e63b20e56a7a605c3
@@ -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
- return vulnerabilities.to_a.size > 0
35
+ vulnerabilities.any?
36
36
  end
37
37
 
38
38
  def vulnerabilities
@@ -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
- puts "#{gem.name} is outdated. #{gem.version} -> #{gem.latest_version} (it is a #{gem.gemfile ? 'in your gemfile' : 'dependency'})"
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
- puts "#{gem.name} is vulnerable."
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
@@ -1,3 +1,3 @@
1
1
  module Legendary
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
@@ -18,8 +18,6 @@ module Legendary
18
18
  def each
19
19
  return nil unless exists?
20
20
 
21
- Legendary.logger.info("#{@info.name} : #{path}")
22
-
23
21
  Dir.foreach(path) do |yaml_file|
24
22
  next if yaml_file =~ /\A\./
25
23
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: legendary
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - John D'Agostino