ruby / ruby/rubygems

gemspec should accept array as allowed_push_host

Open
#4,484 7 comments 9 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

RubyGems type: feature request
Dominant language
Ruby
Stars
4k
Forks
1.9k
Avg merge
1d 2h
Merged PRs (30d)
81

Description

Hi,
a gemspec file can contain a line like
spec.metadata["allowed_push_host"] = "http://localhost:9292"
(and should) to restrict where a gem can be pushed to.

However, it accepts a single string only. But especially when using privat gem stores there's often reason to use more than one for the same gem, e.g. one at the regular office and one at home for home-office. So it would be practical, if the gemspec would allow an array of strings (or even regular expressions) as allowed_push_hosts.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue does not identify a file, test, or entry point. Start by locating the gemspec metadata validation for allowed_push_host, then determine the supported format and expected behavior for multiple hosts before adding coverage for the requested array form.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.