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

Add support mounted rack app for rails and hanami #213

Merged
merged 3 commits into from
Apr 17, 2024

Conversation

AlexeyMatskevich
Copy link
Contributor

I noticed that in cases where a rack application is mounted to main application, like pure rack or roda, in these cases for both hanami and rails, the routing recognition does not work correctly.

My suggestion in such cases is to use rack extractor instead of the main extractor for the framework.

@AlexeyMatskevich
Copy link
Contributor Author

AlexeyMatskevich commented Apr 16, 2024

It looks like the tests are crashing because of the difference in generation in spec/rspec/rails_spec.rb and spec/minitest/rails_spec.rb.
I don't see what the difference is yet.

new_yaml["paths"].keys
=> 
["/additional_properties",
 "/images",
 "/images/upload",
 "/images/upload_multiple",
 "/images/upload_multiple_nested",
 "/images/upload_nested",
 "/images/{id}",
 "/my_engine/eng_route",
 "/my_engine/test",
 "/rack/bar",
 "/rack/foo",
 "/secret_items",
 "/tables",
...

it looks like the sort order of paths is broken

Copy link

codecov bot commented Apr 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.12%. Comparing base (7d16147) to head (6a1094d).
Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #213      +/-   ##
==========================================
- Coverage   97.22%   97.12%   -0.10%     
==========================================
  Files          20       20              
  Lines         612      626      +14     
  Branches      133      143      +10     
==========================================
+ Hits          595      608      +13     
- Misses         17       18       +1     

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

@exoego exoego added the enhancement New feature or request label Apr 17, 2024
@exoego exoego added this to the v0.18.0 milestone Apr 17, 2024
Copy link
Owner

@exoego exoego left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.
I fixed rails_test.rb for minitest.

@exoego exoego merged commit 493cde9 into exoego:master Apr 17, 2024
12 of 13 checks passed
@AlexeyMatskevich AlexeyMatskevich deleted the mounted-app branch April 17, 2024 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants