require 'dry/web/roda/application'
class App < Roda
plugin :flow # or instead extend Dry::Web::Roda::Application
route do |r|
r.get 'ping' do
'pong'
end
end
end
run App.freeze.app
As soon as plugin :flow is added (to Roda or via Dry::Web:Roda::Application), then this route matches wildcard /ping/*
That wasn’t intentional, it just wasn’t up-to-date with the latest roda version, as it overrides the roda if_match request method, it needs to track the roda implementation, and I hadn’t noticed as I haven’t been using the gem. (Although I probably wouldn’t have noticed even if I were, so nice find )
Depends how much free time you have to keep it refreshed if you lock down the version. I’d rather get the benefits of new roda changes rather than locking the version. Would it make sense just to detect any breaking changes instead with some continuous integration tests run on each roda version upgrade?
It depends, I don’t think we can cover every feature of roda to ensure we don’t break it, my thinking with version tracking was that its easy to just check for any changes to if_match on roda releases and update accordingly, so people might be without the new features for a while until I (or someone else) gets around to updating roda-flow, also if it was using hooks on roda releases, it may as well just be a hook to open a Github issue to check/update and release.
@AMHOL I have been doing some experiments, and when generating a fresh dry-web-roda app with roda-flow 0.4.0 the root route always returns a 404 if a do a downgrade to 0.3.1 the root route start working again.
@GustavoCaso I guess that because dry-web-roda is using an old version of roda, the if_match method in use in dry-web-roda still takes a splat argument rather than a single array argument and that is where the problem is caused. FWIW I don’t use roda myself anymore, so I’m happy to merge PRs and stuff there but will probably just do the minimum required to maintain it unless I find a need for it myself in the future.
@AMHOL I was just investigating that part so I will try to upgrade roda version in dry-web-roda to use the same version as roda-flow. Don’t worry I will try fixing it form dry-web-roda