childprocess 0.8.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +5 -5
  2. data/.document +6 -6
  3. data/.gitignore +28 -28
  4. data/.rspec +1 -1
  5. data/.travis.yml +42 -36
  6. data/CHANGELOG.md +67 -44
  7. data/Gemfile +18 -15
  8. data/LICENSE +20 -20
  9. data/README.md +216 -192
  10. data/Rakefile +61 -61
  11. data/appveyor.yml +42 -43
  12. data/childprocess.gemspec +32 -30
  13. data/ext/mkrf_conf.rb +24 -0
  14. data/lib/childprocess/abstract_io.rb +36 -36
  15. data/lib/childprocess/abstract_process.rb +192 -192
  16. data/lib/childprocess/errors.rb +37 -26
  17. data/lib/childprocess/jruby/io.rb +16 -16
  18. data/lib/childprocess/jruby/process.rb +184 -159
  19. data/lib/childprocess/jruby/pump.rb +53 -53
  20. data/lib/childprocess/jruby.rb +56 -56
  21. data/lib/childprocess/tools/generator.rb +145 -145
  22. data/lib/childprocess/unix/fork_exec_process.rb +78 -70
  23. data/lib/childprocess/unix/io.rb +21 -21
  24. data/lib/childprocess/unix/lib.rb +186 -186
  25. data/lib/childprocess/unix/platform/i386-linux.rb +12 -12
  26. data/lib/childprocess/unix/platform/i386-solaris.rb +11 -11
  27. data/lib/childprocess/unix/platform/x86_64-linux.rb +12 -12
  28. data/lib/childprocess/unix/platform/x86_64-macosx.rb +11 -11
  29. data/lib/childprocess/unix/posix_spawn_process.rb +134 -134
  30. data/lib/childprocess/unix/process.rb +90 -89
  31. data/lib/childprocess/unix.rb +9 -9
  32. data/lib/childprocess/version.rb +3 -3
  33. data/lib/childprocess/windows/handle.rb +91 -91
  34. data/lib/childprocess/windows/io.rb +25 -25
  35. data/lib/childprocess/windows/lib.rb +416 -416
  36. data/lib/childprocess/windows/process.rb +130 -130
  37. data/lib/childprocess/windows/process_builder.rb +178 -175
  38. data/lib/childprocess/windows/structs.rb +148 -148
  39. data/lib/childprocess/windows.rb +33 -33
  40. data/lib/childprocess.rb +210 -205
  41. data/spec/abstract_io_spec.rb +12 -12
  42. data/spec/childprocess_spec.rb +447 -391
  43. data/spec/get_env.ps1 +13 -0
  44. data/spec/io_spec.rb +228 -228
  45. data/spec/jruby_spec.rb +24 -24
  46. data/spec/pid_behavior.rb +12 -12
  47. data/spec/platform_detection_spec.rb +86 -86
  48. data/spec/spec_helper.rb +270 -261
  49. data/spec/unix_spec.rb +57 -57
  50. data/spec/windows_spec.rb +23 -23
  51. metadata +18 -33
data/spec/windows_spec.rb CHANGED
@@ -1,23 +1,23 @@
1
- require File.expand_path('../spec_helper', __FILE__)
2
- require "pid_behavior"
3
-
4
- if ChildProcess.windows?
5
- describe ChildProcess::Windows::Process do
6
- it_behaves_like "a platform that provides the child's pid"
7
- end
8
-
9
- describe ChildProcess::Windows::IO do
10
- let(:io) { ChildProcess::Windows::IO.new }
11
-
12
- it "raises an ArgumentError if given IO does not respond to :fileno" do
13
- expect { io.stdout = nil }.to raise_error(ArgumentError, /must have :fileno or :to_io/)
14
- end
15
-
16
- it "raises an ArgumentError if the #to_io does not return an IO " do
17
- fake_io = Object.new
18
- def fake_io.to_io() StringIO.new end
19
-
20
- expect { io.stdout = fake_io }.to raise_error(ArgumentError, /must have :fileno or :to_io/)
21
- end
22
- end
23
- end
1
+ require File.expand_path('../spec_helper', __FILE__)
2
+ require "pid_behavior"
3
+
4
+ if ChildProcess.windows?
5
+ describe ChildProcess::Windows::Process do
6
+ it_behaves_like "a platform that provides the child's pid"
7
+ end
8
+
9
+ describe ChildProcess::Windows::IO do
10
+ let(:io) { ChildProcess::Windows::IO.new }
11
+
12
+ it "raises an ArgumentError if given IO does not respond to :fileno" do
13
+ expect { io.stdout = nil }.to raise_error(ArgumentError, /must have :fileno or :to_io/)
14
+ end
15
+
16
+ it "raises an ArgumentError if the #to_io does not return an IO " do
17
+ fake_io = Object.new
18
+ def fake_io.to_io() StringIO.new end
19
+
20
+ expect { io.stdout = fake_io }.to raise_error(ArgumentError, /must have :fileno or :to_io/)
21
+ end
22
+ end
23
+ end
metadata CHANGED
@@ -1,36 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: childprocess
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jari Bakken
8
8
  - Eric Kessler
9
+ - Shane da Silva
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2017-09-24 00:00:00.000000000 Z
13
+ date: 2019-07-11 00:00:00.000000000 Z
13
14
  dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: ffi
16
- requirement: !ruby/object:Gem::Requirement
17
- requirements:
18
- - - "~>"
19
- - !ruby/object:Gem::Version
20
- version: '1.0'
21
- - - ">="
22
- - !ruby/object:Gem::Version
23
- version: 1.0.11
24
- type: :runtime
25
- prerelease: false
26
- version_requirements: !ruby/object:Gem::Requirement
27
- requirements:
28
- - - "~>"
29
- - !ruby/object:Gem::Version
30
- version: '1.0'
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: 1.0.11
34
15
  - !ruby/object:Gem::Dependency
35
16
  name: rspec
36
17
  requirement: !ruby/object:Gem::Requirement
@@ -60,39 +41,41 @@ dependencies:
60
41
  - !ruby/object:Gem::Version
61
42
  version: '0.0'
62
43
  - !ruby/object:Gem::Dependency
63
- name: rake
44
+ name: coveralls
64
45
  requirement: !ruby/object:Gem::Requirement
65
46
  requirements:
66
47
  - - "<"
67
48
  - !ruby/object:Gem::Version
68
- version: '12.0'
49
+ version: '1.0'
69
50
  type: :development
70
51
  prerelease: false
71
52
  version_requirements: !ruby/object:Gem::Requirement
72
53
  requirements:
73
54
  - - "<"
74
55
  - !ruby/object:Gem::Version
75
- version: '12.0'
56
+ version: '1.0'
76
57
  - !ruby/object:Gem::Dependency
77
- name: coveralls
58
+ name: rake
78
59
  requirement: !ruby/object:Gem::Requirement
79
60
  requirements:
80
61
  - - "<"
81
62
  - !ruby/object:Gem::Version
82
- version: '1.0'
83
- type: :development
63
+ version: '13.0'
64
+ type: :runtime
84
65
  prerelease: false
85
66
  version_requirements: !ruby/object:Gem::Requirement
86
67
  requirements:
87
68
  - - "<"
88
69
  - !ruby/object:Gem::Version
89
- version: '1.0'
70
+ version: '13.0'
90
71
  description: This gem aims at being a simple and reliable solution for controlling
91
72
  external programs running in the background on any Ruby / OS combination.
92
73
  email:
93
74
  - morrow748@gmail.com
75
+ - shane@dasilva.io
94
76
  executables: []
95
- extensions: []
77
+ extensions:
78
+ - ext/mkrf_conf.rb
96
79
  extra_rdoc_files: []
97
80
  files:
98
81
  - ".document"
@@ -106,6 +89,7 @@ files:
106
89
  - Rakefile
107
90
  - appveyor.yml
108
91
  - childprocess.gemspec
92
+ - ext/mkrf_conf.rb
109
93
  - lib/childprocess.rb
110
94
  - lib/childprocess/abstract_io.rb
111
95
  - lib/childprocess/abstract_process.rb
@@ -135,6 +119,7 @@ files:
135
119
  - lib/childprocess/windows/structs.rb
136
120
  - spec/abstract_io_spec.rb
137
121
  - spec/childprocess_spec.rb
122
+ - spec/get_env.ps1
138
123
  - spec/io_spec.rb
139
124
  - spec/jruby_spec.rb
140
125
  - spec/pid_behavior.rb
@@ -154,15 +139,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
154
139
  requirements:
155
140
  - - ">="
156
141
  - !ruby/object:Gem::Version
157
- version: '0'
142
+ version: 2.3.0
158
143
  required_rubygems_version: !ruby/object:Gem::Requirement
159
144
  requirements:
160
145
  - - ">="
161
146
  - !ruby/object:Gem::Version
162
147
  version: '0'
163
148
  requirements: []
164
- rubyforge_project: childprocess
165
- rubygems_version: 2.5.2
149
+ rubygems_version: 3.0.3
166
150
  signing_key:
167
151
  specification_version: 4
168
152
  summary: A simple and reliable solution for controlling external programs running
@@ -170,6 +154,7 @@ summary: A simple and reliable solution for controlling external programs runnin
170
154
  test_files:
171
155
  - spec/abstract_io_spec.rb
172
156
  - spec/childprocess_spec.rb
157
+ - spec/get_env.ps1
173
158
  - spec/io_spec.rb
174
159
  - spec/jruby_spec.rb
175
160
  - spec/pid_behavior.rb