rubysh 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rubysh/subprocess/parallel_io.rb +1 -1
- data/lib/rubysh/util.rb +13 -2
- data/lib/rubysh/version.rb +1 -1
- metadata +51 -64
data/lib/rubysh/util.rb
CHANGED
@@ -33,8 +33,19 @@ module Rubysh
|
|
33
33
|
copy.close
|
34
34
|
end
|
35
35
|
|
36
|
-
|
37
|
-
|
36
|
+
# For some reason, Ruby 1.9 doesn't seem to let you close
|
37
|
+
# stdout/sterr. So if we didn't manage to close it above, then
|
38
|
+
# just use reopen. We could get rid of the close attempt above,
|
39
|
+
# but I'd rather leave this code as close to doing the same
|
40
|
+
# thing everywhere as possible.
|
41
|
+
begin
|
42
|
+
copy = io_without_autoclose(fildes2)
|
43
|
+
rescue Errno::EBADF
|
44
|
+
res = original.fcntl(Fcntl::F_DUPFD, fildes2)
|
45
|
+
Rubysh.assert(res == fildes2, "Tried to open #{fildes2} but ended up with #{res} instead", true)
|
46
|
+
else
|
47
|
+
copy.reopen(original)
|
48
|
+
end
|
38
49
|
end
|
39
50
|
|
40
51
|
def self.set_cloexec(file, enable=true)
|
data/lib/rubysh/version.rb
CHANGED
metadata
CHANGED
@@ -1,62 +1,55 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubysh
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 2
|
10
|
-
version: 0.0.2
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Greg Brockman
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-10-17 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
21
15
|
name: minitest
|
22
|
-
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
24
17
|
none: false
|
25
|
-
requirements:
|
26
|
-
- -
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
hash: 3
|
29
|
-
segments:
|
30
|
-
- 3
|
31
|
-
- 1
|
32
|
-
- 0
|
18
|
+
requirements:
|
19
|
+
- - '='
|
20
|
+
- !ruby/object:Gem::Version
|
33
21
|
version: 3.1.0
|
34
22
|
type: :development
|
35
|
-
version_requirements: *id001
|
36
|
-
- !ruby/object:Gem::Dependency
|
37
|
-
name: mocha
|
38
23
|
prerelease: false
|
39
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
25
|
none: false
|
41
|
-
requirements:
|
42
|
-
- -
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
26
|
+
requirements:
|
27
|
+
- - '='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 3.1.0
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: mocha
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
48
38
|
type: :development
|
49
|
-
|
50
|
-
|
51
|
-
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
description: ! 'Rubysh: Ruby subprocesses made easy'
|
47
|
+
email:
|
52
48
|
- gdb@gregbrockman.com
|
53
49
|
executables: []
|
54
|
-
|
55
50
|
extensions: []
|
56
|
-
|
57
51
|
extra_rdoc_files: []
|
58
|
-
|
59
|
-
files:
|
52
|
+
files:
|
60
53
|
- .gitignore
|
61
54
|
- Gemfile
|
62
55
|
- LICENSE
|
@@ -96,40 +89,34 @@ files:
|
|
96
89
|
- test/unit/lib/rubysh/runner.rb
|
97
90
|
- test/unit/lib/rubysh/subprocess.rb
|
98
91
|
- test/unit/lib/rubysh/subprocess/parallel_io.rb
|
99
|
-
homepage:
|
92
|
+
homepage: ''
|
100
93
|
licenses: []
|
101
|
-
|
102
94
|
post_install_message:
|
103
95
|
rdoc_options: []
|
104
|
-
|
105
|
-
require_paths:
|
96
|
+
require_paths:
|
106
97
|
- lib
|
107
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
98
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
108
99
|
none: false
|
109
|
-
requirements:
|
110
|
-
- -
|
111
|
-
- !ruby/object:Gem::Version
|
112
|
-
|
113
|
-
|
114
|
-
- 0
|
115
|
-
version: "0"
|
116
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ! '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
117
105
|
none: false
|
118
|
-
requirements:
|
119
|
-
- -
|
120
|
-
- !ruby/object:Gem::Version
|
121
|
-
|
122
|
-
segments:
|
123
|
-
- 0
|
124
|
-
version: "0"
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
125
110
|
requirements: []
|
126
|
-
|
127
111
|
rubyforge_project:
|
128
112
|
rubygems_version: 1.8.24
|
129
113
|
signing_key:
|
130
114
|
specification_version: 3
|
131
|
-
summary:
|
132
|
-
|
115
|
+
summary: ! 'Rubysh makes shelling out easy with a __sh__-like syntax layer for Ruby: irb
|
116
|
+
-r rubysh >> command = Rubysh(''echo'', ''hello-from-Rubysh'') | Rubysh(''grep'',
|
117
|
+
''--color'', ''Rubysh'') >> command.run hello-from-Rubysh => Rubysh::Runner: echo
|
118
|
+
hello-from-Rubysh | grep --color Rubysh (exitstatus: 0)'
|
119
|
+
test_files:
|
133
120
|
- test/_lib.rb
|
134
121
|
- test/functional/_lib.rb
|
135
122
|
- test/functional/lib/fd-lister
|