Commit 36657da
bin/tfa
@@ -1,4 +1,4 @@
#!/usr/bin/env ruby
require 'tfa'
-TFA::CLI.start(ARGV)
+puts TFA::CLI.start(ARGV)
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