systemu 2.6.4 → 2.6.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/BSDL +23 -0
- data/LICENSE +56 -2
- data/Rakefile +3 -3
- data/lib/systemu.rb +16 -10
- data/systemu.gemspec +4 -3
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NzFlYWQ2YWI2ZjNiYzkwYTQwZTlmNTZkMjQxMDA3ZTY1ZmRkNTIwOQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MzE4ZWRmODQ3Zjk0NDQ4ZDE2YTdhNmI5OWVmZmI3NDE1ZTkxOGYxMg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZDhmN2E4NjcyNTAxMzQzMDFiZmFkODkwMmQzMzVmYTI5ZGI4Mzg3ZDhjYzNl
|
10
|
+
Y2YzMDA0MTJkNzNkMjU1YjM5MDc5MzI5NTc5NzhlMmU1ZWRiNDU2NzhiZWNh
|
11
|
+
M2U0OTQ5NWEyN2ExZTA2ZmMxZTUxMTA5ZjRmYWJjOTVkOGYxMTg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NjUyYTRkOGRlNWJmNmEzODUyNGE3YWNkNWYzZGViMjA4ZTcyODJlOGFhNDA4
|
14
|
+
ZDNiMDc0ZTc2ZmE1NjMwMzk1YWI4NTgxNmIwYmQ3MGQ2ZTI0YmZlMTgzMjM5
|
15
|
+
NDI5NTc4NWY3ODNmNzc4MjkzMmY3Njg4YjYxMjRmYjg5NDVmYzE=
|
data/BSDL
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
Copyright (c) 2010, Ara T. Howard
|
2
|
+
All rights reserved.
|
3
|
+
|
4
|
+
Redistribution and use in source and binary forms, with or without
|
5
|
+
modification, are permitted provided that the following conditions are met:
|
6
|
+
|
7
|
+
* Redistributions of source code must retain the above copyright notice, this
|
8
|
+
list of conditions and the following disclaimer.
|
9
|
+
|
10
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
11
|
+
this list of conditions and the following disclaimer in the documentation
|
12
|
+
and/or other materials provided with the distribution.
|
13
|
+
|
14
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
15
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
16
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
17
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
18
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
19
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
20
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
21
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
22
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
23
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
data/LICENSE
CHANGED
@@ -1,3 +1,57 @@
|
|
1
|
-
|
1
|
+
systemu is copyrighted free software by Ara T. Howard <ara.t.howard@gmail.com>.
|
2
|
+
You can redistribute it and/or modify it under either the terms of the
|
3
|
+
2-clause BSDL (see the file BSDL), or the conditions below:
|
4
|
+
|
5
|
+
1. You may make and give away verbatim copies of the source form of the
|
6
|
+
software without restriction, provided that you duplicate all of the
|
7
|
+
original copyright notices and associated disclaimers.
|
8
|
+
|
9
|
+
2. You may modify your copy of the software in any way, provided that
|
10
|
+
you do at least ONE of the following:
|
11
|
+
|
12
|
+
a) place your modifications in the Public Domain or otherwise
|
13
|
+
make them Freely Available, such as by posting said
|
14
|
+
modifications to Usenet or an equivalent medium, or by allowing
|
15
|
+
the author to include your modifications in the software.
|
16
|
+
|
17
|
+
b) use the modified software only within your corporation or
|
18
|
+
organization.
|
19
|
+
|
20
|
+
c) give non-standard binaries non-standard names, with
|
21
|
+
instructions on where to get the original software distribution.
|
22
|
+
|
23
|
+
d) make other distribution arrangements with the author.
|
24
|
+
|
25
|
+
3. You may distribute the software in object code or binary form,
|
26
|
+
provided that you do at least ONE of the following:
|
27
|
+
|
28
|
+
a) distribute the binaries and library files of the software,
|
29
|
+
together with instructions (in the manual page or equivalent)
|
30
|
+
on where to get the original distribution.
|
31
|
+
|
32
|
+
b) accompany the distribution with the machine-readable source of
|
33
|
+
the software.
|
34
|
+
|
35
|
+
c) give non-standard binaries non-standard names, with
|
36
|
+
instructions on where to get the original software distribution.
|
37
|
+
|
38
|
+
d) make other distribution arrangements with the author.
|
39
|
+
|
40
|
+
4. You may modify and include the part of the software into any other
|
41
|
+
software (possibly commercial). But some files in the distribution
|
42
|
+
are not written by the author, so that they are not under these terms.
|
43
|
+
|
44
|
+
For the list of those files and their copying conditions, see the
|
45
|
+
file LEGAL.
|
46
|
+
|
47
|
+
5. The scripts and library files supplied as input to or produced as
|
48
|
+
output from the software do not automatically fall under the
|
49
|
+
copyright of the software, but belong to whomever generated them,
|
50
|
+
and may be sold commercially, and may be aggregated with this
|
51
|
+
software.
|
52
|
+
|
53
|
+
6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
|
54
|
+
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
55
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
56
|
+
PURPOSE.
|
2
57
|
|
3
|
-
http://www.ruby-lang.org/en/LICENSE.txt
|
data/Rakefile
CHANGED
@@ -4,7 +4,7 @@ This.email = "ara.t.howard@gmail.com"
|
|
4
4
|
This.homepage = "https://github.com/ahoward/#{ This.lib }"
|
5
5
|
|
6
6
|
task :license do
|
7
|
-
open('LICENSE', 'w'){|fd| fd.puts "
|
7
|
+
open('LICENSE', 'w'){|fd| fd.puts "Ruby"}
|
8
8
|
end
|
9
9
|
|
10
10
|
task :default do
|
@@ -93,7 +93,7 @@ task :gemspec do
|
|
93
93
|
test_files = "test/#{ lib }.rb" if File.file?("test/#{ lib }.rb")
|
94
94
|
summary = object.respond_to?(:summary) ? object.summary : "summary: #{ lib } kicks the ass"
|
95
95
|
description = object.respond_to?(:description) ? object.description : "description: #{ lib } kicks the ass"
|
96
|
-
license = object.respond_to?(:license) ? object.license : "
|
96
|
+
license = object.respond_to?(:license) ? object.license : "Ruby"
|
97
97
|
|
98
98
|
if This.extensions.nil?
|
99
99
|
This.extensions = []
|
@@ -297,7 +297,7 @@ BEGIN {
|
|
297
297
|
|
298
298
|
# discover full path to this ruby executable
|
299
299
|
#
|
300
|
-
c =
|
300
|
+
c = RbConfig::CONFIG
|
301
301
|
bindir = c["bindir"] || c['BINDIR']
|
302
302
|
ruby_install_name = c['ruby_install_name'] || c['RUBY_INSTALL_NAME'] || 'ruby'
|
303
303
|
ruby_ext = c['EXEEXT'] || ''
|
data/lib/systemu.rb
CHANGED
@@ -14,7 +14,7 @@ class SystemUniversal
|
|
14
14
|
#
|
15
15
|
# constants
|
16
16
|
#
|
17
|
-
SystemUniversal::VERSION = '2.6.
|
17
|
+
SystemUniversal::VERSION = '2.6.5' unless SystemUniversal.send(:const_defined?, :VERSION)
|
18
18
|
def SystemUniversal.version() SystemUniversal::VERSION end
|
19
19
|
def version() SystemUniversal::VERSION end
|
20
20
|
def SystemUniversal.description
|
@@ -28,17 +28,22 @@ class SystemUniversal
|
|
28
28
|
@ppid = Process.ppid
|
29
29
|
@pid = Process.pid
|
30
30
|
@turd = ENV['SYSTEMU_TURD']
|
31
|
+
@ruby = nil
|
31
32
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
system('%s -e 42' %
|
33
|
+
def self.ruby
|
34
|
+
return @ruby if @ruby
|
35
|
+
|
36
|
+
c = begin; ::RbConfig::CONFIG; rescue NameError; ::Config::CONFIG; end
|
37
|
+
ruby = File.join(c['bindir'], c['ruby_install_name']) << c['EXEEXT']
|
38
|
+
@ruby = if system('%s -e 42' % ruby)
|
39
|
+
ruby
|
40
|
+
else
|
41
|
+
system('%s -e 42' % 'ruby') ? 'ruby' : warn('no ruby in PATH/CONFIG')
|
42
|
+
end
|
38
43
|
end
|
39
44
|
|
40
45
|
class << SystemUniversal
|
41
|
-
%w( host ppid pid
|
46
|
+
%w( host ppid pid turd ).each{|a| attr_accessor a}
|
42
47
|
|
43
48
|
def quote(*words)
|
44
49
|
words.map{|word| word.inspect}.join(' ')
|
@@ -179,7 +184,7 @@ class SystemUniversal
|
|
179
184
|
|
180
185
|
PIPE = STDOUT.dup
|
181
186
|
begin
|
182
|
-
config = Marshal.load(IO.read('#{ config }'))
|
187
|
+
config = Marshal.load(IO.read('#{ config }',:mode=>"rb"))
|
183
188
|
|
184
189
|
argv = config['argv']
|
185
190
|
env = config['env']
|
@@ -286,10 +291,11 @@ if defined? JRUBY_VERSION
|
|
286
291
|
StreamReader.new(stream)
|
287
292
|
end
|
288
293
|
|
289
|
-
exit_code = process.wait_for
|
290
294
|
field = process.get_class.get_declared_field("pid")
|
291
295
|
field.set_accessible(true)
|
292
296
|
pid = field.get(process)
|
297
|
+
thread = new_thread pid, @block if @block
|
298
|
+
exit_code = process.wait_for
|
293
299
|
[
|
294
300
|
RubyProcess::RubyStatus.new_process_status(JRuby.runtime, exit_code, pid),
|
295
301
|
stdout.join,
|
data/systemu.gemspec
CHANGED
@@ -3,14 +3,15 @@
|
|
3
3
|
|
4
4
|
Gem::Specification::new do |spec|
|
5
5
|
spec.name = "systemu"
|
6
|
-
spec.version = "2.6.
|
6
|
+
spec.version = "2.6.5"
|
7
7
|
spec.platform = Gem::Platform::RUBY
|
8
8
|
spec.summary = "systemu"
|
9
9
|
spec.description = "universal capture of stdout and stderr and handling of child process pid for windows, *nix, etc."
|
10
|
-
spec.license = "
|
10
|
+
spec.license = "Ruby"
|
11
11
|
|
12
12
|
spec.files =
|
13
|
-
["
|
13
|
+
["BSDL",
|
14
|
+
"LICENSE",
|
14
15
|
"README",
|
15
16
|
"README.erb",
|
16
17
|
"Rakefile",
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: systemu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ara T. Howard
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: universal capture of stdout and stderr and handling of child process
|
14
14
|
pid for windows, *nix, etc.
|
@@ -17,6 +17,7 @@ executables: []
|
|
17
17
|
extensions: []
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
|
+
- BSDL
|
20
21
|
- LICENSE
|
21
22
|
- README
|
22
23
|
- README.erb
|
@@ -33,7 +34,7 @@ files:
|
|
33
34
|
- test/testing.rb
|
34
35
|
homepage: https://github.com/ahoward/systemu
|
35
36
|
licenses:
|
36
|
-
-
|
37
|
+
- Ruby
|
37
38
|
metadata: {}
|
38
39
|
post_install_message:
|
39
40
|
rdoc_options: []
|