-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Avoid multiple mount pollution #2612
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
base: master
Are you sure you want to change the base?
Avoid multiple mount pollution #2612
Conversation
@alexanderadam Thanks! Fix CI/CHANGELOG and I'll take a close look - @ericproulx wdyt? |
2cd43bb
to
1856ff9
Compare
done 🙂 |
1856ff9
to
0660ae7
Compare
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.
0660ae7
to
68a36c8
Compare
That's fine to me if it fixes the issue. The test looks perfectly right. |
Looks good to me 👍 thank you |
@alexanderadam could you mount your api multiple times and try with a configuration. |
@alexanderadam see my comment on breaking up specs, too, please. |
Soooo, I might have missed something here but the way I see this is, that PR #1893 introduced the behaviour seen in #2576.
And the problem to be tackled was different than what was implemented.
According to the Rack Spec, a Rack app only needs to be
Therefore having
Grape::API.call
delegating tobase_instance.call
should be enough.Howeveeeeeer, when using
Rack::Test
with def app returning aGrape::API
class directly (e.g.,API::V1::Ping
), tests would naturally fail with404
.So to me this looks like the fix with d29eb79 was a bit weird and introduced that bug in #2576. 🤔
But I could also be totally wrong with my understanding here.
And I'm therefore open to any corrections and learnings.
PS: I'm looking for a new adventure in case anybody is looking to hire or work with a Ruby/Rails/Crystal dev
PPS: would you be so kind and add the
hacktoberfest-accepted
label to this issue in case you find that PR helpful? 🥺