зеркало из https://github.com/github/ruby.git
[rubygems/rubygems] Remove unnecessary gem_name method
https://github.com/rubygems/rubygems/commit/d1bb122651
This commit is contained in:
Родитель
b11cfed4c4
Коммит
92be07b1e1
|
@ -57,15 +57,12 @@ Gems can be saved to a specified filename with the output option:
|
|||
end
|
||||
|
||||
def execute
|
||||
gem_name = get_one_optional_argument || find_gemspec
|
||||
build_gem(gem_name)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def gem_name
|
||||
get_one_optional_argument || find_gemspec
|
||||
end
|
||||
|
||||
def find_gemspec
|
||||
gemspecs = Dir.glob("*.gemspec").sort
|
||||
|
||||
|
@ -77,7 +74,7 @@ Gems can be saved to a specified filename with the output option:
|
|||
gemspecs.first
|
||||
end
|
||||
|
||||
def build_gem(gem_name = get_one_optional_argument)
|
||||
def build_gem(gem_name)
|
||||
gemspec = File.exist?(gem_name) ? gem_name : "#{gem_name}.gemspec"
|
||||
|
||||
if File.exist?(gemspec)
|
||||
|
|
Загрузка…
Ссылка в новой задаче