Skip to content
Back to search

stoplight

:traffic_light: Traffic control for code.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/bolshakov/stoplight with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/bolshakov/stoplight'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/bolshakov--stoplight/badge.svg)](/listings/bolshakov--stoplight)

HTML

<a href="/listings/bolshakov--stoplight"><img src="/api/listings/bolshakov--stoplight/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Add it to your Gemfile:

gem 'stoplight'

Or install it manually:

$ gem install stoplight

Stoplight uses [Semantic Versioning][]. Check out [the change log][] for a detailed list of changes.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 718 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # [Stoplight][]
  2. [![Version badge][]][version]
  3. [![Build badge][]][build]
  4. [![Coverage badge][]][coverage]
  5. Stoplight is a traffic control for code. It's an implementation of the circuit breaker pattern in Ruby.
  6. ---
  7. :warning:️ You're currently browsing the documentation for Stoplight 6. If you're looking for
  8. the documentation of the previous version 5.x, you can find it [here](https://github.com/bolshakov/stoplight/tree/v5.8.3).
  9. Stoplight helps your application gracefully handle failures in external dependencies
  10. (like flaky databases, unreliable APIs, or spotty web services). By wrapping these unreliable
  11. calls, Stoplight prevents cascading failures from affecting your entire application.
  12. **The best part?** Stoplight works with zero configuration out of the box, while offering deep customization when you
  13. need it.
  14. ## Installation
  15. Add it to your Gemfile:
  16. ```ruby
  17. gem 'stoplight'
  18. ```
  19. Or install it manually:
  20. ```sh
  21. $ gem install stoplight
  22. ```
  23. Stoplight uses [Semantic Versioning][]. Check out [the change log][] for a detailed list of changes.
  24. ## Core Concepts
  25. Stoplight operates like a traffic light with three states:
  26. ![Stoplight state diagram][]
  27. - **Green**: Normal operation. Code runs as expected. (Circuit closed)
  28. - **Red**: Failure state. Fast-fails without running the code. (Circuit open)
  29. - **Yellow**: Recovery state. Allows a test execution to see if the problem is resolved. (Circuit half-open)
  30. Stoplight's behavior is controlled by two main parameters:
  31. 1. **Window Size** (default: `nil`): Time window in which errors are counted toward the threshold. By default, all errors are counted.
  32. 2. **Threshold** (default: `3`): Number of errors required to transition from green to red.
  33. Additionally, two other parameters control how Stoplight behaves after it turns red:
  34. 1. **Cool Off Time** (default: `60` seconds): Time to wait in the red state before transitioning to yellow.
  35. 2. **Recovery Threshold** (default: `1`): Number of successful attempts required to transition from yellow back to green.
  36. ## Basic Usage
  37. Stoplight works right out of the box with sensible defaults:
  38. ```ruby
  39. # Create a stoplight with default settings
  40. light = Stoplight("Payment Service")
  41. # Use it to wrap code that might fail
  42. result = light.run { payment_gateway.process(order) }
  43. ```
  44. When everything works, the light stays green and your code runs normally. If the code fails repeatedly, the
  45. light turns red and raises a `Stoplight::Error::RedLight` exception to prevent further calls.
  46. ```ruby
  47. light = Stoplight("Example")
  48. light.run { 1 / 0 } #=> raises ZeroDivisionError: divided by 0
  49. light.run { 1 / 0 } #=> raises ZeroDivisionError: divided by 0
  50. light.run { 1 / 0 } #=> raises ZeroDivisionError: divided by 0
  51. ```
  52. After the last failure, the light turns red. The next call will raise a `Stoplight::Error::RedLight` exception without
  53. executing the block:
  54. ```ruby
  55. light.run { 1 / 0 } #=> raises Stoplight::Error::RedLight: Light `Example` is red - traffic stopped until recovery.
  56. light.color # => :red
  57. ```
  58. The `Stoplight::Error::RedLight` provides metadata about the error:
  59. ```ruby
  60. def run_request
  61. light = Stoplight("Example", cool_off_time: 10)
  62. light.run { 1 / 0 } #=> raises Stoplight::Error::RedLight
  63. rescue Stoplight::Error::RedLight => error
  64. puts error.light_name #=> "Example"
  65. puts error.cool_off_time #=> 10
  66. puts error.retry_after #=> Absolute Time after which a recovery attempt can occur (e.g., "2025-10-21 15:39:50.672414 +0600")
  67. end
  68. ```
  69. After one minute, the light transitions to yellow, allowing a test execution:
  70. ```ruby
  71. # Wait for the cool-off time
  72. sleep 60
  73. light.run { 1 / 1 } #=> 1
  74. ```
  75. If the test probe succeeds, the light turns green again. If it fails, the light turns red again.
  76. ```ruby
  77. light.color #=> :green
  78. ```
  79. ### Using Fallbacks
  80. Provide fallbacks to gracefully handle errors:
  81. ```ruby
  82. fallback = ->(error) { error ? "Failed: #{error.message}" : "Service unavailable" }
  83. light = Stoplight('example-fallback')
  84. result = light.run(fallback) { external_service.call }
  85. ```
  86. If the light is green but the call fails, the fallback receives the `error`. If the light is red, the fallback
  87. receives `nil`. In both cases, the return value of the fallback becomes the return value of the `run` method.
  88. ## Admin Panel
  89. Stoplight comes with a built-in Admin Panel for observing and controlling all lights across your application. It
  90. displays each light's current state, recent failures, and provides controls to lock/unlock lights manually.
  91. ![Admin Panel Screenshot](assets/admin.png)
  92. ### Basic Setup
  93. Add the Admin Panel to your Rails application with authentication:
  94. ```ruby
  95. Rails.application.routes.draw do
  96. Stoplight::Admin.use(Rack::Auth::Basic) do |username, password|
  97. username == ENV["STOPLIGHT_ADMIN_USERNAME"] && password == ENV["STOPLIGHT_ADMIN_PASSWORD"]
  98. end
  99. mount Stoplight::Admin => '/stoplights'
  100. end
  101. ```
  102. Then set environment variables:
  103. ```bash
  104. export STOPLIGHT_ADMIN_USERNAME=admin
  105. export STOPLIGHT_ADMIN_PASSWORD=secret
  106. ```
  107. **IMPORTANT:** Stoplight Admin Panel requires `sinatra` and `sinatra-contrib` gems:
  108. ```ruby
  109. gem "sinatra", require: false
  110. gem "sinatra-contrib", require: false
  111. ```
  112. ### Standalone Docker Setup
  113. Run the Admin Panel as a separate service:
  114. ```shell
  115. docker run \
  116. -e REDIS_URL=redis://localhost:6379 \
  117. -e STOPLIGHT_ADMIN_USERNAME=admin \
  118. -e STOPLIGHT_ADMIN_PASSWORD=secret \
  119. -p 4567:4567 \
  120. bolshakov/stoplight-admin
  121. ```
  122. For complete setup and multi-system configuration details, see the [Admin Panel guide](docs/admin.md).
  123. ## Configuration
  124. ### Global Configuration
  125. Stoplight allows you to set default values for all lights in your application:
  126. ```ruby
  127. Stoplight.configure do |config|
  128. # Set default behavior for all stoplights
  129. config.traffic_control = :error_rate
  130. config.window_size = 300
  131. config.threshold = 0.5
  132. config.cool_off_time = 30
  133. config.recovery_threshold = 5
  134. # Set up default data store and notifiers
  135. config.data_store = Stoplight::DataStore::Redis.new(redis)
  136. config.notifiers = [Stoplight::Notifier::Logger.new(Rails.logger)]
  137. # Configure error handling defaults
  138. config.tracked_errors = [StandardError, CustomError]
  139. config.skipped_errors = [ActiveRecord::RecordNotFound]
  140. end
  141. ```
  142. ### Creating Stoplights
  143. The simplest way to create a stoplight is with a name:
  144. ```ruby
  145. light = Stoplight("Payment Service")
  146. ```
  147. You can also provide settings during creation:
  148. ```ruby
  149. light = Stoplight("Payment Service",
  150. window_size: 300, # Only count errors in the last five minutes
  151. threshold: 5, # 5 errors before turning red
  152. cool_off_time: 60, # Wait 60 seconds before attempting recovery
  153. recovery_threshold: 1, # 1 successful attempt to turn green again
  154. tracked_errors: [TimeoutError], # Only count TimeoutError
  155. skipped_errors: [ValidationError] # Ignore ValidationError
  156. )
  157. ```
  158. ## Error Handling
  159. By default, Stoplight tracks all `StandardError` exceptions.
  160. Note: System-level exceptions (e.g., `NoMemoryError`, `SignalException`) are not tracked, as they are not subclasses of `StandardError`.
  161. ### Custom Error Configuration
  162. Control which errors affect your stoplight state. Skip specific errors (will not count toward failure threshold)
  163. ```ruby
  164. light = Stoplight("Example API", skipped_errors: [ActiveRecord::RecordNotFound, ValidationError])
  165. ```
  166. Only track specific errors (only these count toward failure threshold)
  167. ```ruby
  168. light = Stoplight("Example API", tracked_errors: [NetworkError, Timeout::Error])
  169. ```
  170. When both methods are used, `skipped_errors` takes precedence over `tracked_errors`.
  171. Either list can be replaced for a single call without changing the light's configuration:
  172. ```ruby
  173. light.run(tracked_errors: [Timeout::Error]) { fetch_data }
  174. light.run(skipped_errors: [ValidationError]) { process_data }
  175. ```
  176. Any list omitted from `run` keeps its configured value. The provided list is replaced only for that call, and
  177. `skipped_errors` still takes precedence over `tracked_errors`.
  178. ## Advanced Configuration
  179. ### Registering Lights
  180. Calling `Stoplight("name", ...)` at every call site works well for a handful of lights. As an app
  181. grows, repeating the same settings everywhere makes them easy to drift out of sync, and there's no
  182. single place listing what lights exist.
  183. Register a light once and look it up by name wherever you need it, instead of repeating the same
  184. settings at every call site.
  185. ```ruby
  186. # config/initializers/stoplight.rb
  187. Stoplight.register("Payment Service", threshold: 5, cool_off_time: 60)
  188. ```
  189. ```ruby
  190. # anywhere else in your app
  191. Stoplight.light("Payment Service").run { payment_gateway.process(order) }
  192. ```
  193. `Stoplight("name", ...)` still works as shown above -- registration is an addition, not a replacement.
  194. `Stoplight.light` is also approximately 10 times faster, since it's a plain lookup rather than re-validating
  195. the configuration on every call.
  196. ### Traffic Control Strategies
  197. You've seen how Stoplight transitions from green to red when errors reach the threshold. But **how exactly does it
  198. decide when that threshold is reached?** That's where traffic control strategies come in.
  199. Stoplight offers two built-in strategies for counting errors:
  200. #### Consecutive Errors (Default)
  201. Stops traffic when a specified number of consecutive errors occur. Works with or without time sliding windows.
  202. ```ruby
  203. light = Stoplight(
  204. "Payment API",
  205. traffic_control: :consecutive_errors,
  206. threshold: 5,
  207. )
  208. ```
  209. Counts consecutive errors regardless of when they occurred. Once 5 consecutive errors happen, the stoplight
  210. turns red and stops traffic.
  211. ```ruby
  212. light = Stoplight(
  213. "Payment API",
  214. traffic_control: :consecutive_errors,
  215. threshold: 5,
  216. window_size: 300,
  217. )
  218. ```
  219. Counts consecutive errors within a 5-minute sliding window. Both conditions must be met: 5 consecutive errors
  220. AND at least 5 total errors within the window.
  221. _This is Stoplight's default strategy when no `traffic_control` is specified._ You can omit `traffic_control` parameter
  222. in the above examples:
  223. ```ruby
  224. light = Stoplight(
  225. "Payment API",
  226. threshold: 5,
  227. )
  228. ```
  229. #### Error Rate
  230. Stops traffic when the error rate exceeds a percentage within a sliding time window. Requires `window_size` to be
  231. configured:
  232. ```ruby
  233. light = Stoplight(
  234. "Payment API",
  235. traffic_control: :error_rate,
  236. window_size: 300,
  237. threshold: 0.5,
  238. )
  239. ```
  240. Monitors error rate over a 5-minute sliding window. The stoplight turns red when error rate exceeds 50%.
  241. Error rate evaluation starts only after 100 requests within the window — enough samples
  242. for a statistically reliable estimate. If your service handles fewer than 100 requests
  243. per window, the breaker will never trip on error rate; use `traffic_control: :consecutive_errors` instead.
  244. #### When to use:
  245. * **Consecutive Errors**: Low-medium traffic, simple behavior, occasional spikes expected
  246. * **Error Rate**: High traffic, percentage-based SLAs, variable traffic patterns
  247. ### Traffic Recovery Strategies
  248. In the yellow state, Stoplight behaves differently from normal (green) operation. Instead of
  249. blocking all traffic, it allows a limited number of real requests to pass through to
  250. the underlying service to determine if it has recovered. These aren't synthetic probes -
  251. they're actual user requests that will execute normally if the service is healthy.
  252. After collecting the necessary data from these requests, Stoplight decides whether to
  253. return to green or red state.
  254. Traffic Recovery strategies control how Stoplight evaluates these requests during
  255. the recovery phase.
  256. #### Consecutive Successes (Default)
  257. Returns to green after a specified number of consecutive successful recovery attempts. This is the default behavior.
  258. ```ruby
  259. light = Stoplight(
  260. "Payment API",
  261. traffic_recovery: :consecutive_successes,
  262. recovery_threshold: 3,
  263. )
  264. ```
  265. This configuration requires 3 consecutive successful recovery probes before resuming normal traffic. If any probe
  266. fails during recovery, the stoplight immediately returns to red and waits for another cool-off period before trying again.
  267. **Default behavior**: If no `recovery_threshold` is specified, Stoplight uses a conservative default of 1, meaning a
  268. single successful recovery probe will resume traffic flow.
  269. ### Data Store
  270. Stoplight officially supports three data stores:
  271. - In-memory data store
  272. - Redis
  273. - Valkey
  274. By default, Stoplight uses an in-memory data store:
  275. ```ruby
  276. require "stoplight"
  277. Stoplight::Wiring::Default::DATA_STORE
  278. # => #<Stoplight::DataStore::Memory:...>
  279. ```
  280. #### Redis for Production
  281. For production environments, you'll likely want to use a persistent data store. One of the supported options is [Redis].
  282. ```ruby
  283. # Configure Redis as the data store
  284. require "redis"
  285. redis = Redis.new
  286. data_store = Stoplight::DataStore::Redis.new(redis)
  287. Stoplight.configure do |config|
  288. config.data_store = data_store
  289. end
  290. ```
  291. #### Valkey Support
  292. Stoplight also supports [Valkey], a drop-in replacement for Redis.
  293. Just point your Redis client to a Valkey instance and configure Stoplight as usual:
  294. ```ruby
  295. # ...
  296. # We assume that Valkey is available on 127.0.0.1:6379 address
  297. valkey = Redis.new(url: "redis://127.0.0.1:6379")
  298. data_store = Stoplight::DataStore::Redis.new(valkey)
  299. Stoplight.configure do |config|
  300. config.data_store = data_store
  301. # ...
  302. end
  303. ```
  304. #### DragonflyDB Support
  305. Although Stoplight does not officially support [DragonflyDB], it can be used with it. For details, you may refer to the official [DragonflyDB documentation].
  306. **NOTE**: Compatibility with [DragonflyDB] is not guaranteed, and results may vary. However, you are welcome to contribute to the project if you find any issues.
  307. #### Connection Pooling
  308. For high-traffic applications or when you want to control the number of open connections to the Data Store:
  309. ```ruby
  310. require "connection_pool"
  311. pool = ConnectionPool.new(size: 5, timeout: 3) { Redis.new }
  312. data_store = Stoplight::DataStore::Redis.new(pool)
  313. Stoplight.configure do |config|
  314. config.data_store = data_store
  315. end
  316. ```
  317. ### Notifiers
  318. Stoplight notifies when the lights change state. Configure how these notifications are delivered:
  319. ```ruby
  320. # Log to a specific logger
  321. logger = Logger.new("stoplight.log")
  322. notifier = Stoplight::Notifier::Logger.new(logger)
  323. # Configure globally
  324. Stoplight.configure do |config|
  325. config.notifiers = [notifier]
  326. end
  327. ```
  328. In this example, when Stoplight fails three times in a row, it will log the error to `stoplight.log`:
  329. ```log
  330. W, [2025-04-16T09:18:46.778447 #44233] WARN -- : Switching test-light from green to red because RuntimeError bang!
  331. ```
  332. By default, Stoplight logs state transitions to STDERR.
  333. #### Community-supported Notifiers
  334. * [stoplight-sentry]
  335. * [stoplight-honeybadger]
  336. Pull requests to update this section are welcome. If you want to implement your own notifier, refer to
  337. the [notifier interface documentation] for detailed instructions. Pull requests to update this section are welcome.
  338. ### Telemetry
  339. Notifiers only fire on state transitions. For everything else a light does - every run, trip, recovery probe, and
  340. manual lock - subscribe to the telemetry bus:
  341. ```ruby
  342. Stoplight.telemetry.subscribe(Stoplight::Telemetry::TrafficBreached) do |envelope|
  343. logger.warn("#{envelope.light_name} tripped: #{envelope.payload.failure&.exception&.message}")
  344. end
  345. ```
  346. The [stoplight-statsd] gem is built on this bus. It forwards every event to Statsd, so a dashboard of your circuit
  347. breakers is a `bundle add` away:
  348. ![Stoplight metrics in Grafana](assets/grafana.png)
  349. See the [Telemetry guide](docs/telemetry.md) for the full event list and the envelope format.
  350. ### Error Notifiers
  351. Stoplight is built for resilience. If the Redis data store fails, Stoplight automatically falls back to the in-memory
  352. data store. To get notified about such errors, you can configure an error notifier:
  353. ```ruby
  354. Stoplight.configure do |config|
  355. config.error_notifier = ->(error) { Bugsnag.notify(error) }
  356. end
  357. ```
  358. ### Locking
  359. Sometimes you need to override Stoplight's automatic behavior. Locking allows you to manually control the state of
  360. a stoplight, which is useful for:
  361. * **Maintenance periods**: Lock to red when a service is known to be unavailable
  362. * **Emergency overrides**: Lock to green to force traffic through during critical operations
  363. * **Testing scenarios**: Control circuit state without waiting for failures
  364. * **Gradual rollouts**: Manually control which stoplights are active during deployments
  365. ```ruby
  366. # Force a stoplight to red state (fail all requests)
  367. # Useful during planned maintenance or when you know a service is down
  368. light.lock(Stoplight::Color::RED)
  369. # Force a stoplight to green state (allow all requests)
  370. # Useful for critical operations that must attempt to proceed
  371. light.lock(Stoplight::Color::GREEN)
  372. # Return to normal operation (automatic state transitions)
  373. light.unlock
  374. ```
  375. ### Multiple Independent Systems
  376. By default, all lights share the same global configuration and data store. For larger applications with multiple
  377. services or tenants, you can create **named systems** -- completely isolated instances with their own configuration,
  378. notifiers, and data store:
  379. ```ruby
  380. # Create independent systems with separate data stores
  381. Payments = Stoplight.register_system("Payments", threshold: 3, cool_off_time: 30)
  382. Analytics = Stoplight.register_system("Analytics", threshold: 5, cool_off_time: 60)
  383. # Register lights in each system
  384. Payments.register("stripe", cool_off_time: 30)
  385. Analytics.register("amplitude")
  386. # Use them — one system's state does not affect another
  387. Payments.light("stripe").run { charge_card }
  388. Analytics.light("amplitude").run { track_event }
  389. ```
  390. Use cases for multiple systems:
  391. * **Multi-tenancy**: Each tenant gets its own isolated system and data store
  392. * **Service boundaries**: Separate failure domains with independent SLOs (e.g., payments vs. analytics)
  393. * **Independent data stores**: One service uses Redis for persistence, another uses in-memory
  394. For complete details on system configuration, boot-time registration patterns, and isolation guarantees, see
  395. the [Systems guide](docs/systems.md).
  396. ### Admin
  397. Admin Panel can work in an read-only which could be useful for observability. To enabled read-only mode:
  398. ```ruby
  399. Stoplight::Admin.configure do |config|
  400. config.read_only = true
  401. end
  402. ```
  403. Read-only mode could be turned on for a pre-built docker image by passing `STOPLIGHT_ADMIN_READ_ONLY` environment
  404. variable:
  405. ```sh
  406. docker run -e REDIS_URL=redis://localhost:6378 -e STOPLIGHT_ADMIN_READ_ONLY=true --net=host bolshakov/stoplight-admin
  407. ```
  408. ## Rails Integration
  409. Wrap controller actions with minimal effort:
  410. ```ruby
  411. class ApplicationController < ActionController::Base
  412. around_action :stoplight
  413. private
  414. def stoplight(&block)
  415. Stoplight("#{params[:controller]}##{params[:action]}")
  416. .run(-> (*) { render(nothing: true, status: :service_unavailable) }, &block)
  417. end
  418. end
  419. ```
  420. Configure Stoplight in an initializer:
  421. ```ruby
  422. # config/initializers/stoplight.rb
  423. require "stoplight"
  424. Stoplight.configure do |config|
  425. config.data_store = Stoplight::DataStore::Redis.new(Redis.new)
  426. config.notifiers += [Stoplight::Notifier::Logger.new(Rails.logger)]
  427. end
  428. ```
  429. You can generate initializer with Redis, Admin Panel route and add needed gems to your Gemfile:
  430. ```sh
  431. rails generate stoplight:install --with-admin-panel
  432. ```
  433. ## Testing
  434. Tips for working with Stoplight in test environments:
  435. 1. Silence notifications in tests
  436. ```ruby
  437. Stoplight.configure do |config|
  438. config.error_notifier = -> _ {}
  439. config.notifiers = []
  440. end
  441. ```
  442. 2. Reset data store between tests
  443. ```ruby
  444. before(:each) do
  445. Stoplight.configure do |config|
  446. config.data_store = Stoplight::DataStore::Memory.new
  447. end
  448. end
  449. ```
  450. 3. Or use unique names for test Stoplights to avoid persistence between tests:
  451. ```ruby
  452. stoplight = Stoplight("test-#{rand}")
  453. ```
  454. ## Maintenance Policy
  455. We focus on supporting current, secure versions rather than maintaining extensive backwards compatibility. We follow
  456. semantic versioning and give reasonable notice before dropping support.
  457. ### Stoplight Version Support
  458. We only actively support the latest major version of Stoplight.
  459. * ✅ Bug fixes and new features go to the current major version only (e.g., if you're on 4.x, upgrade to 5.x for fixes)
  460. * ✅ Upgrade guidance is provided in release notes for major version changes
  461. * ✅ We won't break compatibility in patch/minor releases
  462. * ✅ We may accept community-contributed security patches for the previous major version
  463. * ❌ We don't backport fixes to old Stoplight major versions
  464. * ❌ We don't add new features to old Stoplight major versions
  465. ### What We Support
  466. **Ruby**: Major versions that receive security updates (see [Ruby Maintenance Branches]):
  467. * Currently: Ruby 3.3.x, 3.4.x and 4.0.x
  468. * We test against these versions in CI
  469. **Data Stores**: Current supported versions from upstream (versions that receive security updates):
  470. * Redis: 8.6.x, 8.4.x, 7.4.x (following [Redis's support policy])
  471. * Valkey: 9.1.x, 9.0.x, 8.1.x, 8.0.x, 7.2.x (following [Valkey's support policy])
  472. * We test against the latest version of each major release
  473. For dependencies:
  474. * ✅ We test all supported dependency combinations in CI
  475. * ✅ We investigate bug reports on supported dependency versions
  476. * ❌ We don't test unsupported dependency versions (e.g., Ruby 3.1, Redis 5.x)
  477. * ❌ We don't fix bugs specific to unsupported dependencies
  478. ### When We Drop Support
  479. * Ruby: When Ruby core team ends security support, we drop it in our next major release
  480. * Data Stores: When Redis/Valkey ends maintenance, we drop it in our next major release
  481. Example: "Ruby 3.3 reaches end-of-life in March 2027, so Stoplight 7.0 will require Ruby 3.4+"
  482. ## Development
  483. After checking out the repo, run `bundle install` to install dependencies. Run tests with `bundle exec rspec` and check
  484. code style with `bundle exec standardrb`. All work happens on `main` - see [CONTRIBUTING.md] for branch naming,
  485. releases, and the contribution workflow.
  486. ## Credits
  487. Stoplight was originally created by [camdez][] and [tfausak][]. It is currently maintained by [bolshakov][] and
  488. [Lokideos][]. You can find a [complete list of contributors][] on GitHub. The project was inspired by Martin
  489. Fowler’s [CircuitBreaker][] article.
  490. [Stoplight]: https://github.com/bolshakov/stoplight
  491. [Version badge]: https://img.shields.io/gem/v/stoplight.svg?label=version
  492. [version]: https://rubygems.org/gems/stoplight
  493. [Build badge]: https://github.com/bolshakov/stoplight/actions/workflows/ci.yml/badge.svg?branch=main
  494. [build]: https://github.com/bolshakov/stoplight/actions?query=branch%3Amain
  495. [Coverage badge]: https://img.shields.io/coveralls/bolshakov/stoplight/main.svg?label=coverage
  496. [coverage]: https://coveralls.io/r/bolshakov/stoplight
  497. [stoplight-admin]: https://github.com/bolshakov/stoplight-admin
  498. [Semantic Versioning]: http://semver.org/spec/v2.0.0.html
  499. [the change log]: CHANGELOG.md
  500. [stoplight-sentry]: https://github.com/bolshakov/stoplight-sentry
  501. [stoplight-honeybadger]: https://github.com/qoqa/stoplight-honeybadger
  502. [stoplight-statsd]: https://github.com/bolshakov/stoplight-statsd
  503. [notifier interface documentation]: https://github.com/bolshakov/stoplight/blob/main/sig/stoplight/domain/ports/state_transition_notifier.rbs
  504. [camdez]: https://github.com/camdez
  505. [tfausak]: https://github.com/tfausak
  506. [bolshakov]: https://github.com/bolshakov
  507. [Lokideos]: https://github.com/Lokideos
  508. [complete list of contributors]: https://github.com/bolshakov/stoplight/graphs/contributors
  509. [CircuitBreaker]: http://martinfowler.com/bliki/CircuitBreaker.html
  510. [Redis]: https://redis.io/
  511. [CONTRIBUTING.md]: CONTRIBUTING.md
  512. [Valkey]: https://valkey.io/
  513. [Ruby Maintenance Branches]: https://www.ruby-lang.org/en/downloads/branches/
  514. [Redis's support policy]: https://redis.io/about/releases/
  515. [Valkey's support policy]: https://valkey.io/topics/releases/
  516. [DragonflyDB]: https://www.dragonflydb.io/
  517. [DragonflyDB documentation]: https://www.dragonflydb.io/docs/managing-dragonfly/scripting#script-flags
  518. [Stoplight state diagram]: assets/state-diagram.svg

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.