Module: Ironclad::Cache
- Defined in:
- lib/ironclad/cache.rb,
lib/ironclad/cache/null.rb,
lib/ironclad/cache/keyctl.rb,
lib/ironclad/cache/keychain.rb
Overview
Selects the OS keystore backend for the current platform.
Defined Under Namespace
Classes: Keychain, Keyctl, Null
Class Method Summary collapse
Class Method Details
.for_platform(account, host_os = RbConfig::CONFIG['host_os']) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/ironclad/cache.rb', line 13 def for_platform(account, host_os = RbConfig::CONFIG['host_os']) case host_os when /darwin/ Keychain.new(account) when /linux/ return Keyctl.new if Keyctl.available? warn 'ironclad: keyctl not found, so key caching is disabled and keys ' \ 'are fetched from the source every time. Install keyutils to ' \ 'enable the kernel keyring cache.' Null.new else Null.new end end |