lib/longleaf/cli.rb in longleaf-0.1.0.pre.3 vs lib/longleaf/cli.rb in longleaf-0.1.0

- old
+ new

@@ -9,11 +9,10 @@ class CLI < Thor include Longleaf::Logging class_option(:config, :aliases => "-c", :default => ENV['LONGLEAF_CFG'], - :required => true, :desc => 'Absolute path to the application configuration used for this command. By default, the value of the environment variable LONGLEAF_CFG is used.') # Logging/output options class_option(:failure_only, :type => :boolean, :default => false, @@ -57,15 +56,15 @@ command = Longleaf::RegisterCommand.new(config_path) exit command.execute(file_paths: file_paths, force: options[:force], checksums: checksums) end - desc "validate_config", "Validate an application configuration file, provided using --config." + desc "validate_config [CONFIG_PATH]", "Validate an application configuration file" # Application configuration validation command - def validate_config + def validate_config(config_path) setup_logger(options) - exit Longleaf::ValidateConfigCommand.new(options[:config]).execute + exit Longleaf::ValidateConfigCommand.new(config_path).execute end no_commands do def setup_logger(options) initialize_logger(options[:failure_only], \ No newline at end of file