-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Codebase refactoring #451
Codebase refactoring #451
Conversation
Thanks for your interest in the project. However, 1.8 is included in the CI suite, and you must not break CI. Therefore you must keep 1.8 compatibility and not use I might cherry-pick some style changes that I agree with, however I'm not sold on extracting classes to their own file, especially because it breaks Also, I'm not a fan of significant refactorings just for the sake of refactoring and "improving" style, since that causes mantenance nightmares down the line for me as I need to resolve extra conflicts while applying current PRs and cherry-picking between master and "1.10" branch. |
|
|
Anyway, I'm not expecting you to just click the merge button and integrate all the changes at once. Like I said, my point is to raise the discussion about the current state of the codebase. I think there is room for improvement in the points I touched (and more); you may disagree with my opinion. |
Bit of bad news for this PR. Recently we've decided that the next major release of hub will be written in Go instead of Ruby: #475 This work is being done in the "gh" branch. As a consequence of that, we're not going to make major improvements to the Ruby codebase. It doesn't make sense, since we're not going to mainain it in the long run except bug fixes for the 1.11.x branch of releases. |
Recently I got interested in this project and felt interested in help with maintenance, but one of the things that bugged me the most when I cloned the repo and took a look at the codebase is that it felt messy :( So I decided to do some very basic brush-up at first, as a way to get used to the codebase while trying to improve it a little. This is the result of it. Beware that these commits break ruby 1.8 compatibility (I'm not sure how much this matters :); the build is green on my end, I did the whole refactoring trusting the current test coverage.
What I did was mainly extract classes to their own files, extract some methods, remove whitespace, and stick to some more obvious conventions. It seems like the codebase is kind of old and the basic structure has never changed. I did try to not make many big changes here, but I have another branch with more specific style fixes (guided by the ruby style guide - I'll submit another PR if this gets accepted).
Anyway, if you guys disagree with this, please share your thoughts.