versioneye / crawl_r

VersionEye crawlers implemented in Ruby.
https://www.versioneye.com
Other
10 stars 7 forks source link

[Refactor] Every CrawlWorker has same implementation of `work` function #62

Open timgluz opened 7 years ago

timgluz commented 7 years ago

I noticed that most of CrawlWorker are duplicating the work method, which could be moved into parent class like the GosearchVersionWorker does: https://github.com/versioneye/crawl_r/blob/master/lib/versioneye/workers/crates_crawl_worker.rb

reiz commented 7 years ago

Yes. That's a good idea. They can be simplified. But if we do that we have to write some tests for the current implementation. Some of the workers are covered by tests, some not. If we have a 90% test coverage for the existing workers then we can start refactoring. This part is very critical.