Sha256: 4b2439440fb41d5f7412d167213b94cc8baefcfe8cfc67a68cc337a12296128a
Contents?: true
Size: 817 Bytes
Versions: 28
Compression:
Stored size: 817 Bytes
Contents
module Brightbox command [:config] do |cmd| cmd.desc "Remove api client details from config" cmd.arg_name "alias" cmd.command [:client_remove] do |c| c.action do |_global_options, _options, args| info "Using config file #{Brightbox.config.config_filename}" calias = args.shift if calias.nil? raise "You must specify the api alias you want to remove" end client_config = Brightbox.config.section_names.find do |config| Brightbox.config[config]["alias"] == calias end if client_config.nil? raise "An api client with the alias #{calias} does not exist in the config" end info "Removing api client #{calias}" Brightbox.config.delete_section client_config end end end end
Version data entries
28 entries across 28 versions & 1 rubygems