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

Revise #582 by changing the way how OPTIONS routes are added #609

Merged
merged 1 commit into from
Mar 27, 2014
Merged

Revise #582 by changing the way how OPTIONS routes are added #609

merged 1 commit into from
Mar 27, 2014

Conversation

stevschmid
Copy link
Contributor

This PR addresses the issue described in #598. The culprit was the PR #582 which addressed #572 (OPTIONS was broken for paths with versioning). My solution to the problem back then was to work with the "raw" path information of all endpoints instead of using the final routes, because latter contain the /:version information already. The solution was too simple to address complex nesting and namespacing.

This PR reverts the way the OPTIONS paths are collected and addresses the /:version issue (of #572) by disabling the addition of path url versioning when the OPTIONS routes are added. I'm not sold on this solution however (feels like a hack), but it might help someone to find a more elegant solution.

@stevschmid stevschmid mentioned this pull request Mar 27, 2014
@dblock
Copy link
Member

dblock commented Mar 27, 2014

This is pretty thick :) I'm merging it, but someone should come up with a better way for this whole mess!

dblock added a commit that referenced this pull request Mar 27, 2014
Revise #582 by changing the way how OPTIONS routes are added
@dblock dblock merged commit d695681 into ruby-grape:master Mar 27, 2014
@karlfreeman
Copy link
Contributor

👍 my test suite is now green on HEAD. Thanks for your work @stevschmid.

@stevschmid
Copy link
Contributor Author

Glad to hear :)

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.

3 participants