Sha256: f4585775871511c933f995c84a027f5b2f21953e39963fb6c7560aefb8304fb4
Contents?: true
Size: 873 Bytes
Versions: 2
Compression:
Stored size: 873 Bytes
Contents
require 'logger' Log = Logger.new(STDERR) unless defined?(Log) module Configliere class CommandClient < Client attr_accessor :command COMMANDS[:help] = "Show this usage info" def usage %Q{usage: #{File.basename($0)} command [...--option=val...] where command: One of: #{COMMANDS.keys[0..-2].join(', ')} or #{COMMANDS.keys.last} Configuration taken from #{configliere_file} by default.} end # # Run the command # def run dump_help_if_requested # Check options die "Please give a command and the name of the configliere group to encrypt" unless command die "Please give the name of the configliere group to encrypt" unless handle || ([:help, :list].include?(command)) die "\n**\nUnknown command\n**\n" unless COMMANDS.include?(command) # self.send(command) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
configliere-0.0.2 | lib/configliere/commandline/commands.rb |
configliere-0.0.1 | lib/configliere/commandline/commands.rb |