diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/keyringer.rb | 1 | ||||
-rw-r--r-- | lib/keyringer/checker.rb | 26 | ||||
-rw-r--r-- | lib/keyringer/parser.rb | 6 |
3 files changed, 32 insertions, 1 deletions
diff --git a/lib/keyringer.rb b/lib/keyringer.rb index bef6892..257c5ad 100644 --- a/lib/keyringer.rb +++ b/lib/keyringer.rb @@ -3,6 +3,7 @@ $:.unshift File.dirname(__FILE__) require 'keyring' require 'keyringer/bash_wrapper' require 'keyringer/parser' +require 'keyringer/checker' require 'keyringer/actions/decrypt' require 'keyringer/actions/recipients' diff --git a/lib/keyringer/checker.rb b/lib/keyringer/checker.rb new file mode 100644 index 0000000..3feb98b --- /dev/null +++ b/lib/keyringer/checker.rb @@ -0,0 +1,26 @@ +#!/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 + class Checker + def initialize + end + end +end diff --git a/lib/keyringer/parser.rb b/lib/keyringer/parser.rb index a3e71cf..ee6ddae 100644 --- a/lib/keyringer/parser.rb +++ b/lib/keyringer/parser.rb @@ -26,7 +26,7 @@ module Keyringer options = {} optparse = OptionParser.new do |opts| # Set a banner, displayed at the top of the help screen. - opts.banner = "Usage: #{File.basename($0)} [options] file1 file2 ..." + opts.banner = "Usage: #{File.basename($0)} <keyring> <action> [arguments]" # TODO: example option options[:verbose] = false @@ -54,6 +54,10 @@ module Keyringer $args = ARGV $keyring = $args.shift $action = $args.shift + + if !$keyring or !$action + opts.on + end end end end |