Search code examples
ruby-on-railsgithubguard

Making a Change to the Guard gem on Github


I've identified a fix/change I'd like to submit to the Guard gem, but I'm having trouble identifying where in the code to make the change.

When using the Guard gem, successful test completion returns "red" text displaying "0 failures, 0 errors." I want to change this returned text to green if the value is "0." This should be a trivial change. However, I'm having a hard time finding where in the code to make the change.

This is the UI displayed:


Finished in 0.41165s
15 tests, 36 assertions, 0 failures, 0 errors, 0 skips


Here is the Guard repo: https://github.com/guard/guard

Question #1: Where should I make the change?

Question #2: In the future, what process or procedure do you follow to identify where to make changes in large gems like Guard? How should I "search the codebase" to find code matching the UI display.


Solution

  • I'm a maintainer of Guard and many Guard plugins.

    It's best to simply open an issue on GitHub for the project you want to fix. You'll get a response faster, and if you have fix for this yourself, your fix will be released as quickly as possible.

    Sometimes the trick it so work out where to even fix the problem.

    The important part here is to work out whether it's just the color, or a failing plugin that gives an error code (even given there are no failures).

    I'm guessing the problem could be with Guard::RSpec, but it could even be with Guard or an unrelated gem or project. Or it could just be a color setting. So if you just open an issue, I'm sure someone will help out to track down where this should be reported and fixed.

    If you really want to help get this fixed quickly, the best way is to setup a small repository on GitHub where this problem occurs. There's nothing faster to fix than a problem a maintainer can reproduce every time.

    First though, make sure you're using updated gems - since issues like this can get fixed pretty quickly already.