-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix engine path resolution #113
Conversation
@pcoliveira is there anything I can do to help this PR along? This has been nagging me for a long while and finally has become more of an issue |
end | ||
end | ||
raise "No route matched for #{request.request_method} #{request.path_info}" | ||
nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q) Why this error message is removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When two engines are mounted on the same root path, and the first doesn't resolve, the resolution needs to continue to the next engine. The raise was moved to the caller, when all engines are resolved
My organization recently ran into the issue fixed by this PR, so I would love to see this released ❤️ |
@pcoliveira Hi. Sorry for late response. |
sorry, I missed your question. |
…ne-path-resolution # Conflicts: # spec/rails/doc/openapi.yaml
Codecov Report
@@ Coverage Diff @@
## master #113 +/- ##
==========================================
+ Coverage 96.65% 96.91% +0.25%
==========================================
Files 14 14
Lines 419 421 +2
==========================================
+ Hits 405 408 +3
+ Misses 14 13 -1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@exoego How may I help? is there anything I need to do to move the PR forward? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This is amazing.
Sorry for the late response.
Closes issue #56
BREAKING CHANGE: The returned path for mounted engines now includes the path prefix.
An error was raised when testing a route that is mounted after an engine that shares the same route prefix.
The path returned for a mounted engine didn't include the route prefix (only the engine sub path was returned).
On the engine test case, the expected path was changed from
/eng_route
to/my_engine/eng_route
, to match the mounted path.