lib/chronicle/etl/cli/main.rb in chronicle-etl-0.2.4 vs lib/chronicle/etl/cli/main.rb in chronicle-etl-0.3.0

- old
+ new

@@ -20,10 +20,15 @@ desc 'jobs:COMMAND', 'Configure and run jobs', hide: true subcommand 'jobs', Jobs # Entrypoint for the CLI def self.start(given_args = ARGV, config = {}) + if given_args[0] == "--version" + puts "#{Chronicle::ETL::VERSION}" + exit + end + if given_args.none? abort "No command entered or job specified. To see commands, run `chronicle-etl help`".red end # take a subcommand:command and splits them so Thor knows how to hand off to the subcommand class @@ -50,14 +55,14 @@ shell.say "EXAMPLES".bold shell.say " Show available connectors:".italic.light_black shell.say " $ chronicle-etl connectors:list" shell.say shell.say " Run a simple job:".italic.light_black - shell.say " $ chronicle-etl jobs:start --extractor stdin --transformer null --loader stdout" + shell.say " $ chronicle-etl jobs:run --extractor stdin --transformer null --loader stdout" shell.say shell.say " Show full job options:".italic.light_black - shell.say " $ chronicle-etl jobs help start" + shell.say " $ chronicle-etl jobs help run" list = [] Thor::Util.thor_classes_in(Chronicle::ETL::CLI).each do |thor_class| list += thor_class.printable_tasks(false) @@ -69,9 +74,12 @@ shell.say 'ALL COMMANDS'.bold shell.print_table(list, indent: 2, truncate: true) shell.say shell.say "VERSION".bold shell.say " #{Chronicle::ETL::VERSION}" + shell.say + shell.say " Display current version:".italic.light_black + shell.say " $ chronicle-etl --version" shell.say shell.say "FULL DOCUMENTATION".bold shell.say " https://github.com/chronicle-app/chronicle-etl".blue shell.say end