File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44require 'ruby_example'
55
66describe "gems" do
7- Dir . glob ( File . join ( File . dirname ( __FILE__ ) , '../gems/*/*.yml ' ) ) do |path |
7+ Dir . glob ( File . join ( File . dirname ( __FILE__ ) , '../gems/*/*' ) ) do |path |
88 include_examples 'Gem Advisory' , path
99 end
1010end
1111
1212describe "libraries" do
13- Dir . glob ( File . join ( File . dirname ( __FILE__ ) , '../libraries/*/*.yml ' ) ) do |path |
13+ Dir . glob ( File . join ( File . dirname ( __FILE__ ) , '../libraries/*/*' ) ) do |path |
1414 include_examples 'Libraries Advisory' , path
1515 end
1616end
1717
1818describe "rubies" do
19- Dir . glob ( File . join ( File . dirname ( __FILE__ ) , '../rubies/*/*.yml ' ) ) do |path |
19+ Dir . glob ( File . join ( File . dirname ( __FILE__ ) , '../rubies/*/*' ) ) do |path |
2020 include_examples 'Rubies Advisory' , path
2121 end
2222end
Original file line number Diff line number Diff line change 55 advisory = YAML . load_file ( path )
66
77 describe path do
8- let ( :filename ) { File . basename ( path ) . chomp ( '.yml' ) }
8+ let ( :filename ) { File . basename ( path ) }
99
1010 let ( :filename_cve ) do
1111 if filename . start_with? ( 'CVE-' )
2020 end
2121
2222 it "should be correctly named CVE-XXX or OSVDB-XXX" do
23- expect ( filename ) . to match ( /^(CVE-\d {4}-(0\d {3}|[1-9]\d {3,})|OSVDB-\d +)$/ )
23+ expect ( filename ) .
24+ to match ( /^(CVE-\d {4}-(0\d {3}|[1-9]\d {3,})|OSVDB-\d +)\. yml$/ )
2425 end
2526
2627 it "should have CVE or OSVDB" do
5152 end
5253 it "should be id in filename if filename is CVE-XXX" do
5354 if filename_cve
54- is_expected . to eq ( filename_cve )
55+ is_expected . to eq ( filename_cve . chomp ( '.yml' ) )
5556 end
5657 end
5758 end
You can’t perform that action at this time.
0 commit comments