ExpectIt
ExpectIt copied to clipboard
Filters restructuring
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 separateFilterChain
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.
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.