lib/attractor/reporters/reporter.rb in attractor-0.3.3 vs lib/attractor/reporters/reporter.rb in attractor-0.3.4

- old
+ new

@@ -67,10 +67,12 @@ FileUtils.mkdir_p './attractor_output/javascripts' File.open('./attractor_output/images/attractor_logo.svg', 'w') { |file| file.write(logo) } File.open('./attractor_output/stylesheets/main.css', 'w') { |file| file.write(css) } File.open('./attractor_output/javascripts/index.js', 'w') { |file| file.write(javascript) } + File.open('./attractor_output/javascripts/index.pack.js', 'w') { |file| file.write(javascript_pack) } + File.open('./attractor_output/index.html', 'w') { |file| file.write(render) } puts "Generated HTML report at #{File.expand_path './attractor_output/index.html'}" Launchy.open(File.expand_path('./attractor_output/index.html')) end @@ -79,9 +81,13 @@ File.read(File.expand_path('../../../app/assets/images/attractor_logo.svg', __dir__)) end def css File.read(File.expand_path('../../../app/assets/stylesheets/main.css', __dir__)) + end + + def javascript_pack + File.read(File.expand_path('../../../app/assets/javascripts/index.pack.js', __dir__)) end def javascript template = Tilt.new(File.expand_path('../../../app/assets/javascripts/index.js.erb', __dir__)) template.render self