mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
suppress alert warnings
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8d5bdaa650
commit
3842ebb43d
2 changed files with 6 additions and 2 deletions
|
@ -47,8 +47,10 @@ class Downloader
|
|||
file = under(dir, name)
|
||||
super("#{$rubygems_schema}://rubygems.org/downloads/#{name}", file, nil, ims, options) or
|
||||
return false
|
||||
policy = Gem::Security::LowSecurity
|
||||
(policy = policy.dup).ui = Gem::SilentUI.new
|
||||
pkg = Gem::Package.new(file)
|
||||
pkg.security_policy = Gem::Security::LowSecurity
|
||||
pkg.security_policy = policy
|
||||
begin
|
||||
pkg.verify
|
||||
rescue Gem::Security::Exception => e
|
||||
|
|
|
@ -2,8 +2,10 @@ require 'rubygems'
|
|||
require 'rubygems/package'
|
||||
|
||||
def Gem.unpack(file, dir = nil)
|
||||
policy = Gem::Security::LowSecurity
|
||||
(policy = policy.dup).ui = Gem::SilentUI.new
|
||||
pkg = Gem::Package.new(file)
|
||||
pkg.security_policy = Gem::Security::LowSecurity
|
||||
pkg.security_policy = policy
|
||||
spec = pkg.spec
|
||||
target = spec.full_name
|
||||
target = File.join(dir, target) if dir
|
||||
|
|
Loading…
Reference in a new issue