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

bolshakov / stoplight / 14405612323
100%

Build:
DEFAULT BRANCH: master
Ran 11 Apr 2025 02:36PM UTC
Jobs 3
Files 22
Run time 1min
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

11 Apr 2025 02:36PM UTC coverage: 100.0%. Remained the same
14405612323

push

github

web-flow
Allow passing configuration options to Stoplight() method (#290)

In addition to the builder interface, you can directly create a stoplight using
the `Stoplight()` method. This method allows you to configure the stoplight with a name and
optional settings in a single step.

```ruby
light = Stoplight('example-direct', cool_off_time: 10, threshold: 5)

light.run { 1 / 0 }
light.color
```

The `Stoplight()` method accepts the following settings:

* `:cool_off_time` - The time to wait before resetting the circuit breaker.
* `:data_store` - The data store to use for storing state.
* `:error_notifier` - A proc to handle error notifications.
* `:notifiers` - A list of notifiers to use.
* `:threshold` - The failure threshold to trip the circuit breaker.
* `:window_size` - The size of the rolling window for failure tracking.
* `:tracked_errors` - A list of errors to track.
* `:skipped_errors` - A list of errors to skip.

This approach is useful for quickly setting up a stoplight without chaining multiple configuration methods.

2 of 2 new or added lines in 1 file covered. (100.0%)

424 of 424 relevant lines covered (100.0%)

250.15 hits per line

Jobs
ID Job ID Ran Files Coverage
1 ruby-3.4 - 14405612323.1 11 Apr 2025 02:36PM UTC 22
100.0
GitHub Action Run
2 ruby-3.3 - 14405612323.2 11 Apr 2025 02:36PM UTC 22
100.0
GitHub Action Run
3 ruby-3.2 - 14405612323.3 11 Apr 2025 02:37PM UTC 22
100.0
GitHub Action Run
Source Files on build 14405612323
  • Tree
  • List 22
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 813df029 on github
  • Prev Build on master (#14378350625)
  • Next Build on master (#14419258696)
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