require 'rubygems' require 'thor' require 'thor/group' require 'yaml' require 'rest_client' module Factor module CLI class Command < Thor CONFIG_FILE_DIR = File.expand_path("~/.factor") no_tasks do def save_config(config) File.open(CONFIG_FILE_DIR,'w') do |file| YAML::dump(config,file) end end def get_config File.exists?(CONFIG_FILE_DIR) ? YAML::load_file(CONFIG_FILE_DIR) : {} end end end end end