mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
parent
fea91d69a3
commit
95326150fa
1 changed files with 9 additions and 7 deletions
|
@ -57,13 +57,17 @@ Gems can be saved to a specified filename with the output option:
|
||||||
end
|
end
|
||||||
|
|
||||||
def execute
|
def execute
|
||||||
gemspec = get_one_gem_name
|
build_gem
|
||||||
|
|
||||||
unless File.exist? gemspec
|
|
||||||
gemspec += '.gemspec' if File.exist? gemspec + '.gemspec'
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if File.exist? gemspec
|
private
|
||||||
|
|
||||||
|
def build_gem(gemspec = get_one_gem_name)
|
||||||
|
unless File.exist?(gemspec)
|
||||||
|
gemspec += ".gemspec" if File.exist?(gemspec + ".gemspec")
|
||||||
|
end
|
||||||
|
|
||||||
|
if File.exist?(gemspec)
|
||||||
spec = Gem::Specification.load(gemspec)
|
spec = Gem::Specification.load(gemspec)
|
||||||
|
|
||||||
if options[:build_path]
|
if options[:build_path]
|
||||||
|
@ -77,12 +81,10 @@ Gems can be saved to a specified filename with the output option:
|
||||||
|
|
||||||
else
|
else
|
||||||
alert_error "Gemspec file not found: #{gemspec}"
|
alert_error "Gemspec file not found: #{gemspec}"
|
||||||
terminate_interaction 1
|
terminate_interaction(1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
|
||||||
|
|
||||||
def build_package(spec)
|
def build_package(spec)
|
||||||
if spec
|
if spec
|
||||||
Gem::Package.build(
|
Gem::Package.build(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue