Class: Cert::KeychainImporter

Inherits:
Object
  • Object
show all
Defined in:
lib/cert/keychain_importer.rb

Class Method Summary collapse

Class Method Details

.import_file(path) ⇒ Object



3
4
5
6
7
8
# File 'lib/cert/keychain_importer.rb', line 3

def self.import_file(path)
  raise "Could not find file '#{path}'".red unless File.exists?(path)
  keychain = Cert.config[:keychain_path] || "#{Dir.home}/Library/Keychains/login.keychain"
  
  puts `security import '#{path}' -k '#{keychain}'`
end