-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Refactor formatter/ANSIColor #1589
Conversation
The gem is not a dependency of cucumber, but its installation was automatically detected by code. This gem is not very popular, and unmaintained, and is used only to make sure 256 colors are available on the user's terminal. When the gem is not installed, it fallback to defining the 'grey' method anyway. Removing that gem result in declaring the 'grey' method as part of 'Cucumber::Term::ANSIColor': it did not make sense anymore to keep it away from that module which already defined all other term colors.
Putting a call to a regexp before a call to 'Regexp.last_match' may improve the readibility of the code as it follows a more natural reading direction
Do we still need the
It looks like there were part of old warning mesages which are not displayed anymore: 05252af And they are unused at the moment |
Is this an answer to the question "do we remove those 'cukes' methods"? |
Sorry I meant this is the better way to do it (Define method vs eval). |
I think we can let those |
I know you already approved it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quite a bit of this looks new and I didn't quite understand. So I've only reviewed part of it.
694fab7
to
86ddc10
Compare
It is supposed to be easier to understand than it was before actually 😓 |
Co-authored-by: Matt Wynne <matt@cucumber.io>
Co-authored-by: Matt Wynne <matt@cucumber.io>
Description
Fixes #1583
Type of change
Checklist:
Your PR is ready for review once the following checklist is
complete. You can also add some checks if you want to.
bundle exec rubocop
reports no offenses