File tree Expand file tree Collapse file tree 4 files changed +29
-7
lines changed Expand file tree Collapse file tree 4 files changed +29
-7
lines changed Original file line number Diff line number Diff line change 1
1
# main ([ unreleased] ( https://github.com/fastruby/rails_stats/compare/v1.0.2...main ) )
2
2
3
- *
3
+ * [ BUGFIX: Fix JSON output missing Code and Tests total count ] ( https://github.com/fastruby/rails_stats/pull/40 )
4
4
5
5
# v2.0.1 ([ commits] ( https://github.com/fastruby/rails_stats/compare/v2.0.0...v2.0.1 ) )
6
6
Original file line number Diff line number Diff line change @@ -5,9 +5,9 @@ class JSONFormatter < StatsFormatter
5
5
def result
6
6
@result = @statistics . map { |key , stats | stat_hash ( key , stats ) }
7
7
8
- if @grand_total
9
- @result << stat_hash ( "Total " , @grand_total ) . merge ( code_test_hash )
10
- end
8
+ @result << stat_hash ( "Code" , @code_total ) . merge ( code_test_hash ) if @code_total
9
+ @result << stat_hash ( "Tests " , @tests_total ) . merge ( code_test_hash ) if @tests_total
10
+ @result << stat_hash ( "Total" , @grand_total ) . merge ( code_test_hash ) if @grand_total
11
11
12
12
@result
13
13
end
Original file line number Diff line number Diff line change 1
1
+-----------------------|------------|----------------+
2
2
| Name | Total Deps | 1st Level Deps |
3
3
+-----------------------|------------|----------------+
4
- | simplecov-console | 7 | 3 |
5
- | codecov | 5 | 2 |
4
+ | simplecov-console | 8 | 3 |
5
+ | codecov | 4 | 1 |
6
6
| rails_stats | 4 | 2 |
7
7
| simplecov | 3 | 3 |
8
8
| minitest-around | 1 | 1 |
21
21
| Name | Files | Lines | LOC | Classes | Methods | M/C | LOC/M |
22
22
+----------------------+---------+---------+---------+---------+---------+-----+-------+
23
23
| Channels | 2 | 8 | 8 | 2 | 0 | 0 | 0 |
24
- | Configuration | 19 | 417 | 111 | 1 | 0 | 0 | 0 |
24
+ | Configuration | 19 | 417 | 111 | 1 | 0 | 0 | 0 |
25
25
| Controllers | 1 | 7 | 6 | 1 | 1 | 1 | 4 |
26
26
| Helpers | 1 | 3 | 3 | 0 | 0 | 0 | 0 |
27
27
| Javascripts | 3 | 27 | 7 | 0 | 0 | 0 | 0 |
Original file line number Diff line number Diff line change 113
113
"methods": "0",
114
114
"m_over_c": "0",
115
115
"loc_over_m": "0"
116
+ },{
117
+ "name": "Code",
118
+ "files": "30",
119
+ "lines": "477",
120
+ "loc": "145",
121
+ "classes": "7",
122
+ "methods": "1",
123
+ "m_over_c": "0",
124
+ "loc_over_m": "143",
125
+ "code_to_test_ratio": "0.0",
126
+ "total": true
127
+ },{
128
+ "name": "Tests",
129
+ "files": "4",
130
+ "lines": "7",
131
+ "loc": "6",
132
+ "classes": "2",
133
+ "methods": "0",
134
+ "m_over_c": "0",
135
+ "loc_over_m": "0",
136
+ "code_to_test_ratio": "0.0",
137
+ "total": true
116
138
}, {
117
139
"name": "Total",
118
140
"files": "34",
You can’t perform that action at this time.
0 commit comments