Class: Navo::CLI
- Inherits:
-
Thor
- Object
- Thor
- Navo::CLI
- Defined in:
- lib/navo/cli.rb
Overview
Command line application interface.
Instance Method Summary collapse
- #converge(pattern = nil) ⇒ Object
- #create(pattern = nil) ⇒ Object
- #destroy(pattern = nil) ⇒ Object
- #login(pattern) ⇒ Object
- #test(pattern = nil) ⇒ Object
- #verify(pattern = nil) ⇒ Object
Instance Method Details
#converge(pattern = nil) ⇒ Object
14 15 16 |
# File 'lib/navo/cli.rb', line 14 def converge(pattern = nil) exit suites_for(pattern).map(&:converge).all? ? 0 : 1 end |
#create(pattern = nil) ⇒ Object
9 10 11 |
# File 'lib/navo/cli.rb', line 9 def create(pattern = nil) exit suites_for(pattern).map(&:create).all? ? 0 : 1 end |
#destroy(pattern = nil) ⇒ Object
29 30 31 |
# File 'lib/navo/cli.rb', line 29 def destroy(pattern = nil) exit suites_for(pattern).map(&:destroy).all? ? 0 : 1 end |
#login(pattern) ⇒ Object
34 35 36 37 38 39 40 41 42 |
# File 'lib/navo/cli.rb', line 34 def login(pattern) suites = suites_for(pattern) if suites.size > 1 puts 'Pattern matched more than one test suite' exit 1 else suites.first.login end end |
#test(pattern = nil) ⇒ Object
24 25 26 |
# File 'lib/navo/cli.rb', line 24 def test(pattern = nil) exit suites_for(pattern).map(&:test).all? ? 0 : 1 end |
#verify(pattern = nil) ⇒ Object
19 20 21 |
# File 'lib/navo/cli.rb', line 19 def verify(pattern = nil) exit suites_for(pattern).map(&:verify).all? ? 0 : 1 end |