#360: extract Compress module (unzip/zipped) from god-class#392
Conversation
|
CI failure note: The All 118 other tests pass, and all non-live checks (rubocop, copyrights, markdown-lint, pdd, reuse, xcop, actionlint, typos, yamllint) pass successfully. |
|
@VasilevNStas please fix merge conflics |
9963b48 to
367c962
Compare
|
@yegor256 this PR is blocked by the All our PRs have been rebased on the test fix from #393 (increased timeout, unique job names, fixed elapsed time display). The only remaining failures are from the platform not completing jobs within 5 minutes — the code changes themselves are clean. A review and platform fix would unblock all of these. Thanks! |
|
@yegor256 plz review |
|
@VasilevNStas Thanks for the contribution! You've earned +24 points for this: +24 as a basis; +5 for the 76 hits-of-code that you wrote; -6 to not go over the cap. Please, keep them coming. Your running score is +2368; don't forget to check your Zerocracy account too). |
Problem
BazaRbwas a god-class at 940 lines with 5+ responsibilities. The rubocop config already disabledMetrics/AbcSize,Metrics/BlockLength, andMetrics/ClassLengthfor this file.Solution
Step 1 of evolutionary refactoring: extracted compression helpers (
unzip,zipped) intoBazaRb::Compressmodule atlib/baza-rb/compress.rb.lib/baza-rb/compress.rbwithCompressmodulebaza-rb.rbnow includes the module and dropped 30 linesVerification
bundle exec rubocop— 0 offensesNext steps: extract HTTP layer (
http.rb), transfer logic (transfer.rb).Closes #360.