refactor: redesign Processor extension point and add RSpec test suite#14
Open
zhgchgli0718 wants to merge 1 commit into
Open
refactor: redesign Processor extension point and add RSpec test suite#14zhgchgli0718 wants to merge 1 commit into
zhgchgli0718 wants to merge 1 commit into
Conversation
Replace the eval-based Processor dispatch in bin/ZReviewTender with a
proper Registry + Loader so users can ship processors as external
files/gems without forking. Strengthen the Processor base class with a
real abstract contract (#process_reviews + #validate_config!) and a
FilterableProcessor mixin so the six built-ins stop copy-pasting
keywords/ratings/territories filtering. Decouple ReviewFetcher from
SlackProcessor by routing the welcome-message hook through a
WelcomeMessageCapable marker module, and stop GoogleAPI from
accidentally inheriting from Processor.
Legacy YAML (`{ClassName: { class: ..., enable: true, ... }}`) and
processors that override `processReviews` (camelCase) keep working with
a one-line deprecation warning each. Add RSpec + WebMock with 66 specs
covering the framework and all six built-in processors.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace the eval-based Processor dispatch in bin/ZReviewTender with a
proper Registry + Loader so users can ship processors as external
files/gems without forking. Strengthen the Processor base class with a
real abstract contract (#process_reviews + #validate_config!) and a
FilterableProcessor mixin so the six built-ins stop copy-pasting
keywords/ratings/territories filtering. Decouple ReviewFetcher from
SlackProcessor by routing the welcome-message hook through a
WelcomeMessageCapable marker module, and stop GoogleAPI from
accidentally inheriting from Processor.
Legacy YAML (
{ClassName: { class: ..., enable: true, ... }}) andprocessors that override
processReviews(camelCase) keep working witha one-line deprecation warning each. Add RSpec + WebMock with 66 specs
covering the framework and all six built-in processors.