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

bolshakov / stoplight / 15487593462 / 1
100%
master: 100%

Build:
DEFAULT BRANCH: master
Ran 06 Jun 2025 09:40AM UTC
Files 46
Run time 3s
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

06 Jun 2025 09:40AM UTC coverage: 99.8% (-0.007%) from 99.807%
15487593462.1

push

github

web-flow
Remove `Stoplight.default_*` configuration methods in favor of `Stoplight.configure` block (#338)

This PR removes the `Stoplight.default_*` configuration methods introduced in `4.x` and replaces them
with a new `Stoplight.configure` block pattern. This completes the configuration API evolution that
began in `4.x` and provides a more robust, extensible configuration system for `5.x`.

**Removed methods:**

- `Stoplight.default_data_store=`
- `Stoplight.default_data_store`
- `Stoplight.default_notifiers=`
- `Stoplight.default_notifiers`
- `Stoplight.default_error_notifier=`
- `Stoplight.default_error_notifier`

```ruby
Stoplight.default_data_store = Redis.new
Stoplight.default_notifiers = [SlackNotifier.new]
Stoplight.default_error_notifier = ->(e) { Sentry.capture(e) }

Stoplight.configure do |config|
  config.data_store = Redis.new
  config.notifiers = [SlackNotifier.new]
  config.error_notifier = ->(e) { Sentry.capture(e) }
end
```

* Rather than introducing another deprecation cycle that would require a `6.x` breaking change, we're removing all
  legacy configuration patterns in `5.x` to provide a clean foundation going forward
* This change aligns with other breaking changes in `5.x` (removal of deprecated code block patterns, module consolidation)
* The configure block provides atomic configuration and easier validation
* One comprehensive breaking change is better than multiple smaller ones across versions

- **Atomic**: All configuration happens in one place
- **Extensible**: Easy to add new configuration options
- **Validatable**: Can validate entire configuration at once
- **Thread-safe**: Single configuration point reduces race conditions

```ruby
Stoplight::Light.default_data_store = Redis.new

Stoplight.default_data_store = Redis.new

Stoplight.configure do |config|
  config.data_store = Redis.new
end
```

This evolution reflects our commitment to finding the right long-term API design. Rather than perpetuating intermediate
solutions with ... (continued)

996 of 998 relevant lines covered (99.8%)

282.96 hits per line

Source Files on job ruby-3.4 - 15487593462.1
  • Tree
  • List 46
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 15487593462
  • 5f639fb9 on github
  • Prev Job for on master (#15487024400.2)
  • Next Job for on master (#15493106023.2)
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