Sha256: 1de2b869a925f33938130cc181b957dc443af11f2c8171e9a7217262f4847c1d
Contents?: true
Size: 716 Bytes
Versions: 3
Compression:
Stored size: 716 Bytes
Contents
#!/usr/bin/env ruby $LOAD_PATH << File.expand_path("../../lib", __FILE__) require 'hieracles' require 'hieracles/options/hieracles' require 'hieracles/commands' opt = Hieracles::Options::Hieracles.new(ARGV) if opt.options.has_key? :version puts Hieracles.version exit(0) end command = opt.payload.shift arg = opt.payload.shift extra = opt.payload if !command || command == 'help' puts Hieracles::Options::Hieracles.usage exit(1) end config = Hieracles::Config.new opt.options commands = Hieracles::Commands.new config if commands.available.include? command commands.run command, arg, extra elsif commands.respond_to? command commands.send command, arg, extra else puts 'Command not found.' end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
hieracles-0.4.2 | bin/hieracles |
hieracles-0.4.1 | bin/hieracles |
hieracles-0.4.0 | bin/hieracles |