Class: Arver::Bootstrap
- Inherits:
-
Object
- Object
- Arver::Bootstrap
- Defined in:
- lib/arver/bootstrap.rb
Class Method Summary collapse
Class Method Details
.load_runtime_config(options) ⇒ Object
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/arver/bootstrap.rb', line 27 def load_runtime_config() rtc = Arver::RuntimeConfig.instance rtc.dry_run = [:dry_run] rtc.ask_password = [:ask_password] rtc.force = [:force] rtc.violence = [:violence] rtc.test_mode = [:test_mode] rtc.trust_all = [:trust_all] rtc.global_key_path = [:global_key_path] end |
.run(options) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/arver/bootstrap.rb', line 3 def run() local = Arver::LocalConfig.instance local.config_dir = [:config_dir] unless [:config_dir].empty? local.username = [:user] unless [:user].empty? return true if [:action] == :init unless local.username.present? Arver::Log.error( "No user defined" ) return false end config = Arver::Config.instance config.load self.load_runtime_config() unless Arver::Config.instance.exists?(local.username) Arver::Log.error( "No such user #{local.username}" ) return false end Arver::GPGKeyManager.check_key_of(local.username) end |