subprocess 1.5.4 → 1.5.5

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: 03feecd6b5ca0a66f4c795071be9ed48d4801ac8735e69660ff7e87b05f1e47d
4
- data.tar.gz: 0dad63e1568ca3a477471b98b912ee0528963d80d1ee8646813b2efa7429d429
3
+ metadata.gz: ca7ff75142ac9cdc919053f61071f8ff54d21193754239da85b810d0dce7886d
4
+ data.tar.gz: ae5ec4dedac5fd3042e6006ae798bf286c5705b6aca0da37c398fbd52b16d100
5
5
  SHA512:
6
- metadata.gz: 0d5cc41f0a7d716cb87c6e70c25b4892905b12d2c55727e29af281bc8e66f46be68a6a76fc263ac1ed1a8fd709288b3101dcd0d2ed19aac36c94d9de133ea171
7
- data.tar.gz: 25b247b27b30ce8dc4cf98670adb415f82bc4e4ce64ba5e410307ba194efd516c13af19ded736568a2e95ab88bacda16a46b626230be45f2a948db7e7876ad7e
6
+ metadata.gz: d0e375e45a5ed1089690a90abe9bf3fcc83754a4bd490047465ff0b83bd82966a5cb73fcd6738cb215c6351784582b90a341ba7ad7315738ef426f532215ed9b
7
+ data.tar.gz: 87b16802e5534b86c4f2d0ab7b7f5bd0cd885b9375af520341a936c017e5c23a8a33a76bcd7a50566cb9a2631e77fc8c9797779e78e03c0e75afe916d680efb1
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Subprocess [![Build Status](https://travis-ci.org/stripe/subprocess.svg?branch=master)](https://travis-ci.org/stripe/subprocess) [![Yard Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://rubydoc.info/github/stripe/subprocess/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. Only
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
- input = input.dup unless input.nil?
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
 
@@ -1,3 +1,3 @@
1
1
  module Subprocess
2
- VERSION = '1.5.4'
2
+ VERSION = '1.5.5'
3
3
  end
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.4', T.untyped)
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. Only
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
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-01-13 00:00:00.000000000 Z
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: []