selective-ruby-core 0.3.1-arm64-darwin → 0.3.2-arm64-darwin
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 +4 -4
- data/lib/selective/ruby/core/controller.rb +32 -1
- data/lib/selective/ruby/core/version.rb +1 -1
- data/selective-ruby-core.gemspec +1 -1
- metadata +10 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 98c7b0ecd1f938b62c5c83ed9cff0c3cc5b199029dba5cb5dd045783cba9b9a8
|
|
4
|
+
data.tar.gz: cc1e6cb4a1871231ba349abc3c51effe288632bef05e0f31915f0a6792244180
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ab414625fec5abd7e4398dc7b3c40babdfc2fad4b878c9a9290925049e63b39da725e64d363599b518d098341e59b63b94c12c1e56d6b1aec8c584caccf926c8
|
|
7
|
+
data.tar.gz: d662c2731d999918d0d6351bcd778642874e93e9f552ed719e670fbd856d765f1e4004be517f59e0248dcb8a177d55be74875f0d10e5cc77136c528fb4e2868f
|
|
@@ -149,7 +149,38 @@ module Selective
|
|
|
149
149
|
end
|
|
150
150
|
|
|
151
151
|
def write(data)
|
|
152
|
-
pipe.write JSON.dump(data)
|
|
152
|
+
pipe.write JSON.dump(sanitize_payload(data))
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# JSON.dump raises Encoding::UndefinedConversionError on bytes that are
|
|
156
|
+
# not valid UTF-8. That exception unwinds out of the test_case_result
|
|
157
|
+
# callback, through run_main_loop, and terminates the whole runner —
|
|
158
|
+
# every result for the run is lost, not just the offending one.
|
|
159
|
+
#
|
|
160
|
+
# Any test that asserts on binary data can produce this: a fixture read
|
|
161
|
+
# with File.binread, a protocol frame, a truncated multibyte sequence.
|
|
162
|
+
# Scrub on the way out so a hostile payload costs at most the fidelity
|
|
163
|
+
# of one failure message.
|
|
164
|
+
#
|
|
165
|
+
# NUL is stripped for a different reason: it survives JSON encoding but
|
|
166
|
+
# Postgres refuses it in a jsonb value (22P05), so it would fail on the
|
|
167
|
+
# server instead.
|
|
168
|
+
def sanitize_payload(value)
|
|
169
|
+
case value
|
|
170
|
+
when String then sanitize_payload_string(value)
|
|
171
|
+
when Array then value.map { |v| sanitize_payload(v) }
|
|
172
|
+
when Hash then value.to_h { |k, v| [sanitize_payload(k), sanitize_payload(v)] }
|
|
173
|
+
else value
|
|
174
|
+
end
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
def sanitize_payload_string(string)
|
|
178
|
+
result = string
|
|
179
|
+
result = result.dup.force_encoding(Encoding::UTF_8) unless result.encoding == Encoding::UTF_8
|
|
180
|
+
result = result.scrub("�") unless result.valid_encoding?
|
|
181
|
+
# Block form: a string replacement would treat backslashes as escapes.
|
|
182
|
+
result = result.gsub("\u0000") { "\\u0000" } if result.include?("\u0000")
|
|
183
|
+
result
|
|
153
184
|
end
|
|
154
185
|
|
|
155
186
|
def generate_runner_id
|
data/selective-ruby-core.gemspec
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: selective-ruby-core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.2
|
|
5
5
|
platform: arm64-darwin
|
|
6
6
|
authors:
|
|
7
7
|
- Benjamin Wood
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: exe
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2026-11-
|
|
12
|
+
date: 2026-11-18 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: logger
|
|
@@ -29,16 +29,22 @@ dependencies:
|
|
|
29
29
|
name: zeitwerk
|
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
|
31
31
|
requirements:
|
|
32
|
-
- - "
|
|
32
|
+
- - ">="
|
|
33
33
|
- !ruby/object:Gem::Version
|
|
34
34
|
version: 2.6.12
|
|
35
|
+
- - "<"
|
|
36
|
+
- !ruby/object:Gem::Version
|
|
37
|
+
version: '3'
|
|
35
38
|
type: :runtime
|
|
36
39
|
prerelease: false
|
|
37
40
|
version_requirements: !ruby/object:Gem::Requirement
|
|
38
41
|
requirements:
|
|
39
|
-
- - "
|
|
42
|
+
- - ">="
|
|
40
43
|
- !ruby/object:Gem::Version
|
|
41
44
|
version: 2.6.12
|
|
45
|
+
- - "<"
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '3'
|
|
42
48
|
description: Selective is an intelligent test runner for your current CI provider.
|
|
43
49
|
Get real-time test results, intelligent ordering based on code changes, shorter
|
|
44
50
|
run times, automatic flake detection, the ability to re-enqueue failed tests, and
|