eventmachine 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +3 -0
- data/lib/em/processes.rb +1 -1
- data/lib/em/version.rb +1 -1
- data/tests/test_system.rb +14 -0
- metadata +3 -3
data/CHANGELOG.md
CHANGED
data/lib/em/processes.rb
CHANGED
@@ -114,7 +114,7 @@ module EventMachine
|
|
114
114
|
init = args.pop if args.last.is_a? Proc
|
115
115
|
|
116
116
|
# merge remaining arguments into the command
|
117
|
-
cmd = [cmd, *args]
|
117
|
+
cmd = [cmd, *args] if args.any?
|
118
118
|
|
119
119
|
EM.get_subprocess_pid(EM.popen(cmd, SystemCmd, cb) do |c|
|
120
120
|
init[c] if init
|
data/lib/em/version.rb
CHANGED
data/tests/test_system.rb
CHANGED
@@ -22,6 +22,20 @@ class TestSystem < Test::Unit::TestCase
|
|
22
22
|
assert_equal(@test_data, result)
|
23
23
|
end
|
24
24
|
|
25
|
+
def test_system_with_string
|
26
|
+
result = nil
|
27
|
+
status = nil
|
28
|
+
EM.run {
|
29
|
+
EM.system("cat '#@filename'"){|out, state|
|
30
|
+
result = out
|
31
|
+
status = state.exitstatus
|
32
|
+
EM.stop
|
33
|
+
}
|
34
|
+
}
|
35
|
+
assert_equal(0, status)
|
36
|
+
assert_equal(@test_data, result)
|
37
|
+
end
|
38
|
+
|
25
39
|
def teardown
|
26
40
|
File.unlink(@filename)
|
27
41
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eventmachine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 3
|
10
|
+
version: 1.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Francis Cianfrocca
|