aboutsummaryrefslogtreecommitdiff
path: root/lib/keyringer/actions/ls.rb
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-02-01 11:51:26 -0200
committerSilvio Rhatto <rhatto@riseup.net>2011-02-01 11:51:26 -0200
commit8ba9fb73ad6c784d236dcccecfe022007a7cce18 (patch)
tree0ea84d1673ed94e7a6c947714e16e5956c812391 /lib/keyringer/actions/ls.rb
parent7c81c92fcd5caa28c793d1fc3e33c664f23fe2f4 (diff)
downloadkeyringer-8ba9fb73ad6c784d236dcccecfe022007a7cce18.tar.gz
keyringer-8ba9fb73ad6c784d236dcccecfe022007a7cce18.tar.bz2
Removing Keyringer::Checker and adding ls action
Diffstat (limited to 'lib/keyringer/actions/ls.rb')
-rw-r--r--lib/keyringer/actions/ls.rb30
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/keyringer/actions/ls.rb b/lib/keyringer/actions/ls.rb
new file mode 100644
index 0000000..6f295ad
--- /dev/null
+++ b/lib/keyringer/actions/ls.rb
@@ -0,0 +1,30 @@
+#!/usr/bin/env ruby
+#
+# Keyringer secret management system.
+#
+# Copyright (C) 2011 Keyringer Development Team.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+module Keyringer
+ module Actions
+ class Ls
+ def execute
+ path = Keyring::UserConfig.instance.path
+ Dir.entries(path + '/keys').join(' ')
+ end
+ end
+ end
+end