async-process 1.3.1 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 952fa23d154d27e2243793967230bd26a76c278b400028f3e26aa88079b3752b
4
- data.tar.gz: 58d271855c877f0f8e6db743612fac87c188d1f07c3703e6a5d62c0acd46ac0e
3
+ metadata.gz: 47c00fddfaeb378fb4cbdca319bcc6233da9bbc3a186fd9a0e5209d9964986f5
4
+ data.tar.gz: 8d6410fbbc5f1d9c4479df2ebb1b5668854618d756ad3070ab00143fda0191fc
5
5
  SHA512:
6
- metadata.gz: ed1c7d43f0b63afa9fb16b624daa1c7df102a7aaaf84d9fb636e8dda26205d022c24c18597c10cdafaf4bb4492c564495a6768fe2b13d8d11b4677abce8226ab
7
- data.tar.gz: 5fc867164550a1d8b67f4bca13927cedbfa62ba404e9c2cc100883262a5f0cd4bd562e194ed0460e807cc0cab0aff5eff5ba33a31d6c1887a7e76f97e96ff56a
6
+ metadata.gz: 81807633f8f08ad1aae02043ad6a5f69c14a8ad77ac1e092f26556987e6832ec064452d442ce94675801ce1eb6852f680a0eef5cec695eb87626a074f0b028df
7
+ data.tar.gz: 9407a9964936720121607dd0c200ed840e915dd41671385e589fa3a3b227f9dd43e19da4730407bf46c7a94ad7de43fc0ab2a9bdea60cb119b9598916a29a14e
checksums.yaml.gz.sig ADDED
Binary file
@@ -1,24 +1,7 @@
1
- # Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy
4
- # of this software and associated documentation files (the "Software"), to deal
5
- # in the Software without restriction, including without limitation the rights
6
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- # copies of the Software, and to permit persons to whom the Software is
8
- # furnished to do so, subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in
11
- # all copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- # THE SOFTWARE.
1
+ # frozen_string_literal: true
20
2
 
21
- require 'async/io/generic'
3
+ # Released under the MIT License.
4
+ # Copyright, 2018-2024, by Samuel Williams.
22
5
 
23
6
  module Async
24
7
  module Process
@@ -26,7 +9,7 @@ module Async
26
9
  def initialize(*args, **options)
27
10
  # Setup a cross-thread notification pipe - nio4r can't monitor pids unfortunately:
28
11
  pipe = ::IO.pipe
29
- @input = Async::IO::Generic.new(pipe.first)
12
+ @input = pipe.first
30
13
  @output = pipe.last
31
14
 
32
15
  @exit_status = nil
@@ -1,25 +1,10 @@
1
- # Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy
4
- # of this software and associated documentation files (the "Software"), to deal
5
- # in the Software without restriction, including without limitation the rights
6
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- # copies of the Software, and to permit persons to whom the Software is
8
- # furnished to do so, subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in
11
- # all copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- # THE SOFTWARE.
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2018-2024, by Samuel Williams.
20
5
 
21
6
  module Async
22
7
  module Process
23
- VERSION = "1.3.1"
8
+ VERSION = "1.4.0"
24
9
  end
25
10
  end
data/lib/async/process.rb CHANGED
@@ -1,28 +1,13 @@
1
- # Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy
4
- # of this software and associated documentation files (the "Software"), to deal
5
- # in the Software without restriction, including without limitation the rights
6
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- # copies of the Software, and to permit persons to whom the Software is
8
- # furnished to do so, subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in
11
- # all copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- # THE SOFTWARE.
1
+ # frozen_string_literal: true
20
2
 
21
- require 'async/process/version'
22
- require 'async/process/child'
3
+ # Released under the MIT License.
4
+ # Copyright, 2018-2024, by Samuel Williams.
5
+ # Copyright, 2020, by Joe Khoobyar.
23
6
 
24
- require 'async/io'
25
- require 'kernel/sync'
7
+ require "async/process/version"
8
+ require "async/process/child"
9
+
10
+ require "kernel/sync"
26
11
 
27
12
  module Async
28
13
  module Process
@@ -31,8 +16,8 @@ module Async
31
16
  end
32
17
 
33
18
  def self.capture(*arguments, **options)
34
- input, output = Async::IO.pipe
35
- options[:out] = output.io
19
+ input, output = ::IO.pipe
20
+ options[:out] = output
36
21
 
37
22
  runner = Async do
38
23
  spawn(*arguments, **options)
data/license.md ADDED
@@ -0,0 +1,22 @@
1
+ # MIT License
2
+
3
+ Copyright, 2018-2024, by Samuel Williams.
4
+ Copyright, 2020, by Joe Khoobyar.
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
data/readme.md ADDED
@@ -0,0 +1,57 @@
1
+ # Async::Process
2
+
3
+ Implements `Process.spawn` and `Process.capture` for [async](https://github.com/socketry/async).
4
+
5
+ [![Development Status](https://github.com/socketry/async-process/workflows/Test/badge.svg)](https://github.com/socketry/async-process/actions?workflow=Test)
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ``` ruby
12
+ gem 'async-process'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install async-process
22
+
23
+ ## Usage
24
+
25
+ In any asynchronous context (e.g. a reactor), simply use the `Async::Process.spawn` rather than `Process.spawn` like so:
26
+
27
+ ``` ruby
28
+ require 'async/process'
29
+
30
+ Async::Reactor.run do
31
+ status = Async::Process.spawn("ls", "-lah")
32
+ end
33
+ ```
34
+
35
+ Internally, we use a thread, since `nio4r` doesn't support monitoring pids.
36
+
37
+ ## Contributing
38
+
39
+ We welcome contributions to this project.
40
+
41
+ 1. Fork it.
42
+ 2. Create your feature branch (`git checkout -b my-new-feature`).
43
+ 3. Commit your changes (`git commit -am 'Add some feature'`).
44
+ 4. Push to the branch (`git push origin my-new-feature`).
45
+ 5. Create new Pull Request.
46
+
47
+ ### Developer Certificate of Origin
48
+
49
+ In order to protect users of this project, we require all contributors to comply with the [Developer Certificate of Origin](https://developercertificate.org/). This ensures that all contributions are properly licensed and attributed.
50
+
51
+ ### Community Guidelines
52
+
53
+ This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers.
54
+
55
+ ## See Also
56
+
57
+ - [async-container](https://github.com/socketry/async-container) — Execute multiple isolated threads and/or processes.
data.tar.gz.sig ADDED
Binary file
metadata CHANGED
@@ -1,99 +1,59 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async-process
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
+ - Joe Khoobyar
8
9
  autorequire:
9
10
  bindir: bin
10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AGjgZowgZcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0O
29
+ BBYEFO9t7XWuFf2SKLmuijgqR4sGDlRsMC4GA1UdEQQnMCWBI3NhbXVlbC53aWxs
30
+ aWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MC4GA1UdEgQnMCWBI3NhbXVlbC53aWxs
31
+ aWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MA0GCSqGSIb3DQEBCwUAA4IBgQB5sxkE
32
+ cBsSYwK6fYpM+hA5B5yZY2+L0Z+27jF1pWGgbhPH8/FjjBLVn+VFok3CDpRqwXCl
33
+ xCO40JEkKdznNy2avOMra6PFiQyOE74kCtv7P+Fdc+FhgqI5lMon6tt9rNeXmnW/
34
+ c1NaMRdxy999hmRGzUSFjozcCwxpy/LwabxtdXwXgSay4mQ32EDjqR1TixS1+smp
35
+ 8C/NCWgpIfzpHGJsjvmH2wAfKtTTqB9CVKLCWEnCHyCaRVuKkrKjqhYCdmMBqCws
36
+ JkxfQWC+jBVeG9ZtPhQgZpfhvh+6hMhraUYRQ6XGyvBqEUe+yo6DKIT3MtGE2+CP
37
+ eX9i9ZWBydWb8/rvmwmX2kkcBbX0hZS1rcR593hGc61JR6lvkGYQ2MYskBveyaxt
38
+ Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
39
+ voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
40
+ -----END CERTIFICATE-----
41
+ date: 2024-11-08 00:00:00.000000000 Z
12
42
  dependencies:
13
43
  - !ruby/object:Gem::Dependency
14
44
  name: async
15
45
  requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: async-io
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: async-rspec
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '1.1'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
46
  requirements:
52
47
  - - "~>"
53
48
  - !ruby/object:Gem::Version
54
- version: '1.1'
55
- - !ruby/object:Gem::Dependency
56
- name: bundler
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: covered
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: rspec
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '3.0'
90
- type: :development
49
+ version: '2.0'
50
+ type: :runtime
91
51
  prerelease: false
92
52
  version_requirements: !ruby/object:Gem::Requirement
93
53
  requirements:
94
54
  - - "~>"
95
55
  - !ruby/object:Gem::Version
96
- version: '3.0'
56
+ version: '2.0'
97
57
  description:
98
58
  email:
99
59
  executables: []
@@ -103,10 +63,13 @@ files:
103
63
  - lib/async/process.rb
104
64
  - lib/async/process/child.rb
105
65
  - lib/async/process/version.rb
66
+ - license.md
67
+ - readme.md
106
68
  homepage: https://github.com/socketry/async-process
107
69
  licenses:
108
70
  - MIT
109
- metadata: {}
71
+ metadata:
72
+ source_code_uri: https://github.com/socketry/async-process.git
110
73
  post_install_message:
111
74
  rdoc_options: []
112
75
  require_paths:
@@ -115,14 +78,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
115
78
  requirements:
116
79
  - - ">="
117
80
  - !ruby/object:Gem::Version
118
- version: '0'
81
+ version: '3.1'
119
82
  required_rubygems_version: !ruby/object:Gem::Requirement
120
83
  requirements:
121
84
  - - ">="
122
85
  - !ruby/object:Gem::Version
123
86
  version: '0'
124
87
  requirements: []
125
- rubygems_version: 3.2.22
88
+ rubygems_version: 3.5.22
126
89
  signing_key:
127
90
  specification_version: 4
128
91
  summary: Asynchronous process spawning.
metadata.gz.sig ADDED
@@ -0,0 +1,2 @@
1
+ (���F��[:z冚J�)js�΂ѿ�kV�6y��V�H�)[F�0��Kz����WZ�L ���׼H��3D֪��A�̶�/&Qxr>��B��Nj*�K"���m��"I��o+]m%zp����I(��R"Y0��QYb[t1M�[�5��5p�X�+�R�=L���u�Z���FmVJ�����~��� ��ڑ܉`'DϮ��N�2�7� j�pH$��0'3H�M�Iq
2
+ �!�-�P�0�\,�3^}�F&�}���9�ܡH ����n�{1�SmNtzr�|�m�����y�7@}Ϩ���gm�SHfMN2��U����*~���1�D����4V���� 5���1�ވ]�4��̱Ar͍�� Ձ�I�w���a�f�