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

Rename MissingGroupType and UnsupportedGroupType #2227

Merged
merged 7 commits into from
Feb 14, 2022

Conversation

ericproulx
Copy link
Contributor

This PR renames MissingGroupTypeError and UnsupportedGroupTypeError for consistency.

Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

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

This is a breaking change for anyone relying on this, so would need at least a bump to 1.7. But maybe we can make it in a backward compatible way with MissingGroupTypeError = MissingGroupType?

UPGRADING.md Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@dblock
Copy link
Member

dblock commented Jan 30, 2022

I'd be happy to merge with a backwards compatible assignment of old name = new name, or a bump to 1.7.

@ericproulx
Copy link
Contributor Author

This is a breaking change for anyone relying on this, so would need at least a bump to 1.7. But maybe we can make it in a backward compatible way with MissingGroupTypeError = MissingGroupType?

I could make an alias and we deprecate it on the next version

@dblock
Copy link
Member

dblock commented Jan 31, 2022

This is a breaking change for anyone relying on this, so would need at least a bump to 1.7. But maybe we can make it in a backward compatible way with MissingGroupTypeError = MissingGroupType?

I could make an alias and we deprecate it on the next version

That works for me.

@dblock dblock merged commit e93d278 into ruby-grape:master Feb 14, 2022
@dblock
Copy link
Member

dblock commented Feb 14, 2022

@ericproulx Looks like CI is having trouble on master beyond rack-edge now, care to take a look?

@ericproulx
Copy link
Contributor Author

ericproulx commented Feb 15, 2022 via email

@ericproulx
Copy link
Contributor Author

ericproulx commented Feb 15, 2022

While testing locally, I found that Rack::Multipart::UploadedFile and File special types,

# frozen_string_literal: true
module Grape
module Validations
module Types
# Implementation for parameters that are multipart file objects.
# Actual handling of these objects is provided by +Rack::Request+;
# this class is here only to assert that rack's handling has succeeded.
class File
class << self
def parse(input)
return if input.nil?
return InvalidValue.new unless parsed?(input)
# Processing of multipart file objects

input.nil? is false on rack-edge but true on a rack 2.2.3

A quick fix would be to check input.blank? but I'm not sure it's what we want

@dblock
Copy link
Member

dblock commented Feb 17, 2022

A quick fix would be to check input.blank? but I'm not sure it's what we want

So input is an empty string? Weird.

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