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

bolshakov / stoplight / 14512922508
100%

Build:
DEFAULT BRANCH: master
Ran 17 Apr 2025 09:49AM UTC
Jobs 0
Files 0
Run time –
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

pending completion
14512922508

push

github

web-flow
Improved Documentation and Code Examples (#303)

This PR completely revises the Stoplight documentation and introduces the new `Light#with` method for easier configuration.

## New Feature: Light#with Method

The PR introduces a new `Light#with` method that allows for bulk configuration of stoplights:

```ruby
# Base configuration
base_api = Stoplight('api-service')

# Create specialized versions with different configurations
users_api = base_api.with(
  threshold: 5,
  cool_off_time: 30,
  tracked_errors: [TimeoutError]
)

orders_api = base_api.with(
  threshold: 10,
  window_size: 300
)
```

This method offers several advantages:
- **Immutability**: Creates new instances without modifying the original stoplight
- **Composability**: Perfect for creating specialized stoplights from a common base configuration
- **Cleaner Syntax**: More concise than chaining multiple `.with_*` methods
- **Bulk Updates**: Update multiple settings at once with clear, readable code

The method accepts all standard stoplight configuration options and significantly improves developer experience when working with multiple related stoplights.

## README Improvements

The README has been completely restructured to provide a more intuitive learning path, starting with core concepts before diving into implementation details. The new documentation emphasizes Stoplight's zero-configuration philosophy while providing comprehensive examples that show the full lifecycle of circuit breakers in realistic scenarios. Advanced features are now explained with clear use cases and practical code examples, making the library more approachable for newcomers while still serving as a valuable reference for experienced users.

#302 

Co-authored-by: lokideos <archmage@hey.com>
Source Files on build 14512922508
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 9994b13d on github
  • Prev Build on master (#14512264317)
  • Next Build on master (#14531938870)
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