Skip to content

Commit 85adf0d

Browse files
Merge pull request #2432 from coreinfrastructure/stats_tweak
Tweak report_code_statistics
2 parents 4a6e64f + 3329e13 commit 85adf0d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

script/report_code_statistics

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
#!/bin/sh
22
echo
3+
bin/rails stats
4+
# Compute the direct dependencies from Gemfile.lock by counting
5+
# ONLY non-empty lines between "DEPENDENCIES" and "RUBY VERSION":
36
direct=$(sed -e '1,/^DEPENDENCIES/d' -e '/^RUBY VERSION/,$d' \
47
-e '/^$/d' Gemfile.lock | wc -l)
5-
indirect=$(bundle list | tail -n +2 | wc -l)
8+
indirect=$(bundle list | grep -c '^ *\* ')
69
echo "Number of gems (direct dependencies only) = $direct"
710
echo "Number of gems (including indirect dependencies) = $indirect"
811
echo
9-
bin/rails stats
10-
echo
1112
true

0 commit comments

Comments
 (0)