diff options
Diffstat (limited to 'lib/rubygems/commands/rebuild_command.rb')
-rw-r--r-- | lib/rubygems/commands/rebuild_command.rb | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/lib/rubygems/commands/rebuild_command.rb b/lib/rubygems/commands/rebuild_command.rb index 4163e0d244..97f05ef79c 100644 --- a/lib/rubygems/commands/rebuild_command.rb +++ b/lib/rubygems/commands/rebuild_command.rb @@ -4,9 +4,12 @@ require "date" require "digest" require "fileutils" require "tmpdir" +require_relative "../gemspec_helpers" require_relative "../package" class Gem::Commands::RebuildCommand < Gem::Command + include Gem::GemspecHelpers + DATE_FORMAT = "%Y-%m-%d %H:%M:%S.%N Z" def initialize @@ -223,17 +226,6 @@ Please install RubyGems v#{rg_version} and try again. ENV["SOURCE_DATE_EPOCH"] = old_sde end - def find_gemspec(glob = "*.gemspec") - gemspecs = Dir.glob(glob).sort - - if gemspecs.size > 1 - alert_error "Multiple gemspecs found: #{gemspecs}, please specify one" - terminate_interaction(1) - end - - gemspecs.first - end - def error_message(gem_name) if gem_name "Couldn't find a gemspec file matching '#{gem_name}' in #{Dir.pwd}" |