• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

bolshakov / stoplight / 14638977815
100%

Build:
DEFAULT BRANCH: master
Ran 24 Apr 2025 10:07AM UTC
Jobs 3
Files 31
Run time 16min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

24 Apr 2025 10:06AM UTC coverage: 100.0%. Remained the same
14638977815

push

github

web-flow
Refactor stoplight using Strategy pattern for improved maintainability (#307)

This refactors the Runnable implementation by introducing the Strategy pattern for
handling different light states (Green, Yellow, Red). The existing fail-safe (`Runnable#safely`) mechanisms
are enhanced through dedicated wrapper classes, resulting in a more maintainable and better-organized codebase.

The current implementation has complex logic inside the Runnable module:

* The run method contains nested conditional logic for each light state
* Error handling and fail-safe behaviors are mixed with business logic
* The safely method provides error resilience but is coupled with the main implementation

This refactoring improves maintainability by separating these concerns and making the code easier to understand and extend.

Co-authored-by: George Asfour <archmage@hey.com>

153 of 153 new or added lines in 12 files covered. (100.0%)

586 of 586 relevant lines covered (100.0%)

216.49 hits per line

Jobs
ID Job ID Ran Files Coverage
1 ruby-3.3 - 14638977815.1 24 Apr 2025 10:07AM UTC 31
100.0
GitHub Action Run
2 ruby-3.4 - 14638977815.2 24 Apr 2025 10:07AM UTC 31
100.0
GitHub Action Run
3 ruby-3.2 - 14638977815.3 24 Apr 2025 10:07AM UTC 31
100.0
GitHub Action Run
Source Files on build 14638977815
  • Tree
  • List 31
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 3e769f0f on github
  • Prev Build on master (#14592268752)
  • Next Build on master (#14729807061)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc