Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Commit

Permalink
Add option to ignore vulnerabilities by the id. (#4)
Browse files Browse the repository at this point in the history
* Fix Rubocop
  • Loading branch information
sundus-y committed Oct 29, 2018
1 parent ac863ae commit 2e0685a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/dependency_spy_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

RSpec.describe DependencySpy::API do
describe 'check' do
detected_manifests = DependencySpy::API.check({ path: 'examples' })
detected_manifests = DependencySpy::API.check(:path => 'examples')

it 'can read all manifests inside examples' do
expect(detected_manifests).to have(5).items
Expand Down Expand Up @@ -57,7 +57,7 @@
select_count = vulnerabilities.select { |v| v.id == 'snykio:rubygems:rubocop:CVE-2017-8418' }.count
expect(select_count).to be(1)

filtered_detected_manifests = DependencySpy::API.check({ path: 'examples', ignore: ['snykio:rubygems:rubocop:CVE-2017-8418'] })
filtered_detected_manifests = DependencySpy::API.check(:path => 'examples', :ignore => ['snykio:rubygems:rubocop:CVE-2017-8418'])
manifests = filtered_detected_manifests.select { |m| m.platform == 'rubygems' }
dependencies = manifests.map(&:dependencies).flatten
vulnerabilities = dependencies.map(&:vulnerabilities).flatten
Expand Down

0 comments on commit 2e0685a

Please sign in to comment.