diff options
author | Ellen Marie Dash <[email protected]> | 2024-02-29 18:38:40 -0500 |
---|---|---|
committer | git <[email protected]> | 2024-03-29 08:03:40 +0000 |
commit | d19744fbd6e8ede579eb73109e6b2ec936a6ab43 (patch) | |
tree | bf07393f2e2a07fd43c412ea164270147501ad15 /lib/rubygems/commands/build_command.rb | |
parent | d916dbcb849b816b15717c64ea0c0ce756c15fb5 (diff) |
[rubygems/rubygems] [build, rebuild] Split common find_gemspec() out to GemspecHelpers.
https://github.com/rubygems/rubygems/commit/2f80a595c4
Diffstat (limited to 'lib/rubygems/commands/build_command.rb')
-rw-r--r-- | lib/rubygems/commands/build_command.rb | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/lib/rubygems/commands/build_command.rb b/lib/rubygems/commands/build_command.rb index 0ebdec565b..2ec8324141 100644 --- a/lib/rubygems/commands/build_command.rb +++ b/lib/rubygems/commands/build_command.rb @@ -1,11 +1,13 @@ # frozen_string_literal: true require_relative "../command" +require_relative "../gemspec_helpers" require_relative "../package" require_relative "../version_option" class Gem::Commands::BuildCommand < Gem::Command include Gem::VersionOption + include Gem::GemspecHelpers def initialize super "build", "Build a gem from a gemspec" @@ -75,17 +77,6 @@ Gems can be saved to a specified filename with the output option: private - 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 build_gem gemspec = resolve_gem_name |