提交 fb89d7fa 编写于 作者: T Tim Morgan 提交者: rick

Run gem install as external command. [#210 state:resolved]

上级 2243ffd1
......@@ -73,7 +73,7 @@ def load_paths_added?
end
def install
Gem::GemRunner.new.run(install_command)
puts `#{gem_command} #{install_command.join(' ')}`
end
def unpack_to(directory)
......@@ -100,6 +100,10 @@ def ==(other)
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
def install_command
cmd = %w(install) << @name
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册