lib/cli/credential_task.rb in factor-0.0.6 vs lib/cli/credential_task.rb in factor-0.0.7
- old
+ new
@@ -3,19 +3,25 @@
module Factor
module CLI
class CredentialTask < Command
- desc "list", "list all the credentials"
- def list
+ 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 "add KEY VALUE", "add a key and value for the credential"
- def add
+ 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
+ def remove(key)
+ puts @client.remove_credential(key)
end
end
end
end
\ No newline at end of file