Skip to content

Commit

Permalink
Merge branch 'main' of https://[email protected]/bridgetownrb/br…
Browse files Browse the repository at this point in the history
…idgetown
  • Loading branch information
jaredcwhite committed Jul 14, 2024
2 parents e4b445d + 582abc2 commit 8fd5c82
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions bridgetown-core/lib/roda/plugins/bridgetown_server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,12 @@ def initialize_bridgetown_root # rubocop:todo Metrics/AbcSize
"<p>ERROR: cannot find <code>index.html</code> in the output folder.</p>"
end
end

# This is useful if you're passing the Roda app instance around and want to
# get at `request` / `response` easily as local variables
def deconstruct_keys(*)
{ request:, response: }
end
end

Roda::RodaRequest.alias_method :_previous_roda_cookies, :cookies
Expand Down
6 changes: 3 additions & 3 deletions bridgetown-core/test/ssr/src/_components/UseRoda.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ def template
end

def call(app)
app.request => r
@testing = r.env["rack.test"]
app => { request:, response: }
@testing = request.env["rack.test"]

app.response["Content-Type"] = "application/rss+xml"
response["Content-Type"] = "application/rss+xml"

render_in(app)
end
Expand Down

0 comments on commit 8fd5c82

Please sign in to comment.