intridea/grape — pull request #78 by jwkoelewijn (2011-11-23 13:00:37+00:00)
Title: Added consideration of vendors when using header based version selection

As discussed after the introduction of the header based versioning. This commit will also take the vendor given in the header into account, otherwise it would be possible to have:

class MyAPI < Grape::API
vendor 'v1', :using => :header, :vendor => 'twitter', :format => :json

get '/' do
'hello world'
end
end

and let it still return the '/' even when the accept-header "application/vnd.some_other_vendor-v1+json" was given. This commit will let it return a 404, and sets the X-Cascade pass as well.