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

Warn for duplicate meta data links when building gems #7213

Merged

Conversation

etherbob
Copy link
Contributor

@etherbob etherbob commented Dec 1, 2023

Match order of METADATA_LINK_KEYS to order used by rubygems.org in Links model Add missing download_uri key

What was the end-user or developer problem that led to this PR?

This came out of a discussion around the fix to rubygems/rubygems.org#3755

What is your fix for the problem, implemented in this PR?

Per the suggestion from @simi I've added a warning when duplicate links are present in the metadata.

I also noticed the METADATA_LINK_KEYS constant was missing download_uri

Make sure the following tasks are checked

Copy link

welcome bot commented Dec 1, 2023

Thanks for opening a pull request and helping make RubyGems and Bundler better! Someone from the RubyGems team will take a look at your pull request shortly and leave any feedback. Please make sure that your pull request has tests for any changes or added functionality.

We use GitHub Actions to test and make sure your change works functionally and uses acceptable conventions, you can review the current progress of GitHub Actions in the PR status window below.

If you have any questions or concerns that you wish to ask, feel free to leave a comment in this PR or join our #rubygems or #bundler channel on Slack.

For more information about contributing to the RubyGems project feel free to review our CONTRIBUTING guide

keys = copies.map(&:first).join("\n")
warning <<-WARNING
You have specified the uri:
#{uri}
Copy link
Member

Choose a reason for hiding this comment

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

nit: indent the URI and keys so it's easier to read?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

whoops, misread that as indent the heredoc vs the actual output. updated.

Match order of METADATA_LINK_KEYS to order used by rubygems.org in Links model.
Add missing download_uri key.
@martinemde martinemde force-pushed the warn_for_duplicate_metadata_links branch 2 times, most recently from 2aa89b7 to d2922cd Compare December 13, 2023 23:01
@martinemde
Copy link
Member

Squashed and rebased. Setting to auto-merge.

@martinemde martinemde merged commit 66d50a4 into rubygems:master Dec 14, 2023
72 checks passed
@deivid-rodriguez deivid-rodriguez changed the title Warn for duplicate meta data links Warn for duplicate meta data links when building gems Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants