lib/attractor/reporter.rb in attractor-0.2.0 vs lib/attractor/reporter.rb in attractor-0.2.1
- old
+ new
@@ -1,9 +1,10 @@
# frozen_string_literal: true
require 'descriptive_statistics/safe'
require 'fileutils'
+require 'launchy'
require 'tilt'
module Attractor
# base reporter
class Reporter
@@ -55,8 +56,10 @@
FileUtils.mkdir_p './attractor_output'
File.open('./attractor_output/index.html', 'w') { |file| file.write(output) }
puts "Generated HTML report at #{File.expand_path './attractor_output/index.html'}"
+
+ Launchy.open(File.expand_path './attractor_output/index.html')
end
end
end