require 'rubygems' require 'cli/command' module Factor module CLI class CredentialTask < Command desc "list [KEY]", "list all the credentials" #method_option :key, :alias=>"-k", :type=>:string, :desc=>"key reference" def list(key="") puts @client.get_credential(key)["value"] end desc "set KEY VALUE", "add a key and value for the credential" #method_option :key, :alias=>"-k", :type=>:string, :desc=>"key reference" #method_option :value, :alias=>"-v", :type=>:string, :desc=>"values" def set(key,value) puts @client.set_credential(key,value) end desc "remove KEY", "remove a value from the credentials bag" def remove(key) puts @client.remove_credential(key) end end end end