提交 1d1ea92f 编写于 作者: J Jeremy Kemper

GemDependency#specification should be public

上级 89ea7bee
......@@ -98,27 +98,26 @@ def ==(other)
self.name == other.name && self.requirement == other.requirement
end
private ###################################################################
def specification
@spec ||= Gem.source_index.search(Gem::Dependency.new(@name, @requirement)).sort_by { |s| s.version }.last
end
def gem_command
RUBY_PLATFORM =~ /win32/ ? 'gem.bat' : 'gem'
end
private
def gem_command
RUBY_PLATFORM =~ /win32/ ? 'gem.bat' : 'gem'
end
def install_command
cmd = %w(install) << @name
cmd << "--version" << %("#{@requirement.to_s}") if @requirement
cmd << "--source" << @source if @source
cmd
end
def install_command
cmd = %w(install) << @name
cmd << "--version" << %("#{@requirement.to_s}") if @requirement
cmd << "--source" << @source if @source
cmd
end
def unpack_command
cmd = %w(unpack) << @name
cmd << "--version" << %("#{@requirement.to_s}") if @requirement
cmd
end
def unpack_command
cmd = %w(unpack) << @name
cmd << "--version" << %("#{@requirement.to_s}") if @requirement
cmd
end
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册