summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-17 06:55:20 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-17 06:55:20 +0000
commit3842ebb43d9e55e6578f885061d8c330a0afb90f (patch)
tree78ceaf21057359ec610f9cefb2a3ffb9b6a42492
parent8d5bdaa6508dd4c469319f629471904d46adf6b5 (diff)
suppress alert warnings
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--tool/downloader.rb4
-rwxr-xr-xtool/gem-unpack.rb4
2 files changed, 6 insertions, 2 deletions
diff --git a/tool/downloader.rb b/tool/downloader.rb
index 7cd0db2..b28fcfb 100644
--- a/tool/downloader.rb
+++ b/tool/downloader.rb
@@ -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
diff --git a/tool/gem-unpack.rb b/tool/gem-unpack.rb
index 5f15751..7f84126 100755
--- a/tool/gem-unpack.rb
+++ b/tool/gem-unpack.rb
@@ -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