[前][次][番号順一覧][スレッド一覧]

ruby-changes:37214

From: nobu <ko1@a...>
Date: Sat, 17 Jan 2015 15:55:31 +0900 (JST)
Subject: [ruby-changes:37214] nobu:r49295 (trunk): suppress alert warnings

nobu	2015-01-17 15:55:20 +0900 (Sat, 17 Jan 2015)

  New Revision: 49295

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=49295

  Log:
    suppress alert warnings

  Modified files:
    trunk/tool/downloader.rb
    trunk/tool/gem-unpack.rb
Index: tool/gem-unpack.rb
===================================================================
--- tool/gem-unpack.rb	(revision 49294)
+++ tool/gem-unpack.rb	(revision 49295)
@@ -2,8 +2,10 @@ require 'rubygems' https://github.com/ruby/ruby/blob/trunk/tool/gem-unpack.rb#L2
 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
Index: tool/downloader.rb
===================================================================
--- tool/downloader.rb	(revision 49294)
+++ tool/downloader.rb	(revision 49295)
@@ -47,8 +47,10 @@ class Downloader https://github.com/ruby/ruby/blob/trunk/tool/downloader.rb#L47
       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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]