Module: Wurk::Web::Extension
- Defined in:
- lib/wurk/web/extension.rb
Overview
Server-side renderer for third-party Web extensions (spec §25, #187).
Sidekiq extensions register Sinatra-style routes + ERB views via
Sidekiq::Web.register(Ext, name:, tab:, index:, root_dir:, asset_paths:),
where Ext.registered(app) calls app.get "/path" do … end and
app.helpers SomeModule. wurk's dashboard is a React SPA with no Sinatra
render path, so this module provides a minimal, Sidekiq-Web-compatible
renderer: it captures the routes, runs the matched block in an Action
context (a WebHelpers subset + the ext's own helpers + erb), and
returns the rendered HTML for the SPA's Extension page to embed.
It does NOT depend on the sidekiq gem — extensions registered through
wurk's own Sidekiq::Web.register alias render unchanged. (Running a
real third-party gem unmodified additionally needs the shim in #204.)