subprocess 1.5.4 → 1.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +26 -1
- data/lib/subprocess.rb +6 -3
- data/lib/subprocess/version.rb +1 -1
- data/rbi/subprocess.rbi +4 -4
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca7ff75142ac9cdc919053f61071f8ff54d21193754239da85b810d0dce7886d
|
4
|
+
data.tar.gz: ae5ec4dedac5fd3042e6006ae798bf286c5705b6aca0da37c398fbd52b16d100
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0e375e45a5ed1089690a90abe9bf3fcc83754a4bd490047465ff0b83bd82966a5cb73fcd6738cb215c6351784582b90a341ba7ad7315738ef426f532215ed9b
|
7
|
+
data.tar.gz: 87b16802e5534b86c4f2d0ab7b7f5bd0cd885b9375af520341a936c017e5c23a8a33a76bcd7a50566cb9a2631e77fc8c9797779e78e03c0e75afe916d680efb1
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Subprocess
|
1
|
+
# Subprocess ![Ruby](https://github.com/stripe/subprocess/workflows/Ruby/badge.svg) [![Yard Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://rubydoc.info/github/stripe/subprocess/Subprocess)
|
2
2
|
|
3
3
|
![Jacques Cousteau Submarine](http://i.imgur.com/lmej24F.jpg)
|
4
4
|
|
@@ -65,6 +65,31 @@ differences, but if we have missed something, please file an issue.
|
|
65
65
|
[python]: http://docs.python.org/library/subprocess.html
|
66
66
|
[rubydoc]: http://rubydoc.info/github/stripe/subprocess/Subprocess
|
67
67
|
|
68
|
+
Maintenance
|
69
|
+
-----------
|
70
|
+
|
71
|
+
Steps to release a new version:
|
72
|
+
|
73
|
+
```bash
|
74
|
+
# Work directly on master
|
75
|
+
git checkout master
|
76
|
+
|
77
|
+
# -- edit version in lib/subprocess/version.rb --
|
78
|
+
|
79
|
+
# Update RBI files
|
80
|
+
bundle exec rake sord
|
81
|
+
|
82
|
+
# Subsequent commands reference the version
|
83
|
+
VERSION=1.5.5
|
84
|
+
git commit -am "Bump version to $VERSION"
|
85
|
+
git tag "v$VERSION"
|
86
|
+
git push origin master --tags
|
87
|
+
bundle exec rake publish
|
88
|
+
```
|
89
|
+
|
90
|
+
If you get errors, ask someone to add you to `bindings/rubygems-api-key` in
|
91
|
+
Vault or ask someone who already has permissions. See <http://go/password-vault>
|
92
|
+
|
68
93
|
Acknowledgements
|
69
94
|
----------------
|
70
95
|
|
data/lib/subprocess.rb
CHANGED
@@ -221,8 +221,8 @@ module Subprocess
|
|
221
221
|
# @return [Integer] The process ID of the spawned process.
|
222
222
|
attr_reader :pid
|
223
223
|
|
224
|
-
# @return [::Process::Status] The exit status code of the process.
|
225
|
-
# set after the process has exited.
|
224
|
+
# @return [::Process::Status, nil] The exit status code of the process.
|
225
|
+
# Only set after the process has exited.
|
226
226
|
attr_reader :status
|
227
227
|
|
228
228
|
# Create a new process.
|
@@ -430,7 +430,10 @@ module Subprocess
|
|
430
430
|
|
431
431
|
stdout, stderr = "", ""
|
432
432
|
|
433
|
-
|
433
|
+
# NB: Always force encoding to binary so we handle unicode or binary input
|
434
|
+
# correctly across multiple write_nonblock calls, since we manually slice
|
435
|
+
# the input depending on how many bytes were written
|
436
|
+
input = input.dup.force_encoding('BINARY') unless input.nil?
|
434
437
|
|
435
438
|
@stdin.close if (input.nil? || input.empty?) && !@stdin.nil?
|
436
439
|
|
data/lib/subprocess/version.rb
CHANGED
data/rbi/subprocess.rbi
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
module ::Subprocess
|
12
12
|
PIPE = T.let(-1, T.untyped)
|
13
13
|
STDOUT = T.let(-2, T.untyped)
|
14
|
-
VERSION = T.let('1.5.
|
14
|
+
VERSION = T.let('1.5.5', T.untyped)
|
15
15
|
|
16
16
|
# An alias for `Process.new`. Mostly here to better emulate the Python API.
|
17
17
|
#
|
@@ -304,9 +304,9 @@ module ::Subprocess
|
|
304
304
|
sig { returns(Integer) }
|
305
305
|
attr_reader :pid
|
306
306
|
|
307
|
-
# _@return_ — The exit status code of the process.
|
308
|
-
# set after the process has exited.
|
309
|
-
sig { returns(::Process::Status) }
|
307
|
+
# _@return_ — The exit status code of the process.
|
308
|
+
# Only set after the process has exited.
|
309
|
+
sig { returns(T.nilable(::Process::Status)) }
|
310
310
|
attr_reader :status
|
311
311
|
end
|
312
312
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: subprocess
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carl Jackson
|
@@ -9,10 +9,10 @@ authors:
|
|
9
9
|
- Nelson Elhage
|
10
10
|
- Andy Brody
|
11
11
|
- Andreas Fuchs
|
12
|
-
autorequire:
|
12
|
+
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2021-
|
15
|
+
date: 2021-07-15 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: minitest
|
@@ -89,7 +89,7 @@ homepage: https://github.com/stripe/subprocess
|
|
89
89
|
licenses:
|
90
90
|
- MIT
|
91
91
|
metadata: {}
|
92
|
-
post_install_message:
|
92
|
+
post_install_message:
|
93
93
|
rdoc_options: []
|
94
94
|
require_paths:
|
95
95
|
- lib
|
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
105
105
|
version: '0'
|
106
106
|
requirements: []
|
107
107
|
rubygems_version: 3.1.2
|
108
|
-
signing_key:
|
108
|
+
signing_key:
|
109
109
|
specification_version: 4
|
110
110
|
summary: A port of Python's subprocess module to Ruby
|
111
111
|
test_files: []
|