selective-ruby-core 0.2.13-arm64-darwin → 0.2.15-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 +20 -0
- data/lib/selective/ruby/core/version.rb +1 -1
- data/selective-ruby-core.gemspec +53 -0
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ea9b6d2b61aa6592aaffd9e97c29640e16731c5a6bd3b8dac5301b0b818e7d0d
|
|
4
|
+
data.tar.gz: 86001f29a3bb1a51583fc16d69ea3dcf3414a6af177835a6e39bc8a000b36b82
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ca74d07cdfa1508bfa48610eb1a75bac07a8e268badaf44dccc78813f4ede32130847c4b70756503c9b682f23b2c0d5c2081afada57c9226ee903992fad2ae38
|
|
7
|
+
data.tar.gz: 33cace2f3b1e41cc17ceb6ed1b2699ec1fb703156985360093370b982cd47d559a3219455faa6b0fef21b27a73c717f43941300bd2cfd99cab587bd8c11f7f93
|
data/lib/bin/transport
CHANGED
|
Binary file
|
|
@@ -10,6 +10,8 @@ module Selective
|
|
|
10
10
|
@@selective_suppress_reporting = false
|
|
11
11
|
@@report_at_finish = {}
|
|
12
12
|
|
|
13
|
+
TERMINATION_REPORT_GRACE = 0.25
|
|
14
|
+
|
|
13
15
|
REQUIRED_CONFIGURATION = {
|
|
14
16
|
"host" => "SELECTIVE_HOST",
|
|
15
17
|
"api_key" => "SELECTIVE_API_KEY",
|
|
@@ -256,12 +258,30 @@ module Selective
|
|
|
256
258
|
def handle_termination_signals(pid)
|
|
257
259
|
["INT", "TERM"].each do |signal|
|
|
258
260
|
Signal.trap(signal) do
|
|
261
|
+
report_termination(signal)
|
|
259
262
|
kill_transport(signal: signal)
|
|
260
263
|
exit(runner.exit_status)
|
|
261
264
|
end
|
|
262
265
|
end
|
|
263
266
|
end
|
|
264
267
|
|
|
268
|
+
# Tells the server this runner is being stopped on purpose, so a run
|
|
269
|
+
# whose runners all leave this way is recorded as cancelled rather
|
|
270
|
+
# than as runners lost. Best effort: a server that predates the
|
|
271
|
+
# message ignores it, and a dead pipe just means it isn't sent.
|
|
272
|
+
#
|
|
273
|
+
# The transport exits the moment it reads "exit", without draining
|
|
274
|
+
# what it has queued for the socket, so give it a moment to send this
|
|
275
|
+
# first. CI cancellations allow several seconds between TERM and KILL.
|
|
276
|
+
def report_termination(signal)
|
|
277
|
+
return unless pipe
|
|
278
|
+
|
|
279
|
+
write({type: "terminating", data: {signal: signal}})
|
|
280
|
+
sleep(TERMINATION_REPORT_GRACE)
|
|
281
|
+
rescue ConnectionLostError, IOError, SystemCallError
|
|
282
|
+
# Nothing to report to.
|
|
283
|
+
end
|
|
284
|
+
|
|
265
285
|
def kill_transport(signal: "TERM")
|
|
266
286
|
begin
|
|
267
287
|
pipe.write "exit"
|
|
@@ -0,0 +1,53 @@
|
|
|
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/ test/ spec/ features/ log/ .git .circleci appveyor .rspec .ruby-version .standard.yml README.md CHANGELOG.md CODE_OF_CONDUCT.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
|
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.2.
|
|
4
|
+
version: 0.2.15
|
|
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-10-
|
|
12
|
+
date: 2026-10-23 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: logger
|
|
@@ -71,6 +71,7 @@ files:
|
|
|
71
71
|
- lib/selective/ruby/core/test_map/tree.rb
|
|
72
72
|
- lib/selective/ruby/core/test_map/uploader.rb
|
|
73
73
|
- lib/selective/ruby/core/version.rb
|
|
74
|
+
- selective-ruby-core.gemspec
|
|
74
75
|
homepage: https://www.selective.ci
|
|
75
76
|
licenses:
|
|
76
77
|
- MIT
|
|
@@ -93,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
93
94
|
- !ruby/object:Gem::Version
|
|
94
95
|
version: '0'
|
|
95
96
|
requirements: []
|
|
96
|
-
rubygems_version: 3.
|
|
97
|
+
rubygems_version: 3.5.22
|
|
97
98
|
signing_key:
|
|
98
99
|
specification_version: 4
|
|
99
100
|
summary: Selective Ruby Client Core
|