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

fix: Optimize route generation in rfc6570_route/s helper #39

Merged
merged 1 commit into from
Jan 31, 2025

Conversation

jgraichen
Copy link
Owner

@jgraichen jgraichen commented Jan 31, 2025

The #rfc6570_routes helper directly delegates to #to_rfc6570 on the named routes collection now, avoiding manual iteration and an extra lookup via #rfc6570_route(name).

Otherwise, both methods the context-local #_routes method now, instead of Rails.application.routes, which eases testing. New helper specs verify both method in detail.

The #rfc6570_routes helper directly delegates to #to_rfc6570 on the
named routes collection now, avoiding manual iteration and an extra
lookup via #rfc6570_route.

Otherwise, both methods the context-local #_routes method now, instead
of Rails.application.routes, which eases testing. New helper specs
verify both method in detail now too.
@jgraichen jgraichen self-assigned this Jan 31, 2025
Copy link

codecov bot commented Jan 31, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.38%. Comparing base (1b478cc) to head (9f675dc).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #39      +/-   ##
==========================================
+ Coverage   98.78%   99.38%   +0.59%     
==========================================
  Files           4        4              
  Lines         165      162       -3     
==========================================
- Hits          163      161       -2     
+ Misses          2        1       -1     

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

@jgraichen jgraichen merged commit 40bef75 into main Jan 31, 2025
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant