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 rails/info routes for apps with globbing route #25430

Merged

Conversation

nfm
Copy link

@nfm nfm commented Jun 18, 2016

The /rails/info routes were inaccessible in apps with a catch-all globbing route, as they were being appended after the globbing route and would never be matched.

See also ccc3ddb.

@rails-bot
Copy link

Thanks for the pull request, and welcome! The Rails team is excited to review your changes, and you should hear from @schneems (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@schneems
Copy link
Member

Idea is solid can you take a look at the failing tests

@nfm nfm force-pushed the fix-rails-info-routes-for-apps-with-globbing-route branch from d06ec78 to edb0035 Compare June 19, 2016 04:22
@nfm
Copy link
Author

nfm commented Jun 19, 2016

Thanks @schneems. It looks like #25426 had the same railties test fail (https://travis-ci.org/rails/rails/jobs/138415607#L1368). #25436 looks like it's trying to fix this issue.

The actioncable tests are failing intermittently for me locally. I don't think it's an ordering issue, I can re-run the actioncable suite with the same seed and have it pass most of the time, but still fail occasionally. I assume it's some kind of concurrency related issue.

@@ -1,3 +1,7 @@
* Ensure /rails/info routes match in development for apps with a catch-all globbing route

Choose a reason for hiding this comment

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

Please add a full stop at the end.

Choose a reason for hiding this comment

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

Add /rails/info in backticks.

@nfm nfm force-pushed the fix-rails-info-routes-for-apps-with-globbing-route branch 2 times, most recently from 2a33a63 to 1a7c328 Compare June 19, 2016 05:59
@nfm
Copy link
Author

nfm commented Jun 19, 2016

Thanks @prathamesh-sonpatki - updated!


get "rails/info/properties"
assert_equal 200, last_response.status
end

Choose a reason for hiding this comment

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

Should we add a test for rails/info too? That's the only one missing here.

@nfm nfm force-pushed the fix-rails-info-routes-for-apps-with-globbing-route branch from 1a7c328 to 7148a03 Compare June 19, 2016 06:14
@nfm
Copy link
Author

nfm commented Jun 19, 2016

@prathamesh-sonpatki - sure thing, updated!

The /rails/info routes were inaccessible in apps with a catch-all
globbing route, as they were being appended after the globbing route and
would never be matched.

See also ccc3ddb.
@nfm nfm force-pushed the fix-rails-info-routes-for-apps-with-globbing-route branch from 7148a03 to 9d513e0 Compare June 20, 2016 11:49
@nfm
Copy link
Author

nfm commented Jun 20, 2016

@schneems just rebased onto master now that #25436 is merged, so the build should now pass unless we hit the weird actioncable test suite issue.

@schneems
Copy link
Member

Great, thanks!

@schneems schneems merged commit ce45972 into rails:master Jun 20, 2016
nfm pushed a commit to nfm/rails that referenced this pull request Jun 24, 2016
claudiob added a commit that referenced this pull request Mar 21, 2017
The entry for PR #25430 is currently present both in the CHANGELOG
for Rails 5.0 and for Rails 5.1:

https://github.com/rails/rails/blame/9d3a352777c2594123583b0bc02d0dd80f1e385b/railties/CHANGELOG.md#L61-L72

Since the PR was backported to 5-0-stable in #25499, I believe it
should be removed from the CHANGELOG of 5.1, otherwise it looks like
something changed from 5.0 to 5.1
claudiob added a commit to claudiob/rails that referenced this pull request Mar 21, 2017
The CHANGELOG for 5-0-stable includes the same change three times:

https://github.com/rails/rails/blame/9d3a352777c2594123583b0bc02d0dd80f1e385b/railties/CHANGELOG.md#L61-L75

Indeed, the change was merged into 5.0 as part of e57b9e5 so it belongs
to the "Rails 5.0.0" section.
rafaelfranca added a commit that referenced this pull request Mar 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants