[PR 11148] Extracting out rake stats into a gem (code_metrics)

Just joined the group. Please let me know if I am not posting this appropriately.

I think the PR is done, just needs ok to merge and if it should be back-ported.

I rebase if off our master periodically to ensure a clean merge.

Re: Remove code_statistics so it can be required as a gem by bf4 · Pull Request #11148 · rails/rails · GitHub

Whereas

  • The code_statistics code in rails provides useful functionality
  • It does not depend on rails in any way
  • Its development does not need to depend on the rails release cycle I have generated a rails plugin and have moved the code there, including tests, so that it can be run as a separately installed gem.

I have renamed the gem code_metrics (rather than code_statistics) to prevent name collisions with the rails code.