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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 969bdf386bd70aad1f3fe5c3a5fdfe4d84f5563830e76fe89df3e26aa8a17ec8
4
- data.tar.gz: 6153978e2039b70eff76093d6fd817b90b0c49ff5fdae8b43e686696e756da45
3
+ metadata.gz: e7ec057af100586d64b53b846e170557e38d2933deb5c36b311e12372cd64080
4
+ data.tar.gz: d24c42f24628fce2eb6d1936ac89853b9e0af21d4d1752717d40d87e1c7455c2
5
5
  SHA512:
6
- metadata.gz: b7c8a07385383100bd867642861011c51967e8127069baa83a486af9776350b09c9f4344eec3a36f7bf7fcbdb9effaa3cb1b045e58384e6a375a5dfd8d060a54
7
- data.tar.gz: '0139155f5ac50725ca3ac6cba826c1917d9331f9c059dc8b4736668e408bf6a6a56bac67639bf6b6656abbba5d95c6aa3b037c4edc4ad6541f9b8fcc166cd86b'
6
+ metadata.gz: '049bad337c0799ff8990bab76c1e27ed9699fe549a9a5f2ac01b8f409ba3a9c602e9ae234f88894c9a9ed16d8c78eed16b31eb0afc3758e857e87bb19d38f735'
7
+ data.tar.gz: a1d4822e25ab350eabcf99e708e20a3eeb9a6f3c19098f691f9aae592c57a71305f6d9a8be1bdb7ca194d8a591cb6fc17ecc3cb234a92d0b943b81da0b0626c5
@@ -1,20 +1,39 @@
1
1
  module TestLauncher
2
2
  module CLI
3
- class Options < Struct.new(
4
- :search_string,
5
- :frameworks,
6
- :rerun,
7
- :run_all,
8
- :disable_spring,
9
- :force_spring,
10
- :example_name,
11
- :shell,
12
- :searcher
13
- )
14
- def initialize(**args)
15
- raise ArgumentError.new("These keys are allowed and required: #{members}") unless args.keys.sort == members.sort
16
- args.each { |k, v| self[k] = v }
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
@@ -6,7 +6,12 @@ require "test_launcher/cli/request"
6
6
 
7
7
  module TestLauncher
8
8
  module CLI
9
- class MultiFrameworkQuery < Struct.new(:cli_options)
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 < Struct.new(:raw_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(<<-MSG)
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: ENV["DISABLE_SPRING"]
32
+ disable_spring: env["DISABLE_SPRING"]
33
33
  )
34
34
 
35
35
  args = [$0].concat(argv).map { |arg|
36
- if arg.match("minitest_runner.rb") && env.key?("INTELLIJ_IDEA_RUN_CONF_TEST_FILE_PATH")
37
- arg.sub(%r{/.+/minitest_runner.rb['"]?}, env.fetch("INTELLIJ_IDEA_RUN_CONF_TEST_FILE_PATH"))
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
@@ -1,3 +1,3 @@
1
1
  module TestLauncher
2
- VERSION = "2.26.0"
2
+ VERSION = "2.27.0.pre"
3
3
  end
@@ -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", "~> 1.7"
22
- spec.add_development_dependency "rake", "~> 10.0"
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.26.0
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: 2020-10-13 00:00:00.000000000 Z
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: '10.0'
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: '10.0'
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: '0'
94
+ version: 1.3.1
95
95
  requirements: []
96
- rubygems_version: 3.0.3
96
+ rubygems_version: 3.2.22
97
97
  signing_key:
98
98
  specification_version: 4
99
99
  summary: Easily run tests