polyrun 2.2.1 → 2.2.2

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: cf97ce76499f3784cf3a11d8e1ebf640631dc8247785ff74a518b70fb3218459
4
- data.tar.gz: c4cc16110c1eb5696b1fab2fa771780a4102856909b8ecb620f2f2da3540b758
3
+ metadata.gz: a2d28bc9ddd04cf7beebdf3dc7588b61c32c5a17b9c2c97dc25a0135f84c0bef
4
+ data.tar.gz: 36dbe2a44021aeb42ef235fbddc994cfe823bac129bfe284f8945d60408f06fa
5
5
  SHA512:
6
- metadata.gz: 4d24dd153dcb88eb2e1bd7092fd47d72268ca6848061af4b64616fc6ea1307594086cfaa84e6ea06908a82b037b6404684315e66ed3cd7e923fbbaa50409e2f0
7
- data.tar.gz: 9569227c3d67cc36eb4e79df95b36c9357aed6c79e853a428546d2c270ccd6accd900a6a8869b250cab3c2bbcf91021d29a4d9a9d5b53292355a6981229e4b64
6
+ metadata.gz: 701f77a58aad54da7963043a54065cf5a11b4905fbfe6fdb20a25345fa0bc7f5b9fe62730e3828cce94b3203986b99d2f724848bfca56c67815d538723bf0602
7
+ data.tar.gz: 6591a3dae32970c56b8f329cb7caec8a36b53d25d20ad882dadf8a8d059dad4bcacd97015d8f5cfb822ed7cf0c7b49c03662ede103f3530e4f80f07a7a1f6213
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 2.2.2 (2026-07-25)
4
+
5
+ - BREAKING: Require Ruby 3.4 or newer
6
+ - Fix `Process.spawn` for string worker commands so the command is one argv element instead of character-splatted
7
+ - Drain remaining worker pipe output when the forwarder hits `IOError` or `Errno::EPIPE`
8
+
3
9
  ## 2.2.1 (2026-07-13)
4
10
 
5
11
  - Fix per-example timeout leaving ActiveRecord connection pools in a bad state after `Timeout` interrupts database I/O; disconnect all pools on timeout (adapter-agnostic).
data/CONTRIBUTING.md CHANGED
@@ -47,7 +47,6 @@ bundle exec rake bench_performance
47
47
  Run the suite under alternate Ruby constraints (see `Appraisals` and `gemfiles/`):
48
48
 
49
49
  ```bash
50
- bundle exec appraisal ruby32 rspec
51
50
  bundle exec appraisal ruby34 rspec
52
51
  bundle exec appraisal ruby40 rspec
53
52
  ```
data/README.md CHANGED
@@ -197,6 +197,19 @@ See [`examples/README.md`](examples/README.md) for Rails apps (Capybara, Playwri
197
197
 
198
198
  You can replace SimpleCov and simplecov plugins, parallel_tests, and rspec_junit_formatter with Polyrun for those roles. Use `merge-timing`, `report-timing`, and `Data::FactoryCounts` (optionally with `Data::FactoryInstrumentation`) for slow-file and factory metrics. YAML fixture batches and bulk inserts can use `Data::Fixtures` and `ParallelProvisioning` for shard-aware seeding; wire your own `truncate` and `load_seed` in hooks.
199
199
 
200
+ ## Links
201
+
202
+ - [GitHub](https://github.com/amkisko/polyrun.rb)
203
+ - [GitLab](https://gitlab.com/amkisko/polyrun.rb)
204
+ - [RubyGems](https://rubygems.org/gems/polyrun)
205
+ - [Versions Atom](https://rubygems.org/gems/polyrun/versions.atom) (feed id `10936755433440`)
206
+ - [libraries.io](https://libraries.io/rubygems/polyrun)
207
+ - [Deps.dev](https://deps.dev/rubygems/polyrun)
208
+ - [SonarCloud](https://sonarcloud.io/project/overview?id=amkisko_polyrun.rb)
209
+ - [Snyk](https://snyk.io/test/github/amkisko/polyrun.rb)
210
+ - [Codecov](https://app.codecov.io/github/amkisko/polyrun.rb)
211
+ - [OpenSSF Scorecard](https://scorecard.dev/viewer/?uri=github.com/amkisko/polyrun.rb)
212
+
200
213
  ## License
201
214
 
202
215
  Released under the [MIT License](LICENSE). Copyright (c) 2026 Andrei Makarov.
@@ -1,3 +1,3 @@
1
1
  module Polyrun
2
- VERSION = "2.2.1"
2
+ VERSION = "2.2.2"
3
3
  end
@@ -66,7 +66,8 @@ module Polyrun
66
66
  err: err_write
67
67
  )
68
68
  else
69
- Process.spawn(child_env, *cmd, *paths, out: out_write, err: err_write)
69
+ # Array(cmd) so a String command is one argv element (not character-splatted).
70
+ Process.spawn(child_env, *Array(cmd), *Array(paths), out: out_write, err: err_write)
70
71
  end
71
72
 
72
73
  out_write.close
@@ -137,7 +138,7 @@ module Polyrun
137
138
  forwarder.consume(stream, io.readpartial(4096))
138
139
  end
139
140
  rescue IOError, Errno::EPIPE
140
- # worker closed the pipe
141
+ drain_remaining_output(io, forwarder, stream)
141
142
  ensure
142
143
  io.close unless io.closed?
143
144
  end
@@ -145,6 +146,16 @@ module Polyrun
145
146
  end
146
147
  private_class_method :forwarder_thread
147
148
 
149
+ # EOFError subclasses IOError; keep drain rescues separate so a closed pipe
150
+ # during the final read does not escape the forwarder thread.
151
+ def drain_remaining_output(io, forwarder, stream)
152
+ remaining = io.read
153
+ forwarder.consume(stream, remaining) if remaining && !remaining.empty?
154
+ rescue IOError, Errno::EPIPE
155
+ nil
156
+ end
157
+ private_class_method :drain_remaining_output
158
+
148
159
  def drain_forwarders(entry)
149
160
  entry[:ios].each do |io|
150
161
  io.close unless io.closed?
data/polyrun.gemspec CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
8
8
  spec.summary = "Parallel tests, coverage (SimpleCov-compatible) formatters, fixtures/snapshots, assets & DB provisioning—zero runtime deps"
9
9
  spec.homepage = "https://github.com/amkisko/polyrun.rb"
10
10
  spec.license = "MIT"
11
- spec.required_ruby_version = ">= 3.1.0"
11
+ spec.required_ruby_version = ">= 3.4"
12
12
 
13
13
  spec.files = (
14
14
  Dir["lib/**/*", "sig/**/*.rbs", "bin/polyrun", "README.md", "CHANGELOG.md", "docs/SETUP_PROFILE.md", "LICENSE", "CONTRIBUTING.md", "CODE_OF_CONDUCT.md", "SECURITY.md", "polyrun.gemspec"] +
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polyrun
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrei Makarov
@@ -393,14 +393,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
393
393
  requirements:
394
394
  - - ">="
395
395
  - !ruby/object:Gem::Version
396
- version: 3.1.0
396
+ version: '3.4'
397
397
  required_rubygems_version: !ruby/object:Gem::Requirement
398
398
  requirements:
399
399
  - - ">="
400
400
  - !ruby/object:Gem::Version
401
401
  version: '0'
402
402
  requirements: []
403
- rubygems_version: 4.0.3
403
+ rubygems_version: 4.0.6
404
404
  specification_version: 4
405
405
  summary: Parallel tests, coverage (SimpleCov-compatible) formatters, fixtures/snapshots,
406
406
  assets & DB provisioning—zero runtime deps