Add validation to metadata links#1557
Merged
Merged
Conversation
4 tasks
olleolleolle
approved these changes
Feb 5, 2017
Contributor
|
What's the reason to use square brackets inside validation error message? |
Member
Author
I want to communicate that a key of metadata hash has failed validation. It would look something like |
|
I'm happy with |
homu
added a commit
to ruby/rubygems
that referenced
this pull request
Mar 8, 2017
Validate metadata link keys # Description: We intend to deprecate form used to edit linkset of gems. Metadata will be the only way to specify homepage, codebase, documentation, wiki, mailing list and issue tracker urls. Related: rubygems/rubygems.org#1234 rubygems/rubygems.org#1557 # Tasks: - [x] Describe the problem / feature - [ ] Write tests - [ ] Write code to solve the problem - [ ] Get code review from coworkers / friends I will abide by the [code of conduct](https://github.com/rubygems/rubygems/blob/master/CODE_OF_CONDUCT.md).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User will see following when validation fails:
I would propose that we should add same validation to
gem buildcommand so that people don't have to wait until aftergem pushfails.Contrary to existing behavior of
Linkset, it will fail when empty string is used as link. I believe it was allowed forLinksetbecause of existing data we had. We don't need to carry over the confusion to metadata links as well. If a user doesn't intended to provide a particular type of link, they can simply not specify that key/link in their metadata spec.