Created
June 11, 2014 12:02
-
-
Save mocoso/5fce468083596d5ba560 to your computer and use it in GitHub Desktop.
Relative size of rails and other gems vs. our own code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ bundle install --path ~/tmp/bundle && find ~/tmp/bundle/ruby/2.0.0/gems -name "*.rb" -print0 | xargs -0 -I file cat file | wc -l | |
1155178 | |
$ find . -name "*.rb" -print0 | xargs -0 -I file cat file | wc -l | |
62654 | |
$ irb | |
>> (1155178.0 / (1155178 + 62654) * 100).round.to_s + "% of ruby code in this project is in rails and other gems" | |
=> "95% of ruby code in this project is in rails and other gems" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment