summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2014-09-26 14:47:12 -0600
committermo khan <mo@mokhan.ca>2014-09-26 14:47:12 -0600
commit36657da56ba6896ff1196220c42380de1bb8fb59 (patch)
treef0603955f4a16c12c5ae390cbea39291abef49c2
parentf1bede0ae9387001815c2c1c7705f56db8b49f1f (diff)
write to stdout in the bin/tfa file.v0.0.7
-rwxr-xr-xbin/tfa2
-rw-r--r--lib/tfa/cli.rb10
2 files changed, 4 insertions, 8 deletions
diff --git a/bin/tfa b/bin/tfa
index 5e5160c..566335d 100755
--- a/bin/tfa
+++ b/bin/tfa
@@ -1,4 +1,4 @@
#!/usr/bin/env ruby
require 'tfa'
-TFA::CLI.start(ARGV)
+puts TFA::CLI.start(ARGV)
diff --git a/lib/tfa/cli.rb b/lib/tfa/cli.rb
index 4dcf97d..e8e579a 100644
--- a/lib/tfa/cli.rb
+++ b/lib/tfa/cli.rb
@@ -7,17 +7,17 @@ module TFA
desc "add NAME SECRET", "add a new secret to the database"
def add(name, secret)
- display AddCommand.new(storage).run([name, secret])
+ AddCommand.new(storage).run([name, secret])
end
desc "show NAME", "shows the secret for the given key"
def show(name)
- display ShowCommand.new(storage).run([name])
+ ShowCommand.new(storage).run([name])
end
desc "totp NAME", "generate a Time based One Time Password"
def totp(name)
- display TotpCommand.new(storage).run([name])
+ TotpCommand.new(storage).run([name])
end
private
@@ -25,9 +25,5 @@ module TFA
def storage
@storage ||= Storage.new(filename: options[:filename] || 'tfa')
end
-
- def display(message)
- puts message
- end
end
end