Skip to content

Commit fa0df3e

Browse files
committed
fix issue by upgrade launchy
1 parent 45cdba4 commit fa0df3e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/railsbp_in_browser.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ def generate_html
1818
puts "Generating the code climate ..."
1919
`rails_best_practices . > rails_best_practices_output.html`
2020

21+
output_file_path = "#{ENV['HOME']}/tmp/code_climate.html"
2122
f = File.open("rails_best_practices_output.html")
22-
of = File.open("code_climate.html", 'w')
23+
of = File.open(output_file_path, 'w')
2324
reg = /.*\[31m(.*):([0-9]+) - (.*)\e.*/
2425
f.each_line do |line|
2526
next unless reg.match(line)
@@ -49,7 +50,7 @@ def generate_html
4950
of.close
5051

5152
puts "Open report in the Browser"
52-
Launchy.open('./code_climate.html')
53+
Launchy.open(output_file_path)
5354

5455
`rm rails_best_practices_output.html`
5556
`rm code_climate.html`

0 commit comments

Comments
 (0)