require 'rubygems' require 'cli/command' module Factor module CLI class CredentialTask < Command desc "set SERVICE NAME VALUE", "add a key and value for the credential" method_option :key, :type=>:string, :desc=>"File reference containing the symmetric key for encryption" def set(service,name,value) securet=nil if options[:key] secret=File.read(options[:key]) end puts @client.set_credential(service,name,value,secret) end desc "list", "get all of the credential" def list() puts @client.get_credentials() end desc "remove SERVICE NAME", "remove a value from the credentials bag" def remove(service,name) puts @client.remove_credential(service,name) end end end end