aboutsummaryrefslogtreecommitdiff
path: root/lib/keyringer
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-02-01 14:04:49 -0200
committerSilvio Rhatto <rhatto@riseup.net>2011-02-01 14:04:49 -0200
commit76d0fabcaee4b8a6bdf8c00df45b1813b87e22f2 (patch)
tree0c649197fac9671a38ec8e05ae7719acd5c35d59 /lib/keyringer
parent7a9567d76454217955e643953da37f31fe760185 (diff)
downloadkeyringer-76d0fabcaee4b8a6bdf8c00df45b1813b87e22f2.tar.gz
keyringer-76d0fabcaee4b8a6bdf8c00df45b1813b87e22f2.tar.bz2
Adding git backend and init code; fixing decrypt behavior
Diffstat (limited to 'lib/keyringer')
-rw-r--r--lib/keyringer/actions/decrypt.rb6
-rw-r--r--lib/keyringer/actions/init.rb5
2 files changed, 8 insertions, 3 deletions
diff --git a/lib/keyringer/actions/decrypt.rb b/lib/keyringer/actions/decrypt.rb
index f76dcc9..33f01c2 100644
--- a/lib/keyringer/actions/decrypt.rb
+++ b/lib/keyringer/actions/decrypt.rb
@@ -22,10 +22,10 @@ module Keyringer
module Actions
class Decrypt
def execute
- filename = $args[0]
+ path = Keyring::UserConfig.instance.path
+ filename = path + '/keys/' + $args[0] + '.asc'
crypt = Keyring::Crypt.new
- output = crypt.decrypt(filename)
- return output
+ crypt.decrypt(filename)
end
end
end
diff --git a/lib/keyringer/actions/init.rb b/lib/keyringer/actions/init.rb
index 1aa6de1..d48abbf 100644
--- a/lib/keyringer/actions/init.rb
+++ b/lib/keyringer/actions/init.rb
@@ -22,6 +22,11 @@ module Keyringer
module Actions
class Init
def initialize
+ path = Keyring::UserConfig.instance.path
+ Backend::Git.new
+ end
+
+ def execute
end
end
end