Class: Navo::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/navo/cli.rb

Overview

Command line application interface.

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ CLI

Returns a new instance of CLI.



8
9
10
11
12
13
# File 'lib/navo/cli.rb', line 8

def initialize(*args)
  super
  Navo::Logger.output = STDOUT
  STDOUT.sync = true
  Navo::Logger.level = config['log-level']
end

Instance Method Details

#login(pattern) ⇒ Object



47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/navo/cli.rb', line 47

def (pattern)
  apply_flags_to_config!

  suites = suites_for(pattern)
  if suites.size == 0
    logger.console "Pattern '#{pattern}' matched no test suites", severity: :error
    exit 1
  elsif suites.size > 1
    logger.console "Pattern '#{pattern}' matched more than one test suite", severity: :error
    exit 1
  else
    suites.first.
  end
end