We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45cdba4 commit fa0df3eCopy full SHA for fa0df3e
lib/railsbp_in_browser.rb
@@ -18,8 +18,9 @@ def generate_html
18
puts "Generating the code climate ..."
19
`rails_best_practices . > rails_best_practices_output.html`
20
21
+ output_file_path = "#{ENV['HOME']}/tmp/code_climate.html"
22
f = File.open("rails_best_practices_output.html")
- of = File.open("code_climate.html", 'w')
23
+ of = File.open(output_file_path, 'w')
24
reg = /.*\[31m(.*):([0-9]+) - (.*)\e.*/
25
f.each_line do |line|
26
next unless reg.match(line)
@@ -49,7 +50,7 @@ def generate_html
49
50
of.close
51
52
puts "Open report in the Browser"
- Launchy.open('./code_climate.html')
53
+ Launchy.open(output_file_path)
54
55
`rm rails_best_practices_output.html`
56
`rm code_climate.html`
0 commit comments