lib/brakeman/report/ignore/config.rb in brakeman-min-5.1.0 vs lib/brakeman/report/ignore/config.rb in brakeman-min-5.1.1

- old
+ new

@@ -98,18 +98,18 @@ @already_ignored.select { |i| i if i[:note].strip.empty? } end # Read configuration to file def read_from_file file = @file - if File.exist? file.absolute + if File.exist? file begin @already_ignored = JSON.parse(File.read(file), :symbolize_names => true)[:ignored_warnings] rescue => e - raise e, "\nError[#{e.class}] while reading brakeman ignore file: #{file.relative}\n" + raise e, "\nError[#{e.class}] while reading brakeman ignore file: #{file}\n" end else - Brakeman.notify "[Notice] Could not find ignore configuration in #{file.relative}" + Brakeman.notify "[Notice] Could not find ignore configuration in #{file}" @already_ignored = [] end @already_ignored.each do |w| @ignored_fingerprints << w[:fingerprint] @@ -132,10 +132,10 @@ :ignored_warnings => warnings, :updated => Time.now.to_s, :brakeman_version => Brakeman::Version } - File.open file.absolute, "w" do |f| + File.open file, "w" do |f| f.puts JSON.pretty_generate(output) end end # Save old ignored warnings and newly ignored ones