test_launcher 2.26.0 → 2.27.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/test_launcher/cli/options.rb +33 -14
- data/lib/test_launcher/cli/request.rb +4 -4
- data/lib/test_launcher/cli.rb +6 -1
- data/lib/test_launcher/frameworks/base.rb +10 -1
- data/lib/test_launcher/frameworks/ex_unit.rb +6 -6
- data/lib/test_launcher/frameworks/generic.rb +6 -6
- data/lib/test_launcher/frameworks/minitest.rb +11 -11
- data/lib/test_launcher/frameworks/mochajs.rb +6 -6
- data/lib/test_launcher/frameworks/rspec.rb +6 -6
- data/lib/test_launcher/rubymine/parser.rb +16 -3
- data/lib/test_launcher/version.rb +1 -1
- data/test_launcher.gemspec +2 -2
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7ec057af100586d64b53b846e170557e38d2933deb5c36b311e12372cd64080
|
4
|
+
data.tar.gz: d24c42f24628fce2eb6d1936ac89853b9e0af21d4d1752717d40d87e1c7455c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '049bad337c0799ff8990bab76c1e27ed9699fe549a9a5f2ac01b8f409ba3a9c602e9ae234f88894c9a9ed16d8c78eed16b31eb0afc3758e857e87bb19d38f735'
|
7
|
+
data.tar.gz: a1d4822e25ab350eabcf99e708e20a3eeb9a6f3c19098f691f9aae592c57a71305f6d9a8be1bdb7ca194d8a591cb6fc17ecc3cb234a92d0b943b81da0b0626c5
|
@@ -1,20 +1,39 @@
|
|
1
1
|
module TestLauncher
|
2
2
|
module CLI
|
3
|
-
class Options
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
3
|
+
class Options
|
4
|
+
attr_reader(
|
5
|
+
:disable_spring,
|
6
|
+
:example_name,
|
7
|
+
:force_spring,
|
8
|
+
:frameworks,
|
9
|
+
:rerun,
|
10
|
+
:run_all,
|
11
|
+
:search_string,
|
12
|
+
:searcher,
|
13
|
+
:shell
|
14
|
+
)
|
15
|
+
def initialize(
|
16
|
+
disable_spring:,
|
17
|
+
example_name:,
|
18
|
+
force_spring:,
|
19
|
+
frameworks:,
|
20
|
+
rerun:,
|
21
|
+
run_all:,
|
22
|
+
search_string:,
|
23
|
+
searcher:,
|
24
|
+
shell:
|
25
|
+
)
|
26
|
+
@disable_spring = disable_spring
|
27
|
+
@example_name = example_name
|
28
|
+
@force_spring = force_spring
|
29
|
+
@frameworks = frameworks
|
30
|
+
@rerun = rerun
|
31
|
+
@run_all = run_all
|
32
|
+
@search_string = search_string
|
33
|
+
@searcher = searcher
|
34
|
+
@shell = shell
|
17
35
|
end
|
36
|
+
|
18
37
|
end
|
19
38
|
end
|
20
39
|
end
|
@@ -51,12 +51,12 @@ module TestLauncher
|
|
51
51
|
framework.searcher(@searcher)
|
52
52
|
end
|
53
53
|
|
54
|
-
def runner(*a)
|
55
|
-
framework.runner(*a)
|
54
|
+
def runner(*a, **o)
|
55
|
+
framework.runner(*a, **o)
|
56
56
|
end
|
57
57
|
|
58
|
-
def test_case(*a)
|
59
|
-
framework.test_case(*a)
|
58
|
+
def test_case(*a, **o)
|
59
|
+
framework.test_case(*a, **o)
|
60
60
|
end
|
61
61
|
|
62
62
|
def shell
|
data/lib/test_launcher/cli.rb
CHANGED
@@ -6,7 +6,12 @@ require "test_launcher/cli/request"
|
|
6
6
|
|
7
7
|
module TestLauncher
|
8
8
|
module CLI
|
9
|
-
class MultiFrameworkQuery
|
9
|
+
class MultiFrameworkQuery
|
10
|
+
attr_reader :cli_options
|
11
|
+
def initialize(cli_options)
|
12
|
+
@cli_options = cli_options
|
13
|
+
end
|
14
|
+
|
10
15
|
def command
|
11
16
|
command = nil
|
12
17
|
command_finders.each do |command_finder|
|
@@ -3,7 +3,12 @@ require "test_launcher/frameworks/implementation/test_case"
|
|
3
3
|
module TestLauncher
|
4
4
|
module Frameworks
|
5
5
|
module Base
|
6
|
-
class Searcher
|
6
|
+
class Searcher
|
7
|
+
attr_reader :raw_searcher
|
8
|
+
def initialize(raw_searcher, **)
|
9
|
+
@raw_searcher = raw_searcher
|
10
|
+
end
|
11
|
+
|
7
12
|
def test_files(query)
|
8
13
|
raw_searcher
|
9
14
|
.find_files(query)
|
@@ -38,6 +43,10 @@ module TestLauncher
|
|
38
43
|
end
|
39
44
|
|
40
45
|
class Runner
|
46
|
+
def initialize(*, **)
|
47
|
+
super()
|
48
|
+
end
|
49
|
+
|
41
50
|
def by_line_number(test_case)
|
42
51
|
raise NotImplementedError
|
43
52
|
end
|
@@ -9,16 +9,16 @@ module TestLauncher
|
|
9
9
|
`git ls-files '*.exs'`.split("\n").any?
|
10
10
|
end
|
11
11
|
|
12
|
-
def self.test_case(*a)
|
13
|
-
TestCase.new(*a)
|
12
|
+
def self.test_case(*a, **o)
|
13
|
+
TestCase.new(*a, **o)
|
14
14
|
end
|
15
15
|
|
16
|
-
def self.searcher(*a)
|
17
|
-
Searcher.new(*a)
|
16
|
+
def self.searcher(*a, **o)
|
17
|
+
Searcher.new(*a, **o)
|
18
18
|
end
|
19
19
|
|
20
|
-
def self.runner(*a)
|
21
|
-
Runner.new(*a)
|
20
|
+
def self.runner(*a, **o)
|
21
|
+
Runner.new(*a, **o)
|
22
22
|
end
|
23
23
|
|
24
24
|
class Searcher < Base::Searcher
|
@@ -10,16 +10,16 @@ module TestLauncher
|
|
10
10
|
true
|
11
11
|
end
|
12
12
|
|
13
|
-
def self.test_case(*a)
|
14
|
-
TestCase.new(*a)
|
13
|
+
def self.test_case(*a, **o)
|
14
|
+
TestCase.new(*a, **o)
|
15
15
|
end
|
16
16
|
|
17
|
-
def self.searcher(*a)
|
18
|
-
Searcher.new(*a)
|
17
|
+
def self.searcher(*a, **o)
|
18
|
+
Searcher.new(*a, **o)
|
19
19
|
end
|
20
20
|
|
21
|
-
def self.runner(*a)
|
22
|
-
Runner.new(*a)
|
21
|
+
def self.runner(*a, **o)
|
22
|
+
Runner.new(*a, **o)
|
23
23
|
end
|
24
24
|
|
25
25
|
class Searcher < Base::Searcher
|
@@ -10,16 +10,16 @@ module TestLauncher
|
|
10
10
|
`git ls-files '*_test.rb'`.split("\n").any?
|
11
11
|
end
|
12
12
|
|
13
|
-
def self.test_case(*a)
|
14
|
-
TestCase.new(*a)
|
13
|
+
def self.test_case(*a, **o)
|
14
|
+
TestCase.new(*a, **o)
|
15
15
|
end
|
16
16
|
|
17
|
-
def self.searcher(*a)
|
18
|
-
Searcher.new(*a)
|
17
|
+
def self.searcher(*a, **o)
|
18
|
+
Searcher.new(*a, **o)
|
19
19
|
end
|
20
20
|
|
21
|
-
def self.runner(*a)
|
22
|
-
Runner.new(*a)
|
21
|
+
def self.runner(*a, **o)
|
22
|
+
Runner.new(*a, **o)
|
23
23
|
end
|
24
24
|
|
25
25
|
class Searcher < Base::Searcher
|
@@ -84,14 +84,14 @@ module TestLauncher
|
|
84
84
|
end
|
85
85
|
|
86
86
|
def multiple_files_error
|
87
|
-
MultipleByLineMatches.new(
|
88
|
-
It looks like you are running a line number in a test file.
|
87
|
+
MultipleByLineMatches.new(<<~MSG)
|
88
|
+
It looks like you are running a line number in a test file.
|
89
89
|
|
90
|
-
Multiple files have been found that match your query.
|
90
|
+
Multiple files have been found that match your query.
|
91
91
|
|
92
|
-
This case is not supported for Minitest.
|
92
|
+
This case is not supported for Minitest.
|
93
93
|
|
94
|
-
Open an issue on https://github.com/petekinnecom/test_launcher if this is something you have run into at least 3 times. :)
|
94
|
+
Open an issue on https://github.com/petekinnecom/test_launcher if this is something you have run into at least 3 times. :)
|
95
95
|
MSG
|
96
96
|
end
|
97
97
|
|
@@ -9,16 +9,16 @@ module TestLauncher
|
|
9
9
|
`git ls-files '*pec.js'`.split("\n").any?
|
10
10
|
end
|
11
11
|
|
12
|
-
def self.test_case(*a)
|
13
|
-
TestCase.new(*a)
|
12
|
+
def self.test_case(*a, **o)
|
13
|
+
TestCase.new(*a, **o)
|
14
14
|
end
|
15
15
|
|
16
|
-
def self.searcher(*a)
|
17
|
-
Searcher.new(*a)
|
16
|
+
def self.searcher(*a, **o)
|
17
|
+
Searcher.new(*a, **o)
|
18
18
|
end
|
19
19
|
|
20
|
-
def self.runner(*a)
|
21
|
-
Runner.new(*a)
|
20
|
+
def self.runner(*a, **o)
|
21
|
+
Runner.new(*a, **o)
|
22
22
|
end
|
23
23
|
|
24
24
|
class Searcher < Base::Searcher
|
@@ -9,16 +9,16 @@ module TestLauncher
|
|
9
9
|
`git ls-files '*_spec.rb'`.split("\n").any?
|
10
10
|
end
|
11
11
|
|
12
|
-
def self.test_case(*a)
|
13
|
-
TestCase.new(*a)
|
12
|
+
def self.test_case(*a, **o)
|
13
|
+
TestCase.new(*a, **o)
|
14
14
|
end
|
15
15
|
|
16
|
-
def self.searcher(*a)
|
17
|
-
Searcher.new(*a)
|
16
|
+
def self.searcher(*a, **o)
|
17
|
+
Searcher.new(*a, **o)
|
18
18
|
end
|
19
19
|
|
20
|
-
def self.runner(*a)
|
21
|
-
Runner.new(*a)
|
20
|
+
def self.runner(*a, **o)
|
21
|
+
Runner.new(*a, **o)
|
22
22
|
end
|
23
23
|
|
24
24
|
class Searcher < Base::Searcher
|
@@ -29,12 +29,25 @@ module TestLauncher
|
|
29
29
|
env: ENV
|
30
30
|
)
|
31
31
|
request = Request.new(
|
32
|
-
disable_spring:
|
32
|
+
disable_spring: env["DISABLE_SPRING"]
|
33
33
|
)
|
34
34
|
|
35
35
|
args = [$0].concat(argv).map { |arg|
|
36
|
-
if
|
37
|
-
arg.
|
36
|
+
if (
|
37
|
+
arg.match("minitest_runner.rb") &&
|
38
|
+
env.key?("INTELLIJ_IDEA_RUN_CONF_TEST_FILE_PATH")
|
39
|
+
)
|
40
|
+
arg.sub(
|
41
|
+
%r{/.+/minitest_runner.rb['"]?},
|
42
|
+
env.fetch("INTELLIJ_IDEA_RUN_CONF_TEST_FILE_PATH")
|
43
|
+
)
|
44
|
+
elsif (
|
45
|
+
arg.match("tunit_or_minitest_in_folder_runner.rb") &&
|
46
|
+
env.key?("INTELLIJ_IDEA_RUN_CONF_FOLDER_PATH"))
|
47
|
+
arg.sub(
|
48
|
+
%r{/.+/tunit_or_minitest_in_folder_runner.rb['"]?},
|
49
|
+
File.join(env.fetch("INTELLIJ_IDEA_RUN_CONF_FOLDER_PATH"), "**/*.rb")
|
50
|
+
)
|
38
51
|
else
|
39
52
|
arg
|
40
53
|
end
|
data/test_launcher.gemspec
CHANGED
@@ -18,6 +18,6 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_development_dependency "bundler", "
|
22
|
-
spec.add_development_dependency "rake", "
|
21
|
+
spec.add_development_dependency "bundler", ">= 1.7"
|
22
|
+
spec.add_development_dependency "rake", ">= 12.3.3"
|
23
23
|
end
|
metadata
CHANGED
@@ -1,43 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: test_launcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.27.0.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pete Kinnecom
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.7'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.7'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 12.3.3
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 12.3.3
|
41
41
|
description: no really
|
42
42
|
email:
|
43
43
|
- pete.kinnecom@appfolio.com
|
@@ -89,11 +89,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
89
89
|
version: '0'
|
90
90
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
91
91
|
requirements:
|
92
|
-
- - "
|
92
|
+
- - ">"
|
93
93
|
- !ruby/object:Gem::Version
|
94
|
-
version:
|
94
|
+
version: 1.3.1
|
95
95
|
requirements: []
|
96
|
-
rubygems_version: 3.
|
96
|
+
rubygems_version: 3.2.22
|
97
97
|
signing_key:
|
98
98
|
specification_version: 4
|
99
99
|
summary: Easily run tests
|