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

bolshakov / stoplight / 15487593462
100%

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

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)

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

996 of 998 relevant lines covered (99.8%)

820.8 hits per line

Jobs
ID Job ID Ran Files Coverage
1 ruby-3.4 - 15487593462.1 06 Jun 2025 09:40AM UTC 46
99.8
GitHub Action Run
2 ruby-3.2 - 15487593462.2 06 Jun 2025 09:40AM UTC 46
99.8
GitHub Action Run
3 ruby-3.3 - 15487593462.3 06 Jun 2025 09:40AM UTC 46
99.8
GitHub Action Run
Source Files on build 15487593462
  • Tree
  • List 46
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 5f639fb9 on github
  • Prev Build on master (#15487024400)
  • Next Build on master (#15493106023)
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