Module: Semaphore
- Defined in:
- lib/test_boosters/logger.rb,
lib/test_boosters/executor.rb,
lib/test_boosters/cli_parser.rb,
lib/test_boosters/display_files.rb,
lib/test_boosters/rspec_booster.rb,
lib/test_boosters/cucumber_booster.rb,
lib/test_boosters/insights_uploader.rb,
lib/test_boosters/run_cucumber_config.rb
Defined Under Namespace
Classes: CucumberBooster, InsightsUploader, RspecBooster
Class Method Summary
collapse
Class Method Details
.display_files(title, files) ⇒ Object
4
5
6
7
8
9
10
|
# File 'lib/test_boosters/display_files.rb', line 4
def display_files(title, files)
display_title_and_count(title, files)
files.each { |file| puts "- #{file}" }
puts "\n"
end
|
.display_title_and_count(title, files) ⇒ Object
12
13
14
|
# File 'lib/test_boosters/display_files.rb', line 12
def display_title_and_count(title, files)
puts "#{title} #{files.count}\n"
end
|
.execute(command) ⇒ Object
4
5
6
7
8
9
10
|
# File 'lib/test_boosters/executor.rb', line 4
def execute(command)
log("Running command: #{command}")
system(command)
log("Command finished, exit status : #{$?.exitstatus}")
$?.exitstatus
end
|
.log(message) ⇒ Object
4
5
6
7
8
|
# File 'lib/test_boosters/logger.rb', line 4
def log(message)
error_log_path = ENV["ERROR_LOG_PATH"] || "#{ENV["HOME"]}/test_booster_error.log"
File.open(error_log_path, "a") { |f| f.write("#{message}\n") }
end
|
.parse ⇒ Object
6
7
8
9
10
11
12
13
14
15
16
|
# File 'lib/test_boosters/cli_parser.rb', line 6
def parse
options = {}
parser = OptionParser.new do |opts|
opts.on("--thread INDEX") { |index| options[:index] = index.to_i }
end
parser.parse!
options
end
|
.run_cucumber_config ⇒ Object
6
7
8
9
10
11
12
|
# File 'lib/test_boosters/run_cucumber_config.rb', line 6
def run_cucumber_config()
puts
puts "================== Running Cucumber Booster Config ==================="
puts
CucumberBoosterConfig::CLI.start ["inject", "."]
end
|