Class: QaulityMeter::ReportController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- QaulityMeter::ReportController
- Defined in:
- app/controllers/quality_meter/report_controller.rb
Instance Method Summary collapse
-
#index ⇒ Object
GET::report#index localhost:3000/qmeter.
Instance Method Details
#index ⇒ Object
GET::report#index localhost:3000/qmeter
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'app/controllers/quality_meter/report_controller.rb', line 8 def index thresholds = {} thresholds['security_warnings_min'] = 1 thresholds['security_warnings_max'] = 100 thresholds['rails_best_practices_min'] = 30 thresholds['rails_best_practices_max'] = 100 thresholds['flog_complexity_min'] = 3 thresholds['flog_complexity_max'] = 25 thresholds['stats_ratio_min'] = 0.0 thresholds['stats_ratio_max'] = 5.0 extend QaulityMeter # Call methods from lib/qmeter.rb self.initialize_thresholds(thresholds) self.generate_final_report self.choose_color # move report.html from root to the /public folder FileUtils.cp('report.html', 'public/') if File.file?("#{Rails.root}/report.html") render layout: false end |