Releases: rage-rb/rage
v1.23.0
This release introduces two major features: unbounded SSE streams and custom renderers.
Unbounded SSE Streams
SSE streams can now stay open indefinitely and receive broadcasts from anywhere in your application:
class NotificationsController < RageController::API
def subscribe
render sse: Rage::SSE.stream("notifications")
end
end
# broadcast from anywhere in your app
Rage::SSE.broadcast("notifications", { message: "New order received" })Custom Renderers
Define custom rendering strategies in your configuration to support any view layer:
Rage.configure do
config.renderer(:phlex) do |component, **props|
headers["content-type"] = "text/html"
component.new(**props).call
end
endThen use it in your controllers:
class PagesController < RageController::API
def show
render phlex: MyComponent, message: "Hello, world"
end
endWhat's Changed
- [OpenAPI] Support multipart/form-data params in the @param tag by @Digvijay-x1 in #229
- Fix typo: 'Currrently' -> 'Currently' in router README by @anuj-pal27 in #243
- [Deferred] Add configurable retry options by @Digvijay-x1 in #225
- Add unit tests for SSE::ConnectionProxy by @jsxs0 in #245
- [Rendering] Custom renderer support by @anuj-pal27 in #244
- Ensure connection is closed when raw SSE stream raises by @jsxs0 in #248
- Correctly load routes in Rails apps by @rsamoilov in #249
- Only parse request body as multipart if the request is multipart by @p8 in #256
- Update custom renderers to overload
renderby @rsamoilov in #254 - Alba parser: silent fallback for unresolvable association resources by @pratyush07-hub in #258
- Add graceful shutdown for SSE streams by @tmchow in #261
- Add the changelog GH action by @rsamoilov in #263
- Add singular resource routing and specs by @anuj-pal27 in #247
- Fix
Rage::UploadedFile#closeby @rsamoilov in #262 - Ensure connection is closed for single-value SSE streams by @jsxs0 in #264
- Ensure tasks ID seed is always greater than existing storage files by @Abishekcs in #255
- Add tests for SSE log context propagation across fiber boundaries by @jsxs0 in #267
- Unbounded SSE Streams by @rsamoilov in #266
New Contributors
- @anuj-pal27 made their first contribution in #243
- @jsxs0 made their first contribution in #245
- @p8 made their first contribution in #256
- @pratyush07-hub made their first contribution in #258
- @tmchow made their first contribution in #261
- @Abishekcs made their first contribution in #255
Full Changelog: v1.22.1...v1.23.0
v1.22.0
This release adds support for Server-Sent Events, allowing you to stream data to clients:
stream = Enumerator.new do |y|
"Hello, world!".each_char do |ch|
sleep 1
y << ch
end
end
render sse: stream Check out the https://github.com/rage-rb/datastar-example for an example integration with Datastar.
Also In This Release
- Shared Components in the @auth tag by @Piyush-Goenka in #221
- [Cable] Add
stop_stream_fromandstop_stream_forby @Digvijay-x1 in #224 - Add signed cookies by @rfronczyk in #226
New Contributors
- @Piyush-Goenka made their first contribution in #221
- @Digvijay-x1 made their first contribution in #224
- @rfronczyk made their first contribution in #226
Full Changelog: v1.21.1...v1.22.0
v1.21.0
What's Changed
Your coding agent doesn't know Rage yet. v1.21.0 fixes that.
Run rage skills install to give your agent an official skill set for working with Rage applications. It's the fastest way to get started.
Other changes in this release:
Added:
- RSpec test helpers for Cable apps
- Support for
stream_for/broadcast_toin Cable apps - Inline context support for
Rage::Logger
Fixed:
- Log context isolation between intersecting fibers
- Cable middleware duplicating when mounted in routes
Full Changelog: v1.20.0...v1.21.0
v1.20.0
Rage v1.20 continues its observability journey and introduces Rage::Telemetry - a built-in telemetry system that lets developers observe and measure what's happening inside the application.
The first user of Rage::Telemetry is the official OpenTelemetry integration to be released and available in the following weeks.
Other changes include:
- Add
Response#statusmethod for direct status code access - Expose metadata inside deferred tasks
- Introduce middleware system for deferred tasks
- Ensure compatibility with
Rack::Events
Learn more: https://rage-rb.dev/docs/telemetry
v1.19.0
Rage v1.19 brings the first wave of observability improvements, starting with enhanced logging capabilities:
- Global Log Context - Add dynamic data to all log entries in a centralized way
- External Loggers - Connect
Rage.loggerdirectly to external observability platforms - Enhanced Deferred Logging - Deferred tasks now have access to complete log context, not just request IDs
Learn more: https://rage-rb.dev/docs/logging
Full Changelog: v1.18.0...v1.19.0
v1.18.0
What's Changed
Added
Rage now includes a lightweight pub/sub event system for building decoupled, event-driven applications.
Key Features:
- Define events using Ruby's Data class
- Subscribe to parent classes or modules to handle multiple related events
- Run subscribers in the background with automatic retries
- Visualize event-subscriber relationships
https://rage-rb.dev/docs/event-system
Fixed
Fixed Fiber.await to correctly handle multiple sequential calls.
Full Changelog: v1.17.1...v1.18.0
v1.17.0
Rage v1.17 introduces Rage::Deferred, an in-process background job queue that offloads long-running tasks from the request pipeline, improving client response times. Key features include:
- Data Durability: A disk-based write-ahead log ensures task replay after server restarts or crashes.
- Automatic Retries: Tasks are retried up to 5 times with exponential backoff on failure.
- Backpressure: Prevents uncontrolled queue growth by blocking new tasks when the queue exceeds a limit.
Rage::Deferred is ideal for tasks like communicating with other services, sending emails, or syncing data. Check out the guide for all the details.
Other Changes
- Update
stale?to set cache headers by @serhii-sadovskyi in #159 - Controllers generator by @alex-rogachev in #160
- Pause on sub-second sleeps by @rsamoilov in #161
Full Changelog: v1.16.0...v1.17.0
v1.16.0
What's Changed
Rage v1.16 introduces a new WebSocket protocol - RawWebSocketJson. This protocol enables you to interact with Rage::Cable applications using the native WebSocket object, eliminating the need for the @rails/actioncable dependency.
Other changes:
- Feature: Added the
after_initializehook by @serhii-sadovskyi in #149 - [OpenAPI] Correctly handle the
keyoption in associations - [OpenAPI] Correctly handle
root_key! - Correctly parse plaintext responses in RSpec
New Contributors
- @serhii-sadovskyi made their first contribution in #149
Full Changelog: v1.15.1...v1.16.0
v1.15.0
What's Changed
With v1.15, Rage introduces OpenAPI Explorer - a tool that allows you to experiment with Rage::OpenAPI without the need to set up a project. You can try out different tags and serializer combinations to see the documentation generated by Rage::OpenAPI.
Additionally, the release includes some new functionality and numerous bug fixes.
Added
- Enhance the
Rage::Requestclass by @aaoafk - [OpenAPI] Support the
@paramtag
Fixed
- Fix using
Fiber.schedulein console by @lkibbalam - Correctly handle regexp origins in
Rage::Cors - [OpenAPI] Correctly handle trailing slash
- [OpenAPI] Correctly handle empty shared components
- [OpenAPI] Explicitly load Prism
- [OpenAPI] Correctly verify available before actions
- [OpenAPI] Correctly handle global comments
Shoutouts
Thank you to @RichStone for his idea of the OpenAPI Explorer tool, as well as for his feedback and advice on how to improve Rage::OpenAPI.
New Contributors
- @aaoafk made their first contribution in #123
- @lkibbalam made their first contribution in #143
Full Changelog: v1.14.0...v1.15.0
v1.14.0
What's Changed
- Update app template to include all app rake tasks by @pjb3 in #130
- Reload code in development based on filesystem updates by @rsamoilov in #132
New Contributors
Full Changelog: v1.13.0...v1.14.0