require 'launchy' require 'httparty' class Railsonfire::Config < BASECLI desc "show", "show the current config values set for your Railsonfire project" def show invoke "auth:login" send_signal :show_config say "No configuration values set" and return if Railsonfire.user.config.empty? Railsonfire.user.config.each do |cfg| say "#{cfg[0]}=#{cfg[1]}" end end desc "add", "Asks you for a Key and Value to add to your Railsonfire config" def add invoke "auth:login" send_signal :add_config key = ask "Key:" value = ask "Value:" Railsonfire.user.set_config key, value end desc "remove", "Remove a configuration value" def remove invoke "auth:login" send_signal :remove_config Railsonfire.user.remove_config(ask "Key:") end end