Method: Gem::Commands::CertCommand#certificates_matching
- Defined in:
- lib/rubygems/commands/cert_command.rb
#certificates_matching(filter) ⇒ Object
186 187 188 189 190 191 192 193 194 195 196 197 |
# File 'lib/rubygems/commands/cert_command.rb', line 186 def certificates_matching(filter) return enum_for __method__, filter unless block_given? Gem::Security.trusted_certificates.select do |certificate, _| subject = certificate.subject.to_s subject.downcase.index filter end.sort_by do |certificate, _| certificate.subject.to_a.map {|name, data,| [name, data] } end.each do |certificate, path| yield certificate, path end end |