Module: TestBoosters::Shell

Defined in:
lib/test_boosters/shell.rb

Class Method Summary collapse

Class Method Details

.display_files(title, files) ⇒ Object



23
24
25
26
27
28
29
30
# File 'lib/test_boosters/shell.rb', line 23

def display_files(title, files)
  puts "#{title} (#{files.count} files):"
  puts

  files.each { |file| puts "- #{file}" }

  puts "\n"
end

.display_title(title) ⇒ Object



17
18
19
20
21
# File 'lib/test_boosters/shell.rb', line 17

def display_title(title)
  puts
  puts "========================= #{title} =========================="
  puts
end

.display_title_and_count(title, files) ⇒ Object



32
33
34
# File 'lib/test_boosters/shell.rb', line 32

def display_title_and_count(title, files)
  puts "#{title} #{files.count}\n"
end

.execute(command) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/test_boosters/shell.rb', line 5

def execute(command)
  TestBoosters::Logger.info("Running command: #{command}")

  system(command)

  exit_status = $?.exitstatus

  TestBoosters::Logger.info("Command finished, exit status : #{exit_status}")

  exit_status
end