Skip to content

OPTIONS regression 2 #598

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

Closed

Conversation

karlfreeman
Copy link
Contributor

Having pulled down the latest master which includes #582. It appears that my test suite exploded.

Turns out the fix to fix a regression has regressed 🐛.

class NamespacedEndpoint < Grape::API
  namespace :foo do
    get 'regression'
      'no-fun'
    end
  end
end
class CollectionOfEndpoints < Grape::API
  get 'no-regression'
    'fun'
  end
  mount NamespacedEndpoint
end
class Root < Grape::API
  mount CollectionOfEndpoints
end

Going to try and look at this myself but limited on time. Not sure what the best way to go forward with these OPTIONS regressions are. The tests we have clearly aren't capturing the use cases which means we're somewhat chasing our tails 😒.

@dblock dblock added the bug? label Mar 18, 2014
@stevschmid
Copy link
Contributor

I will definitely take a look at it tomorrow. I think the amount of OPTIONS issues recently is an indicator that the code is fragile and the tests don't cover all use cases. I'll try to refactor add_head_not_allowed_methods_and_options_methods and extend the test suite.

@stevschmid
Copy link
Contributor

I identified the issue and I'm working towards a PR. Stay tuned.

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

dblock commented Mar 27, 2014

Bump @stevschmid. Getting antsy about doing a release soon and I really want to have this one fixed. Need help? If you are not going to make a PR with a fix, appreciate at least some explanation of what you found so far.

@stevschmid
Copy link
Contributor

I catched a cold last week and was unable to work on this issue. I pushed my solution in #609, but I'm not entirely sold on my approach there. Maybe it helps someone to come up with a better solution. I do not have the time right now to fiddle with all the internals to make it feel like less of a hack (e.g. by having the ability to collect all routes without versioning information).

@dblock
Copy link
Member

dblock commented Mar 27, 2014

@stevschmid Thanks so much. I've merged that commit, i think it's not ideal, but we can live with it.

@dblock dblock closed this Mar 27, 2014
@karlfreeman karlfreeman deleted the options-regression-2 branch March 27, 2014 21:12
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.

3 participants