Skip to content

Commit

Permalink
[rubygems/rubygems] Allow releasing with a rubygems pre version
Browse files Browse the repository at this point in the history
This condition is too restrictive in my opinion. If a user has a pre
version of rubygems installed, she should be fully responsible for it,
and we shouldn't restrict any functionality.

Also, why is a new prerelease disallowed but an old prelease allowed, or
why is 2.0.0.rc2 explictly whitelisted? I believe this kind of
exceptions are one more reason to actually permit this.

rubygems/rubygems@7f77a77620
  • Loading branch information
deivid-rodriguez authored and hsbt committed Feb 6, 2020
1 parent e323f50 commit 054d99d
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions lib/rubygems/commands/push_command.rb
Expand Up @@ -79,25 +79,6 @@ def execute
def send_gem(name)
args = [:post, "api/v1/gems"]

latest_rubygems_version = Gem.latest_rubygems_version

if latest_rubygems_version < Gem.rubygems_version and
Gem.rubygems_version.prerelease? and
Gem::Version.new('2.0.0.rc.2') != Gem.rubygems_version
alert_error <<-ERROR
You are using a beta release of RubyGems (#{Gem::VERSION}) which is not
allowed to push gems. Please downgrade or upgrade to a release version.
The latest released RubyGems version is #{latest_rubygems_version}
You can upgrade or downgrade to the latest release version with:
gem update --system=#{latest_rubygems_version}
ERROR
terminate_interaction 1
end

gem_data = Gem::Package.new(name)

unless @host
Expand Down

0 comments on commit 054d99d

Please sign in to comment.