lib/backup_repos/commander.rb in backup_repos-0.3.0 vs lib/backup_repos/commander.rb in backup_repos-0.4.0

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + require 'commander' require_relative 'cli/setup' module BackupRepos @@ -13,16 +15,18 @@ command :backup do |c| c.syntax = 'backup-repos backup' c.description = 'Backup your repositories.' - c.option '--backup_root DIR', String, 'Backup destination directory' + c.option '--config-path PATH', String, 'Path to configuration file' + c.option '--backup-root DIR', String, 'Backup destination directory' c.option '--debug', String, 'Show debug information' + c.option '--only LIST', String, 'Only backup specified repos or orgs. Separate by comma.' c.action do |args, options| BackupRepos.config_options = options - if args[0] && %w(github bitbucket gitlab).include?(args[0].downcase) + if args[0] && %w[github bitbucket gitlab].include?(args[0].downcase) BackupRepos::Backup.new.send("process_#{args[0]}") else BackupRepos::Backup.new.process end end