ruby-changes:57542
From: bronzdoc <ko1@a...>
Date: Thu, 5 Sep 2019 19:02:49 +0900 (JST)
Subject: [ruby-changes:57542] 95326150fa (master): [rubygems/rubygems] Move build gem logic to its own method
https://git.ruby-lang.org/ruby.git/commit/?id=95326150fa From 95326150faa0854ed6cd0877e0069d2080bc5005 Mon Sep 17 00:00:00 2001 From: bronzdoc <lsagastume1990@g...> Date: Sat, 17 Aug 2019 08:54:17 -0600 Subject: [rubygems/rubygems] Move build gem logic to its own method https://github.com/rubygems/rubygems/commit/a16eacd650 diff --git a/lib/rubygems/commands/build_command.rb b/lib/rubygems/commands/build_command.rb index 9d318e6..7614903 100644 --- a/lib/rubygems/commands/build_command.rb +++ b/lib/rubygems/commands/build_command.rb @@ -57,13 +57,17 @@ Gems can be saved to a specified filename with the output option: https://github.com/ruby/ruby/blob/trunk/lib/rubygems/commands/build_command.rb#L57 end def execute - gemspec = get_one_gem_name + build_gem + end + + private - unless File.exist? gemspec - gemspec += '.gemspec' if File.exist? gemspec + '.gemspec' + def build_gem(gemspec = get_one_gem_name) + unless File.exist?(gemspec) + gemspec += ".gemspec" if File.exist?(gemspec + ".gemspec") end - if File.exist? gemspec + if File.exist?(gemspec) spec = Gem::Specification.load(gemspec) if options[:build_path] @@ -77,12 +81,10 @@ Gems can be saved to a specified filename with the output option: https://github.com/ruby/ruby/blob/trunk/lib/rubygems/commands/build_command.rb#L81 else alert_error "Gemspec file not found: #{gemspec}" - terminate_interaction 1 + terminate_interaction(1) end end - private - def build_package(spec) if spec Gem::Package.build( -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/