legendary 0.1.5 → 0.1.6

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: 6d823b2f7eac5326b6ffb269f1da3343f95a2f9a
4
- data.tar.gz: 10e2a5e564af03139a2866c18bfd90a0fe158d3b
3
+ metadata.gz: d4ef3c710bcc23409a6f1923e4856a0e43ccb2fb
4
+ data.tar.gz: 74f4a311903ce7b0e9aa2f0108f826385dede885
5
5
  SHA512:
6
- metadata.gz: cf62e7922edacd69c3ef78735989a961eed5fc1f80dc88c8086a8f01efed15e477483f14b8653ab8b64cf40861389fd10b4dd74cd3c580cced306b54fd4c97f7
7
- data.tar.gz: b0294348c603986f2d553d1e8344193b5c95ff8fca5d418dac02d7ff90dc64b89b017d68b9b2bfada38bb7489af9ad0a789745487b74d776b55e56614d40a3f4
6
+ metadata.gz: f10e069ab71f9f7ff08ebcc855fe01e939b6638440d76ce2fd68a2190ea391db9c571a99447ab81b1cc5d08d790f8e47b136020b0411ccf2a71535850a9e716e
7
+ data.tar.gz: 4d424aaa1dd54984aef7ede5d76516cf9e4a8ea94bc1347d8d7fe607fa52cbb827d9f38cc001ab0f192c06b0606202776d67e8151b4fca72ebc71f7ac1b1020c
@@ -37,7 +37,7 @@ module Legendary
37
37
 
38
38
  def vulnerable?
39
39
  # FIXME: speeds things up, but in theory a
40
- # a gem might not have a release, but have vulnerable
40
+ # a gem might not have a release, but have vulnerablity
41
41
  # return false unless (outdated? || git_outdated?)
42
42
  vulnerabilities.any?
43
43
  end
@@ -1,23 +1,27 @@
1
1
  require 'rspec/matchers'
2
2
 
3
- $GEMS = Legendary::Gems.new
3
+ module GemStore
4
+ def self.gems
5
+ @gems ||= Legendary::Gems.new.to_a
6
+ end
7
+ end
4
8
 
5
9
  RSpec::Matchers.define :be_secure do
6
10
  match do |thing|
7
- vulnerable_gems = $GEMS.collect do |gem|
8
- gem.vulnerable?
11
+ vulnerable_gems = GemStore.gems.collect do |gem|
12
+ gem if gem.vulnerable?
9
13
  end
10
14
 
11
- expect(vulnerable_gems.empty?).to be_truthy
15
+ expect(vulnerable_gems.length).to eql(0)
12
16
  end
13
17
  end
14
18
 
15
19
  RSpec::Matchers.define :be_updated do
16
20
  match do |thing|
17
- outdated = $GEMS.collect do |gem|
18
- gem.outdated?
21
+ outdated = GemStore.gems.collect do |gem|
22
+ gem if gem.outdated?
19
23
  end
20
24
 
21
- expect(outdated.empty?).to be_truthy
25
+ expect(outdated.length).to eql(0)
22
26
  end
23
27
  end
@@ -1,3 +1,3 @@
1
1
  module Legendary
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
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.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - John D'Agostino