lib/genevalidator/output.rb in genevalidator-1.6.4 vs lib/genevalidator/output.rb in genevalidator-1.6.5

- old
+ new

@@ -171,14 +171,14 @@ create_overview_json(overview[:scores], config[:plot_dir], less, evaluation) end def self.turn_off_sorting(html_path) - script_file = File.join(html_path, 'files/js/script.js') - File.open("#{script_file}.tmp", 'w') do |f| - f.puts File.readlines(script_file)[30..-1].join - end + script_file = File.join(html_path, + 'files/js/genevalidator.compiled.min.js') + content = File.read(script_file).gsub(',initTableSorter(),', ',') + File.open("#{script_file}.tmp", 'w') { |f| f.puts content } FileUtils.mv("#{script_file}.tmp", script_file) end def self.print_summary_to_console(overall_evaluation, summary) # print to console @@ -191,10 +191,11 @@ # make the historgram with the resulted scores def self.create_overview_json(scores, plot_dir, less, evaluation) plot_file = File.join(plot_dir, 'overview.json') data = [scores.group_by { |a| a }.map { |k, vs| { 'key' => k, 'value' => vs.length, 'main' => false } }] - hash = { data: data, type: :simplebars, title: 'Overall Evaluation', + hash = { data: data, type: :simplebars, + title: 'Overall GeneValidator Score Evaluation', footer: '', xtitle: 'Validation Score', ytitle: 'Number of Queries', aux1: 10, aux2: '', less: less, evaluation: evaluation } File.open(plot_file, 'w') { |f| f.write hash.to_json } end