selective-ruby-minitest 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9080fdfdf4a93da215f6530f52f5e5540c6844dbddb27cb22b61f5a7e8689110
4
- data.tar.gz: 49dafe3c5f9098c532c9f295fc7be4b5c715414f61b84d1e10fb5b72c73624ac
3
+ metadata.gz: 9cdd3bc1432a5d4ed5550f3a1cc8bd3034e4e96d6e24772e3b12c4170a0ff528
4
+ data.tar.gz: 3acd8d973aa50c2c2292181bb59c8e57bfe3236ca00ad0bcd713e77580bd74ca
5
5
  SHA512:
6
- metadata.gz: a75f4d55d5c8ee0a145ff71d8bcfe9dbaa68093f05e3993ec275ad71fca60b7364eb2fa491c8b28203b9d75726d4710f0d769c6786efc50f0aa3a9ce43fb15f2
7
- data.tar.gz: 7a0efb69ed056c57fe0ac231eaf8f4675b304666587e87a6ce2ce7aa9013f7e3f4adcf4226e35a06bd742043ff5e9b410cb8cb189c2ab6e850d152d8692d6c91
6
+ metadata.gz: 7907431f1aa57483b1523156bce6c7d3a45546f8b4ddd10a49e69bb1f94c20d526bf3f045cb8a51a69f4835dfffbf94c9d861e0fc7fd54c57f6cf78fa8bd47ba
7
+ data.tar.gz: 2007ac6dd36e472874b51349bdea1b1096a939d12cd86d8e4cce94701bbd454ada0cfa50ba48754d37a5bbabd9be7ad4ae28f72fbe2da2f70f92f9859fb08dee
data/.rwx/ci.yml CHANGED
@@ -15,8 +15,29 @@ tasks:
15
15
  - key: tests
16
16
  parallel:
17
17
  matrix:
18
- ruby-version: ["3.1.7", "3.2.9", "3.3.10", "3.4.9", "4.0.3"]
18
+ ruby-version: ["2.7.8", "3.0.7", "3.1.7", "3.2.9", "3.3.10", "3.4.9", "4.0.7"]
19
19
  call: ${{ run.dir }}/test.yml
20
20
  init:
21
21
  commit-sha: ${{ init.commit-sha }}
22
22
  ruby-version: ${{ parallel.ruby-version }}
23
+ minitest-version: "~> 5.0"
24
+
25
+ - key: tests-minitest-6
26
+ parallel:
27
+ matrix:
28
+ ruby-version: ["3.2.9", "3.3.10", "3.4.9", "4.0.7"]
29
+ call: ${{ run.dir }}/test.yml
30
+ init:
31
+ commit-sha: ${{ init.commit-sha }}
32
+ ruby-version: ${{ parallel.ruby-version }}
33
+ minitest-version: "~> 6.0"
34
+
35
+ - key: tests-minitest-floor
36
+ parallel:
37
+ matrix:
38
+ ruby-version: ["2.7.8", "3.0.7", "3.1.7", "3.2.9", "3.3.10", "3.4.9"]
39
+ call: ${{ run.dir }}/test.yml
40
+ init:
41
+ commit-sha: ${{ init.commit-sha }}
42
+ ruby-version: ${{ parallel.ruby-version }}
43
+ minitest-version: "= 5.16.0"
data/.rwx/test.yml CHANGED
@@ -1,24 +1,25 @@
1
1
  base:
2
- image: ubuntu:24.04
3
- config: rwx/base 1.0.3
2
+ image: ruby:${{ init.ruby-version }}
3
+ config: none
4
4
 
5
5
  tasks:
6
6
  - key: code
7
- call: git/clone 2.0.7
8
- with:
9
- repository: https://github.com/selectiveci/selective-ruby-minitest.git
10
- ref: ${{ init.commit-sha }}
11
- github-token: ${{ github.token }}
12
-
13
- - key: ruby
14
- call: ruby/install 1.2.27
15
- with:
16
- ruby-version: ${{ init.ruby-version }}
7
+ run: |
8
+ git init -q .
9
+ git fetch -q --depth 1 https://github.com/selectiveci/selective-ruby-minitest.git ${{ init.commit-sha }}
10
+ git checkout -q FETCH_HEAD
17
11
 
18
12
  - key: bundle-install
19
- use: [code, ruby]
20
- run: bundle install
13
+ use: code
14
+ run: |
15
+ ruby -v
16
+ bundle install
17
+ grep "^ minitest " Gemfile.lock
18
+ env:
19
+ MINITEST_VERSION: ${{ init.minitest-version }}
21
20
 
22
21
  - key: rspec
23
22
  use: bundle-install
24
23
  run: bundle exec rspec
24
+ env:
25
+ MINITEST_VERSION: ${{ init.minitest-version }}
@@ -10,7 +10,9 @@ module Selective
10
10
 
11
11
  # This is the first half of Minitest.run
12
12
  def selective_prerun(args = [])
13
- load_plugins unless args.delete("--no-plugins") || ENV["MT_NO_PLUGINS"]
13
+ if ::Minitest::VERSION.to_i < 6
14
+ load_plugins unless args.delete("--no-plugins") || ENV["MT_NO_PLUGINS"]
15
+ end
14
16
 
15
17
  options = process_args args
16
18
 
@@ -34,14 +36,14 @@ module Selective
34
36
  def selective_postrun(reporter, args = [])
35
37
  options = process_args args
36
38
 
37
- parallel_executor.shutdown
39
+ parallel_executor.shutdown if parallel_executor.respond_to?(:shutdown)
38
40
 
39
41
  # might have been removed/replaced during init_plugins:
40
42
  summary = reporter.reporters.grep(::Minitest::SummaryReporter).first
41
43
 
42
44
  reporter.report
43
45
 
44
- return empty_run! options if summary && summary.count == 0
46
+ return empty_run! options if summary && summary.count == 0 && respond_to?(:empty_run!)
45
47
  reporter.passed?
46
48
  end
47
49
  end
@@ -44,7 +44,7 @@ module Selective
44
44
  klass, method_name = get_test_from_map(test_id)
45
45
  discard_previous_results(klass, method_name)
46
46
  real_time = time do
47
- with_test_map(test_id) { klass.run_one_method(klass, method_name, reporter) }
47
+ with_test_map(test_id) { run_test(klass, method_name) }
48
48
  end
49
49
  foo = format_test_case(test_id, klass, method_name, real_time)
50
50
  test_case_callback.call(foo)
@@ -55,10 +55,7 @@ module Selective
55
55
  test = test_map[test_case_id]
56
56
  return unless test
57
57
 
58
- result = summary_reporter.results.detect do |r|
59
- r.source_location.first.gsub(root_path, "") == test[:file_path] &&
60
- r.name == test[:method_name]
61
- end
58
+ result = summary_reporter.results.detect { |r| same_test?(r, test[:klass], test[:method_name]) }
62
59
 
63
60
  return unless result
64
61
 
@@ -95,6 +92,14 @@ module Selective
95
92
 
96
93
  private
97
94
 
95
+ def run_test(klass, method_name)
96
+ if klass.respond_to?(:run_one_method)
97
+ klass.run_one_method(klass, method_name, reporter)
98
+ else
99
+ klass.run(klass, method_name, reporter)
100
+ end
101
+ end
102
+
98
103
  def time(&block)
99
104
  Benchmark.measure(&block).real
100
105
  end
@@ -3,7 +3,7 @@
3
3
  module Selective
4
4
  module Ruby
5
5
  module Minitest
6
- VERSION = "0.1.4"
6
+ VERSION = "0.1.5"
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: selective-ruby-minitest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benjamin Wood
8
8
  - Nate Vick
9
- autorequire:
10
9
  bindir: exe
11
10
  cert_chain: []
12
- date: 2026-09-29 00:00:00.000000000 Z
11
+ date: 1980-01-02 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: zeitwerk
@@ -67,6 +66,26 @@ dependencies:
67
66
  - - ">="
68
67
  - !ruby/object:Gem::Version
69
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: minitest
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '5.16'
76
+ - - "<"
77
+ - !ruby/object:Gem::Version
78
+ version: '7'
79
+ type: :runtime
80
+ prerelease: false
81
+ version_requirements: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ version: '5.16'
86
+ - - "<"
87
+ - !ruby/object:Gem::Version
88
+ version: '7'
70
89
  description: Selective is an intelligent test runner for your current CI provider.
71
90
  Get real-time test results, intelligent ordering based on code changes, shorter
72
91
  run times, automatic flake detection, the ability to re-enqueue failed tests, and
@@ -87,7 +106,6 @@ files:
87
106
  - lib/selective/ruby/minitest/monkeypatches.rb
88
107
  - lib/selective/ruby/minitest/runner_wrapper.rb
89
108
  - lib/selective/ruby/minitest/version.rb
90
- - selective-ruby-minitest.gemspec
91
109
  homepage: https://www.selective.ci
92
110
  licenses:
93
111
  - MIT
@@ -95,7 +113,6 @@ metadata:
95
113
  homepage_uri: https://www.selective.ci
96
114
  source_code_uri: http://github.com/selectiveci/selective-ruby-minitest
97
115
  changelog_uri: https://github.com/selectiveci/selective-ruby-minitest/blob/main/CHANGELOG.md
98
- post_install_message:
99
116
  rdoc_options: []
100
117
  require_paths:
101
118
  - lib
@@ -103,15 +120,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
103
120
  requirements:
104
121
  - - ">="
105
122
  - !ruby/object:Gem::Version
106
- version: 2.6.0
123
+ version: 2.7.0
107
124
  required_rubygems_version: !ruby/object:Gem::Requirement
108
125
  requirements:
109
126
  - - ">="
110
127
  - !ruby/object:Gem::Version
111
128
  version: '0'
112
129
  requirements: []
113
- rubygems_version: 3.5.22
114
- signing_key:
130
+ rubygems_version: 4.0.20
115
131
  specification_version: 4
116
132
  summary: Selective Ruby Minitest Client
117
133
  test_files: []
@@ -1,46 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative "lib/selective/ruby/minitest/version"
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = "selective-ruby-minitest"
7
- spec.version = Selective::Ruby::Minitest::VERSION
8
- spec.authors = ["Benjamin Wood", "Nate Vick"]
9
- spec.email = ["ben@hint.io", "nate@hint.io"]
10
- spec.license = "MIT"
11
-
12
- spec.summary = "Selective Ruby Minitest Client"
13
- spec.description = "Selective is an intelligent test runner for your current CI provider. Get real-time test results, intelligent ordering based on code changes, shorter run times, automatic flake detection, the ability to re-enqueue failed tests, and more."
14
- spec.homepage = "https://www.selective.ci"
15
- spec.required_ruby_version = ">= 2.6.0"
16
-
17
- spec.metadata["homepage_uri"] = spec.homepage
18
- spec.metadata["source_code_uri"] = "http://github.com/selectiveci/selective-ruby-minitest"
19
- spec.metadata["changelog_uri"] = "https://github.com/selectiveci/selective-ruby-minitest/blob/main/CHANGELOG.md"
20
-
21
- # Specify which files should be added to the gem when it is released.
22
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
23
- spec.files = Dir.chdir(__dir__) do
24
- `git ls-files -z`.split("\x0").reject do |f|
25
- (File.expand_path(f) == __FILE__) || f.start_with?(*%w[bin/ test/ spec/ features/ log/ gemfiles/ .git .circleci appveyor .ruby-version .standard.yml README.md CHANGELOG.md CODE_OF_CONDUCT.md Gemfile Appraisals])
26
- end
27
- end
28
-
29
- spec.bindir = "exe"
30
- spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
31
- spec.require_paths = ["lib"]
32
-
33
- # Uncomment to register a new dependency of your gem
34
- spec.add_dependency("zeitwerk", "~> 2.6.12")
35
- spec.add_dependency("selective-ruby-core", ">= 0.2.5")
36
-
37
- # benchmark was removed from Ruby's default gems in 4.0.
38
- spec.add_dependency("benchmark")
39
-
40
- # TODO: Do we really need rake? Most apps will have it, but we
41
- # can probably avoid it.
42
- spec.add_dependency("rake")
43
-
44
- # For more information and examples about making a new gem, check out our
45
- # guide at: https://bundler.io/guides/creating_gem.html
46
- end