selective-ruby-minitest 0.1.6 → 0.1.7
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ffb2f7d4ae7038fdebd84c167f09b8a7c41b37abcfcea0915fd72ff5cbdf1782
|
|
4
|
+
data.tar.gz: 284feb906a4f7046c0d2d3bb7756d472af861de4cc14acce2dfaeb15176d999f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 405daf152aefd7931414d083e93703898bda8b015b61d89d2c8dbe32c8ceac44091c26b7abc4fcb176a0d417c87b46d1cab5c8d012149ef512f0c5465d63b175
|
|
7
|
+
data.tar.gz: b333ded36187443e201ad4fbce016d9122d0eeac20dbe2c04fcf64430dab13af02293ab832759b2ea0566171e3d348bfe27c69ea78bbbc7d90f6490ed4b6a24c
|
|
@@ -13,6 +13,7 @@ module Selective
|
|
|
13
13
|
|
|
14
14
|
FRAMEWORK = "minitest"
|
|
15
15
|
DEFAULT_TEST_DIR = "test"
|
|
16
|
+
TEST_ID = /:\h{32}\z/
|
|
16
17
|
|
|
17
18
|
def initialize(args, test_case_callback)
|
|
18
19
|
@test_case_callback = test_case_callback
|
|
@@ -26,9 +27,8 @@ module Selective
|
|
|
26
27
|
def manifest
|
|
27
28
|
raise_test_manifest_error("No test cases found") if test_ids.empty?
|
|
28
29
|
|
|
29
|
-
ids = @targeted_test_ids.any? ? @targeted_test_ids : test_ids
|
|
30
30
|
{
|
|
31
|
-
"test_cases" =>
|
|
31
|
+
"test_cases" => manifest_test_ids.map do |test_id|
|
|
32
32
|
test = test_map[test_id]
|
|
33
33
|
{
|
|
34
34
|
id: test_id,
|
|
@@ -64,7 +64,7 @@ module Selective
|
|
|
64
64
|
end
|
|
65
65
|
|
|
66
66
|
def base_test_path
|
|
67
|
-
|
|
67
|
+
normalize_path(default_test_glob).each_filename.first
|
|
68
68
|
end
|
|
69
69
|
|
|
70
70
|
def exit_status
|
|
@@ -92,6 +92,24 @@ module Selective
|
|
|
92
92
|
|
|
93
93
|
private
|
|
94
94
|
|
|
95
|
+
def manifest_test_ids
|
|
96
|
+
ids, files = targeted_test_ids.partition { |target| target.match?(TEST_ID) }
|
|
97
|
+
return test_ids if ids.empty?
|
|
98
|
+
|
|
99
|
+
raise_test_manifest_error("Pass test ids or test files, not both: #{files.join(", ")}") if files.any?
|
|
100
|
+
|
|
101
|
+
ids = ids.map do |id|
|
|
102
|
+
next id if test_map.key?(id)
|
|
103
|
+
|
|
104
|
+
path, _, digest = id.rpartition(":")
|
|
105
|
+
"#{normalize_path(path)}:#{digest}"
|
|
106
|
+
end
|
|
107
|
+
missing = ids.reject { |id| test_map.key?(id) }
|
|
108
|
+
raise_test_manifest_error("No test matches these ids: #{missing.join(", ")}") if missing.any?
|
|
109
|
+
|
|
110
|
+
ids.uniq
|
|
111
|
+
end
|
|
112
|
+
|
|
95
113
|
def run_test(klass, method_name)
|
|
96
114
|
if klass.respond_to?(:run_one_method)
|
|
97
115
|
klass.run_one_method(klass, method_name, reporter)
|
|
@@ -289,7 +307,7 @@ module Selective
|
|
|
289
307
|
end
|
|
290
308
|
|
|
291
309
|
def normalize_path(path)
|
|
292
|
-
Pathname.new(path).relative_path_from(
|
|
310
|
+
Pathname.new(File.expand_path(path)).relative_path_from(Dir.pwd)
|
|
293
311
|
end
|
|
294
312
|
|
|
295
313
|
def raise_test_manifest_error(output)
|
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
|
+
version: 0.1.7
|
|
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:
|
|
11
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
|
15
14
|
name: zeitwerk
|
|
@@ -120,7 +119,6 @@ metadata:
|
|
|
120
119
|
homepage_uri: https://www.selective.ci
|
|
121
120
|
source_code_uri: http://github.com/selectiveci/selective-ruby-minitest
|
|
122
121
|
changelog_uri: https://github.com/selectiveci/selective-ruby-minitest/blob/main/CHANGELOG.md
|
|
123
|
-
post_install_message:
|
|
124
122
|
rdoc_options: []
|
|
125
123
|
require_paths:
|
|
126
124
|
- lib
|
|
@@ -135,8 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
135
133
|
- !ruby/object:Gem::Version
|
|
136
134
|
version: '0'
|
|
137
135
|
requirements: []
|
|
138
|
-
rubygems_version:
|
|
139
|
-
signing_key:
|
|
136
|
+
rubygems_version: 4.0.20
|
|
140
137
|
specification_version: 4
|
|
141
138
|
summary: Selective Ruby Minitest Client
|
|
142
139
|
test_files: []
|