lib/cli/config.rb in af-0.3.18.12 vs lib/cli/config.rb in af-0.3.19.beta.1
- old
+ new
@@ -13,10 +13,11 @@
TOKEN_FILE = '~/.af_token'
INSTANCES_FILE = '~/.af_instances'
ALIASES_FILE = '~/.af_aliases'
CLIENTS_FILE = '~/.af_clients'
MICRO_FILE = '~/.af_micro'
+ CRASH_FILE = '~/.af_crash'
STOCK_CLIENTS = File.expand_path("../../../config/clients.yml", __FILE__)
class << self
attr_accessor :colorize
@@ -43,9 +44,14 @@
end
def store_target(target_host)
target_file = File.expand_path(TARGET_FILE)
lock_and_write(target_file, target_host)
+ end
+
+ def store_crash(log)
+ crash_file = File.expand_path(CRASH_FILE)
+ lock_and_write(crash_file, log)
end
def all_tokens(token_file_path=nil)
token_file = File.expand_path(token_file_path || TOKEN_FILE)
return nil unless File.exists? token_file