26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
# File 'lib/test_launcher/rubymine/parser.rb', line 26
def self.launch(
shell: TestLauncher::Shell::Runner.new(log_path: "/dev/null"),
argv: ARGV,
env: ENV
)
request = Request.new(
disable_spring: env["DISABLE_SPRING"]
)
args = [$0].concat(argv).map { |arg|
if (
arg.match("minitest_runner.rb") &&
env.key?("INTELLIJ_IDEA_RUN_CONF_TEST_FILE_PATH")
)
arg.sub(
%r{/.+/minitest_runner.rb['"]?},
env.fetch("INTELLIJ_IDEA_RUN_CONF_TEST_FILE_PATH")
)
elsif (
arg.match("tunit_or_minitest_in_folder_runner.rb") &&
env.key?("INTELLIJ_IDEA_RUN_CONF_FOLDER_PATH"))
arg.sub(
%r{/.+/tunit_or_minitest_in_folder_runner.rb['"]?},
File.join(env.fetch("INTELLIJ_IDEA_RUN_CONF_FOLDER_PATH"), "**/*.rb")
)
else
arg
end
}
Launcher.new(
args: args,
shell: shell,
request: request
).launch
end
|