From 787686a1d866a3789215abaf699d245104e9a5be Mon Sep 17 00:00:00 2001 From: Masumi Kawasaki Date: Fri, 1 Oct 2021 20:56:14 +0900 Subject: [PATCH] Add methods for calculating M/C and LOC/M --- test/dummy/app/controllers/application_controller.rb | 4 ++++ test/lib/rails_stats/code_statistics_test.rb | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/test/dummy/app/controllers/application_controller.rb b/test/dummy/app/controllers/application_controller.rb index 98ccf6f..0bbe146 100644 --- a/test/dummy/app/controllers/application_controller.rb +++ b/test/dummy/app/controllers/application_controller.rb @@ -1,3 +1,7 @@ class ApplicationController < ActionController::Base include Pagy::Backend + + def hello + p hello + end end diff --git a/test/lib/rails_stats/code_statistics_test.rb b/test/lib/rails_stats/code_statistics_test.rb index bfdd6ab..1c26531 100644 --- a/test/lib/rails_stats/code_statistics_test.rb +++ b/test/lib/rails_stats/code_statistics_test.rb @@ -10,18 +10,18 @@ +----------------------+---------+---------+---------+---------+-----+-------+ | Channels | 8 | 8 | 2 | 0 | 0 | 0 | | Configuration | 417 | 111 | 1 | 0 | 0 | 0 | -| Controllers | 3 | 3 | 1 | 0 | 0 | 0 | +| Controllers | 7 | 6 | 1 | 1 | 1 | 4 | | Helpers | 3 | 3 | 0 | 0 | 0 | 0 | | Javascripts | 27 | 7 | 0 | 0 | 0 | 0 | | Jobs | 7 | 2 | 1 | 0 | 0 | 0 | | Mailers | 4 | 4 | 1 | 0 | 0 | 0 | | Models | 3 | 3 | 1 | 0 | 0 | 0 | +----------------------+---------+---------+---------+---------+-----+-------+ -| Code | 472 | 141 | 7 | 0 | 0 | 0 | +| Code | 476 | 144 | 7 | 1 | 0 | 142 | | Tests | 0 | 0 | 0 | 0 | 0 | 0 | -| Total | 472 | 141 | 7 | 0 | 0 | 0 | +| Total | 476 | 144 | 7 | 1 | 0 | 142 | +----------------------+---------+---------+---------+---------+-----+-------+ - Code LOC: 141 Test LOC: 0 Code to Test Ratio: 1:0.0 + Code LOC: 144 Test LOC: 0 Code to Test Ratio: 1:0.0 EOS