From d53d327c576bc48bfd0c079d4344b49b86c5e5cf Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 1 Feb 2011 00:16:26 -0200 Subject: Adding console class --- lib/keyringer.rb | 1 + lib/keyringer/console.rb | 29 +++++++++++++++++++++++++++++ lib/keyringer/parser.rb | 16 ++++++++-------- 3 files changed, 38 insertions(+), 8 deletions(-) create mode 100644 lib/keyringer/console.rb diff --git a/lib/keyringer.rb b/lib/keyringer.rb index f719052..0209fd0 100644 --- a/lib/keyringer.rb +++ b/lib/keyringer.rb @@ -24,6 +24,7 @@ require 'keyring' require 'keyringer/bash_wrapper' require 'keyringer/parser' require 'keyringer/checker' +require 'keyringer/console' require 'keyringer/actions/decrypt' require 'keyringer/actions/recipients' diff --git a/lib/keyringer/console.rb b/lib/keyringer/console.rb new file mode 100644 index 0000000..08be3be --- /dev/null +++ b/lib/keyringer/console.rb @@ -0,0 +1,29 @@ +#!/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 . +# + +module Keyringer + require 'singleton' + + class Console + include Singleton + def initialize + end + end +end diff --git a/lib/keyringer/parser.rb b/lib/keyringer/parser.rb index 6f40d01..bca2988 100644 --- a/lib/keyringer/parser.rb +++ b/lib/keyringer/parser.rb @@ -29,16 +29,16 @@ module Keyringer opts.banner = "Usage: #{File.basename($0)} [arguments]" # TODO: example option - options[:verbose] = false - opts.on( '-v', '--verbose', 'Output more information' ) do - options[:verbose] = true - end + #options[:verbose] = false + #opts.on( '-v', '--verbose', 'Output more information' ) do + #options[:verbose] = true + #end # TODO: example option - options[:logfile] = nil - opts.on( '-l', '--logfile FILE', 'Write log to FILE' ) do |file| - options[:logfile] = file - end + #options[:logfile] = nil + #opts.on( '-l', '--logfile FILE', 'Write log to FILE' ) do |file| + #options[:logfile] = file + #end # This displays the help screen opts.on( '-h', '--help', 'Display this help message' ) do -- cgit v1.2.3