Skip to content
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

Filters restructuring #51

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Filters restructuring #51

wants to merge 2 commits into from

Conversation

tomaskir
Copy link
Contributor

@tomaskir tomaskir commented Jan 4, 2018

This PR contains restructuring of the Filters class.

What was done:

  • split built-in filters into a separate BuiltinFilters class
  • added a VT100 sequence filter into the new BuiltinFilters class
  • split Filters#chain(...) method into a separate FilterChain class

Why:
It makes it easier for new users to understand the purpose of each of the new classes.
BuiltinFilters class contains built-in filters that can be used out-of-the-box.
Fitlers class is now a class which can be used to build new custom filters.
FilterChain class is used for building filter-chains, nothing else.

By separating these 3 constructs into separate classes, new users will have an easier time picking up on how filtering works in ExpectIt.

Downside:
Doing this breaks compatibility with existing code that was importing Filters class to use the built-in filters. Users will have to change imports to the new BuiltinFilters class.
Same with the new FilterChain class.

@agavrilov76
Copy link
Owner

Thank you for your PR! Since this is non-backward compatible change I cannot include it into a minor version release. Will include it into 1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants