Class: Cert::KeychainImporter
- Inherits:
-
Object
- Object
- Cert::KeychainImporter
- Defined in:
- lib/cert/keychain_importer.rb
Class Method Summary collapse
Class Method Details
.import_file(path) ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/cert/keychain_importer.rb', line 3 def self.import_file(path) raise "Could not find file '#{path}'".red unless File.exist?(path) keychain = File.(Cert.config[:keychain_path] || "#{Dir.home}/Library/Keychains/login.keychain") command = "security import #{path.shellescape} -k '#{keychain}'" command << " -T /usr/bin/codesign" # to not be asked for permission when running a tool like `gym` command << " -T /usr/bin/security" Helper.log.info command.yellow Helper.log.info `#{command}` end |