-
Notifications
You must be signed in to change notification settings - Fork 21.9k
Update, unify, encapsulate, and fix various code tools in Rails #16294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -0,0 +1,41 @@ | |||
#!/usr/bin/env ruby |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should have .rb extension?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm just being consistent with the format of that directory..
If tools are going to be extracted and encapsulated, they should have their own test coverage. |
Fix bug in path expansion of input filepath [ci skip]
…eStatistics [ci skip]
@egilburg Just to be clear, you're advocating that I write tests for the currently untested code? Yeah, that's part of next step. |
Can you elaborate on what's changed since #11148? I guess I missed something, because that seems to conclude with a pretty strong "no thanks". |
@matthewd In the discussion there, @dhh wrote "please do make a PR with any improvements you've made to the code". That is this PR. (Or at least begins here. There's more to do.) Some differences:
I wish we had met at some point so I could get an idea of where you're coming from. Removing code from Rails that isn't part of Rails is kind of a no-brainer up to the point not wanting to break anything. Rails is web app framework. There's no reason it should have rotting metrics tools spread throughout it. And I'm pro metrics (I was prompted to consider this work after watching @tenderlove's recent talk at RedDot Ruby. I'm pretty into metrics. FWIW, I maintain metric_fu, help on simplecov, and have commit to a few others.) |
bump? @rafaelfranca @fxn thoughts? |
💤 |
Update, unify, encapsulate, and fix various code tools in Rails
@rafaelfranca wow, thanks! |
You are welcome. |
@rafaelfranca What would you think of a PR creating a |
@bf4 👍 but it will be better if the gem was named |
@seuros wow, you're a collaborator now! Congrats! 👯 Is that |
Thank you :). |
hmm, not sure if it is worth. What we would gain with this change? These tools are internal. |
@rafaelfranca Well, my motivation would be to move the code for If we think of Rails gems in terms of responsibilities, and their responsibilities being simplified and broken down into smaller gems (e.g. actionpack an actionview), this is a natural progression, as railties is really where the Rails web app is defined, and is not the natural place for tooling. |
I'm all the copy the code here and create a new gem, but I'm 👎 for creating a new gem inside Rails repository. This will create extra work for doing releases for something that I don't believe it is worth. |
Part of merging development from https://github.com/bf4/code_metrics
and #11148
back into Rails
Next steps, if given go ahead, is to create an internal
code_tools gem, either in the tools directory, or inside railties
that
See https://github.com/bf4/rails/tree/code_tools_next/tools/code_tools for what this could look like
I would also move into it the code and functionality of
rake stats and rake notes.