process_executer 4.0.1 → 4.0.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 +4 -4
- data/.release-please-manifest.json +1 -1
- data/CHANGELOG.md +11 -0
- data/README.md +23 -7
- data/lib/process_executer/version.rb +1 -1
- data/process_spawn_test/.rspec +3 -0
- data/process_spawn_test/README.md +36 -0
- data/process_spawn_test/spec/spec_helper.rb +15 -0
- data/process_spawn_test/spec/test_spec.rb +21 -0
- metadata +7 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a033cd4abe84b2a664cb59bd5a3110302a478d871e096ecde3031fc76278f324
|
|
4
|
+
data.tar.gz: 5de784c728d11852efac17fb035e15e9e3c2f35ff36e402f260cf011a3ce55b8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0c5b2ae5438c7c263b1105b8e6a5d4ecf18b0836a5cc1a376b610fae3adbee123f851b8357b5113ff1bb35af5048af08f9a2d0b1ac50bc89a7234b2480727c9e
|
|
7
|
+
data.tar.gz: d29494c96b22e31e994a880d7a3c514c7e13d08d695e41794ed2609f76048dc2e4c8a995d48eb5babe8f5da27a9649dce5198baf09c35828a40547bba149c382
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,17 @@ All notable changes to the process_executer gem will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [4.0.2](https://github.com/main-branch/process_executer/compare/v4.0.1...v4.0.2) (2026-01-03)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Other Changes
|
|
12
|
+
|
|
13
|
+
* Bump actions/checkout@v5 and actions/setup-java@v5 ([07c6488](https://github.com/main-branch/process_executer/commit/07c6488b21305cbffb059c181e7720868781ddd4))
|
|
14
|
+
* Fix process spawn workflow link ([316fdeb](https://github.com/main-branch/process_executer/commit/316fdebce530b2be5ceb5046e21ee848af52381a))
|
|
15
|
+
* Run process-spawn specs under bash on Windows ([320ceb0](https://github.com/main-branch/process_executer/commit/320ceb0395c85bb40b1706efb0c6e71f50a20d06))
|
|
16
|
+
* Run process-spawn tests from subdirectory ([ef8b968](https://github.com/main-branch/process_executer/commit/ef8b968b0cc8ff6b8d1ea051ff5836fcaf65ff7e))
|
|
17
|
+
* Update Ruby version support policy ([0df371d](https://github.com/main-branch/process_executer/commit/0df371d004da62ed3bcb6685aba53d62d7061d02))
|
|
18
|
+
|
|
8
19
|
## [4.0.1](https://github.com/main-branch/process_executer/compare/v4.0.0...v4.0.1) (2025-12-29)
|
|
9
20
|
|
|
10
21
|
|
data/README.md
CHANGED
|
@@ -20,15 +20,8 @@ RubyGems.org. Go to the [process_executer page in
|
|
|
20
20
|
RubyGems.org](https://rubygems.org/gems/process_executer), select your version, and
|
|
21
21
|
then click the "Documentation" link.
|
|
22
22
|
|
|
23
|
-
## Requirements
|
|
24
|
-
|
|
25
|
-
- Ruby 3.1.0 or later
|
|
26
|
-
- Compatible with MRI 3.1+, TruffleRuby 24+, and JRuby 9.4+
|
|
27
|
-
- Works on Mac, Linux, and Windows platforms
|
|
28
|
-
|
|
29
23
|
## Table of contents
|
|
30
24
|
|
|
31
|
-
- [Requirements](#requirements)
|
|
32
25
|
- [Table of contents](#table-of-contents)
|
|
33
26
|
- [Usage](#usage)
|
|
34
27
|
- [Key methods](#key-methods)
|
|
@@ -36,6 +29,7 @@ then click the "Documentation" link.
|
|
|
36
29
|
- [Encoding](#encoding)
|
|
37
30
|
- [Encoding summary](#encoding-summary)
|
|
38
31
|
- [Encoding details](#encoding-details)
|
|
32
|
+
- [Ruby version support policy](#ruby-version-support-policy)
|
|
39
33
|
- [Breaking Changes](#breaking-changes)
|
|
40
34
|
- [2.x](#2x)
|
|
41
35
|
- [`ProcessExecuter.spawn`](#processexecuterspawn)
|
|
@@ -199,6 +193,28 @@ These encoding options ONLY affect the internally captured stdout and stderr for
|
|
|
199
193
|
will result in BINARY encoded strings and you will need to handle setting the right
|
|
200
194
|
encoding or transcoding after collecting the output.
|
|
201
195
|
|
|
196
|
+
## Ruby version support policy
|
|
197
|
+
|
|
198
|
+
This gem will be expected to function correctly on:
|
|
199
|
+
|
|
200
|
+
- All [non-EOL versions](https://www.ruby-lang.org/en/downloads/branches/) of the MRI
|
|
201
|
+
Ruby on Mac, Linux, and Windows
|
|
202
|
+
- The latest version of JRuby 9.4+ on Linux
|
|
203
|
+
- The latest version of TruffleRuby 24+ on Linux
|
|
204
|
+
|
|
205
|
+
It is this project's intent to support the latest version of JRuby on Windows once
|
|
206
|
+
Process.wait2 and Process.wait work correctly on this platform.
|
|
207
|
+
|
|
208
|
+
Currently, JRuby on Windows does not capture and report the subprocess status via $?
|
|
209
|
+
(or $CHILD_STATUS), Process.wait, or Process.wait2. These values always return `nil`
|
|
210
|
+
for the status, preventing this gem from properly detecting command failures and
|
|
211
|
+
timeouts.
|
|
212
|
+
|
|
213
|
+
This repository includes a separate test suite in the `process_spawn_test/` directory
|
|
214
|
+
that specifically validates JRuby's subprocess behavior. The [Process Spawn Test
|
|
215
|
+
workflow](https://github.com/main-branch/process_executer/actions/workflows/process-spawn-test.yml)
|
|
216
|
+
can be run manually to verify the status of this issue.
|
|
217
|
+
|
|
202
218
|
## Breaking Changes
|
|
203
219
|
|
|
204
220
|
### 2.x
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Process Spawn Test
|
|
2
|
+
|
|
3
|
+
These tests verify that `Process.spawn`, `Process.wait`, and `Process.wait2` work
|
|
4
|
+
correctly across different Ruby implementations and operating systems.
|
|
5
|
+
|
|
6
|
+
This test suite is particularly important for verifying JRuby behavior on Windows,
|
|
7
|
+
where historically there have been issues with subprocess status reporting.
|
|
8
|
+
|
|
9
|
+
## Tests
|
|
10
|
+
|
|
11
|
+
The test suite includes:
|
|
12
|
+
|
|
13
|
+
* Test that `Process#wait` sets the global `$CHILD_STATUS` variable
|
|
14
|
+
* Test that `Process#wait2` returns a non-nil status
|
|
15
|
+
|
|
16
|
+
## Running the Tests
|
|
17
|
+
|
|
18
|
+
There is no Gemfile in `process_spawn_test/`, so bundler walks up to the repo root and uses the main project's Gemfile. From the repository root:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
cd process_spawn_test && bundle exec rspec
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Alternatively, you can stay at the root and run:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
bundle exec rspec process_spawn_test/spec/test_spec.rb
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## GitHub Actions Workflow
|
|
31
|
+
|
|
32
|
+
The workflow file `.github/workflows/process-spawn-test.yml` can be manually triggered to run these tests on:
|
|
33
|
+
- MRI Ruby and JRuby
|
|
34
|
+
- Ubuntu (Linux) and Windows
|
|
35
|
+
|
|
36
|
+
To run the workflow, go to the Actions tab in GitHub and select "Process.spawn Test" from the workflow list.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'rspec'
|
|
4
|
+
|
|
5
|
+
RSpec.configure do |config|
|
|
6
|
+
# Enable flags like --only-failures and --next-failure
|
|
7
|
+
config.example_status_persistence_file_path = '.rspec_status'
|
|
8
|
+
|
|
9
|
+
# Disable RSpec exposing methods globally on `Module` and `main`
|
|
10
|
+
config.disable_monkey_patching!
|
|
11
|
+
|
|
12
|
+
config.expect_with :rspec do |c|
|
|
13
|
+
c.syntax = :expect
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'English'
|
|
4
|
+
|
|
5
|
+
RSpec.describe 'Process#wait' do
|
|
6
|
+
it 'sets the global $CHILD_STATUS variable' do
|
|
7
|
+
pid = Process.spawn('ruby', '-e', 'exit 0')
|
|
8
|
+
Process.wait(pid)
|
|
9
|
+
expect($CHILD_STATUS).not_to be_nil
|
|
10
|
+
expect($CHILD_STATUS.pid).to eq(pid)
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
RSpec.describe 'Process#wait2' do
|
|
15
|
+
it 'returns a non-nil status' do
|
|
16
|
+
pid = Process.spawn('ruby', '-e', 'exit 0')
|
|
17
|
+
_pid, status = Process.wait2(pid)
|
|
18
|
+
expect(status).not_to be_nil
|
|
19
|
+
expect(status.pid).to eq(pid)
|
|
20
|
+
end
|
|
21
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: process_executer
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.0.
|
|
4
|
+
version: 4.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Couball
|
|
@@ -281,6 +281,10 @@ files:
|
|
|
281
281
|
- lib/process_executer/version.rb
|
|
282
282
|
- package.json
|
|
283
283
|
- process_executer.gemspec
|
|
284
|
+
- process_spawn_test/.rspec
|
|
285
|
+
- process_spawn_test/README.md
|
|
286
|
+
- process_spawn_test/spec/spec_helper.rb
|
|
287
|
+
- process_spawn_test/spec/test_spec.rb
|
|
284
288
|
- release-please-config.json
|
|
285
289
|
homepage: https://github.com/main-branch/process_executer
|
|
286
290
|
licenses:
|
|
@@ -289,8 +293,8 @@ metadata:
|
|
|
289
293
|
allowed_push_host: https://rubygems.org
|
|
290
294
|
homepage_uri: https://github.com/main-branch/process_executer
|
|
291
295
|
source_code_uri: https://github.com/main-branch/process_executer
|
|
292
|
-
documentation_uri: https://rubydoc.info/gems/process_executer/4.0.
|
|
293
|
-
changelog_uri: https://rubydoc.info/gems/process_executer/4.0.
|
|
296
|
+
documentation_uri: https://rubydoc.info/gems/process_executer/4.0.2
|
|
297
|
+
changelog_uri: https://rubydoc.info/gems/process_executer/4.0.2/file/CHANGELOG.md
|
|
294
298
|
rubygems_mfa_required: 'true'
|
|
295
299
|
rdoc_options: []
|
|
296
300
|
require_paths:
|