Skip to content
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

Use Rack::MockRequest for correct router recognize on hanami app #231

Merged
merged 1 commit into from
May 1, 2024

Conversation

AlexeyMatskevich
Copy link
Contributor

This should fix hanami/router#271

Copy link

codecov bot commented Apr 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.07%. Comparing base (9650075) to head (8817b30).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #231      +/-   ##
==========================================
- Coverage   97.11%   97.07%   -0.04%     
==========================================
  Files          20       20              
  Lines         623      616       -7     
  Branches      143      139       -4     
==========================================
- Hits          605      598       -7     
  Misses         18       18              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@exoego exoego added the bug Something isn't working label Apr 30, 2024
@exoego
Copy link
Owner

exoego commented Apr 30, 2024

Thanks.
This fixes #227

Do you think hanami/router#271 is not an issue in Hanami, but in rspec-openapi?

@AlexeyMatskevich
Copy link
Contributor Author

I talked about a similar problem on the hanami forum (I advise you to write there by the way, because they almost never respond in github and other places) - apparently, this is not an issue, but an undocumented nuance of operation.

They have examples of their work in their documentation https://www.rubydoc.info/gems/hanami-router/Hanami%2FRouter:recognize. And there are examples of work with and without Rack::MockRequest, but there is no description of such nuances that without Rack::MockRequest recognition does not always work validly.

So I think it's just a Hanami documentation problem.

@AlexeyMatskevich
Copy link
Contributor Author

@exoego Is there anything else I need to do in this MR?

@exoego exoego merged commit afd69ad into exoego:master May 1, 2024
13 checks passed
@exoego exoego added this to the vnext milestone May 1, 2024
@exoego
Copy link
Owner

exoego commented May 1, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Router.recognize sets GET to the verb of POST routes
2 participants