selective-ruby-core 0.3.1-arm64-darwin → 0.3.3-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/bin/transport +0 -0
- data/lib/selective/ruby/core/controller.rb +32 -1
- data/lib/selective/ruby/core/version.rb +1 -1
- metadata +11 -9
- data/selective-ruby-core.gemspec +0 -53
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2c102e6cd6f6882ada1e9f9b1f4cc66284118ce507d85e005aeca4b3144d2107
|
|
4
|
+
data.tar.gz: 8789170ca559514a970211c06dbd1145b7feaaf5a9a8377519926732b15fec1e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 77180edafcb14ce1ad3a1c0ceb9d93b694004daa0ee1a29422905688302b658bcd6537170dd1ef15124b56f5f61b5865d985085ab269058674f2dfb5932f2598
|
|
7
|
+
data.tar.gz: '099c1dca32d332c8d440ca2ad82d3cd84b4226776e2542a2a433489ea3a685d9b350b221bbb9a92d3d5d61db73c99ba37992defe026571549cc0e6e4872b5288'
|
data/lib/bin/transport
CHANGED
|
Binary file
|
|
@@ -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
|
metadata
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
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.3
|
|
5
5
|
platform: arm64-darwin
|
|
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: logger
|
|
@@ -29,16 +28,22 @@ dependencies:
|
|
|
29
28
|
name: zeitwerk
|
|
30
29
|
requirement: !ruby/object:Gem::Requirement
|
|
31
30
|
requirements:
|
|
32
|
-
- - "
|
|
31
|
+
- - ">="
|
|
33
32
|
- !ruby/object:Gem::Version
|
|
34
33
|
version: 2.6.12
|
|
34
|
+
- - "<"
|
|
35
|
+
- !ruby/object:Gem::Version
|
|
36
|
+
version: '3'
|
|
35
37
|
type: :runtime
|
|
36
38
|
prerelease: false
|
|
37
39
|
version_requirements: !ruby/object:Gem::Requirement
|
|
38
40
|
requirements:
|
|
39
|
-
- - "
|
|
41
|
+
- - ">="
|
|
40
42
|
- !ruby/object:Gem::Version
|
|
41
43
|
version: 2.6.12
|
|
44
|
+
- - "<"
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: '3'
|
|
42
47
|
description: Selective is an intelligent test runner for your current CI provider.
|
|
43
48
|
Get real-time test results, intelligent ordering based on code changes, shorter
|
|
44
49
|
run times, automatic flake detection, the ability to re-enqueue failed tests, and
|
|
@@ -71,7 +76,6 @@ files:
|
|
|
71
76
|
- lib/selective/ruby/core/test_map/tree.rb
|
|
72
77
|
- lib/selective/ruby/core/test_map/uploader.rb
|
|
73
78
|
- lib/selective/ruby/core/version.rb
|
|
74
|
-
- selective-ruby-core.gemspec
|
|
75
79
|
homepage: https://www.selective.ci
|
|
76
80
|
licenses:
|
|
77
81
|
- MIT
|
|
@@ -79,7 +83,6 @@ metadata:
|
|
|
79
83
|
homepage_uri: https://www.selective.ci
|
|
80
84
|
source_code_uri: http://github.com/selectiveci/selective-ruby-core
|
|
81
85
|
changelog_uri: https://github.com/selectiveci/selective-ruby-core/blob/main/CHANGELOG.md
|
|
82
|
-
post_install_message:
|
|
83
86
|
rdoc_options: []
|
|
84
87
|
require_paths:
|
|
85
88
|
- lib
|
|
@@ -94,8 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
94
97
|
- !ruby/object:Gem::Version
|
|
95
98
|
version: '0'
|
|
96
99
|
requirements: []
|
|
97
|
-
rubygems_version:
|
|
98
|
-
signing_key:
|
|
100
|
+
rubygems_version: 4.0.20
|
|
99
101
|
specification_version: 4
|
|
100
102
|
summary: Selective Ruby Client Core
|
|
101
103
|
test_files: []
|
data/selective-ruby-core.gemspec
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require_relative "lib/selective/ruby/core/version"
|
|
4
|
-
|
|
5
|
-
Gem::Specification.new do |spec|
|
|
6
|
-
spec.name = "selective-ruby-core"
|
|
7
|
-
spec.version = Selective::Ruby::Core::VERSION
|
|
8
|
-
spec.authors = ["Benjamin Wood", "Nate Vick"]
|
|
9
|
-
spec.email = ["ben@hint.io", "nate@hint.io"]
|
|
10
|
-
spec.license = "MIT"
|
|
11
|
-
|
|
12
|
-
# Currently supported release platforms are:
|
|
13
|
-
# Linux: x86_64-linux, aarch64-linux
|
|
14
|
-
# MacOS: x86_64-darwin, arm64-darwin
|
|
15
|
-
if (platform = ENV["RELEASE_PLATFORM"])
|
|
16
|
-
spec.platform = platform
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
spec.summary = "Selective Ruby Client Core"
|
|
20
|
-
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."
|
|
21
|
-
spec.homepage = "https://www.selective.ci"
|
|
22
|
-
spec.required_ruby_version = ">= 2.7.0"
|
|
23
|
-
|
|
24
|
-
spec.metadata["homepage_uri"] = spec.homepage
|
|
25
|
-
spec.metadata["source_code_uri"] = "http://github.com/selectiveci/selective-ruby-core"
|
|
26
|
-
spec.metadata["changelog_uri"] = "https://github.com/selectiveci/selective-ruby-core/blob/main/CHANGELOG.md"
|
|
27
|
-
|
|
28
|
-
# Specify which files should be added to the gem when it is released.
|
|
29
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
30
|
-
spec.files = Dir.chdir(__dir__) do
|
|
31
|
-
`git ls-files -z`.split("\x0").reject do |f|
|
|
32
|
-
(File.expand_path(f) == __FILE__) || f.start_with?(*%w[bin/ docs/ rubocop/ simplicity/ test/ spec/ features/ log/ .git .circleci appveyor .rspec .ruby-version .standard.yml .rubocop-simplicity.yml README.md CHANGELOG.md CODE_OF_CONDUCT.md AGENTS.md Gemfile])
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
# Add the transport binary
|
|
37
|
-
unless ENV["RELEASE_PLATFORM"].nil?
|
|
38
|
-
spec.files << "lib/bin/transport"
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
# The optional test map tracer. extconf.rb writes a no-op Makefile when it
|
|
42
|
-
# can't build (no compiler, unsupported Ruby), so installation never fails
|
|
43
|
-
# because of it; the runner then reports it can't record.
|
|
44
|
-
spec.extensions = ["ext/selective_tracer/extconf.rb"]
|
|
45
|
-
|
|
46
|
-
spec.bindir = "exe"
|
|
47
|
-
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
|
48
|
-
spec.require_paths = ["lib"]
|
|
49
|
-
|
|
50
|
-
# Uncomment to register a new dependency of your gem
|
|
51
|
-
spec.add_dependency("logger", "~> 1.6")
|
|
52
|
-
spec.add_dependency("zeitwerk", "~> 2.6.12")
|
|
53
|
-
end
|