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

Extract large route namespace blocks to separate files #23914

Merged
merged 1 commit into from
May 2, 2023

Conversation

mjankowski
Copy link
Contributor

Uses the rails draw method to move the three namespaces from the routes file which were over 50 LOC into their own separate files.

Includes:

  • API (~275 LOC)
  • Admin (~200 LOC)
  • Settings (~60 LOC)

The route generation should remain exactly the same since all the draw usage is in the exact spot the routes were pulled out from in the main routes.rb file.

Opening as draft for discussion -- I generally dislike this method, and even the rails documentation about the feature -- https://guides.rubyonrails.org/routing.html#breaking-up-very-large-route-file-into-multiple-small-ones -- strongly disourages use in all except the largest routes files ... but I think this one might quality, hence the PR.

I tried to poke around previous PRs and discussion on github and couldn't find discussion on this approach specifically ... so apologies if there is something I missed there.

@mjankowski mjankowski force-pushed the routes-draw-coverage-groups branch 6 times, most recently from 9b801db to 860b109 Compare March 5, 2023 12:38
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2023

This pull request has merge conflicts that must be resolved before it can be merged.

@mjankowski mjankowski force-pushed the routes-draw-coverage-groups branch from 860b109 to 4734f72 Compare March 6, 2023 17:12
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2023

This pull request has resolved merge conflicts and is ready for review.

@mjankowski mjankowski force-pushed the routes-draw-coverage-groups branch 3 times, most recently from 83ac132 to 64647ca Compare March 13, 2023 13:25
@mjankowski mjankowski force-pushed the routes-draw-coverage-groups branch from 64647ca to b06d39a Compare March 15, 2023 12:14
@github-actions
Copy link
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions
Copy link
Contributor

This pull request has resolved merge conflicts and is ready for review.

@github-actions
Copy link
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

@mjankowski mjankowski force-pushed the routes-draw-coverage-groups branch from 57c16ce to 7ef576b Compare March 20, 2023 19:33
@github-actions
Copy link
Contributor

This pull request has resolved merge conflicts and is ready for review.

@mjankowski mjankowski force-pushed the routes-draw-coverage-groups branch 4 times, most recently from 6f3d011 to 88f6841 Compare March 27, 2023 15:50
@mjankowski mjankowski force-pushed the routes-draw-coverage-groups branch 2 times, most recently from f4ab014 to 74b2ab3 Compare April 13, 2023 21:20
@github-actions
Copy link
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

@mjankowski mjankowski force-pushed the routes-draw-coverage-groups branch from 74b2ab3 to 6d65147 Compare April 18, 2023 12:38
@github-actions
Copy link
Contributor

This pull request has resolved merge conflicts and is ready for review.

@mjankowski mjankowski force-pushed the routes-draw-coverage-groups branch 2 times, most recently from 8c47b67 to a630485 Compare April 18, 2023 14:05
@mjankowski mjankowski marked this pull request as ready for review April 28, 2023 22:08
@github-actions
Copy link
Contributor

github-actions bot commented May 2, 2023

This pull request has merge conflicts that must be resolved before it can be merged.

Uses the rails `draw` method to move the three namespaces from the
routes file which were over 50 LOC into their own separate files.

Includes:

- API (~275 LOC)
- Admin (~200 LOC)
- Settings (~60 LOC)

The route generation should remain exactly the same since all the `draw`
usage is in the exact spot the routes were pulled out from in the main
routes.rb file.
@mjankowski mjankowski force-pushed the routes-draw-coverage-groups branch from a630485 to b28d04c Compare May 2, 2023 10:56
@github-actions
Copy link
Contributor

github-actions bot commented May 2, 2023

This pull request has resolved merge conflicts and is ready for review.

@Gargron Gargron merged commit 41eb49b into mastodon:main May 2, 2023
@mjankowski mjankowski deleted the routes-draw-coverage-groups branch May 2, 2023 14:16
michealmikeyb pushed a commit to michealmikeyb/mastodon that referenced this pull request May 3, 2023
skerit pushed a commit to 11ways/mastodon that referenced this pull request Jul 7, 2023
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.

2 participants