Exit_0 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Exit_0.gemspec +1 -1
- data/README.md +2 -2
- data/lib/Exit_0.rb +14 -12
- data/lib/Exit_0/version.rb +1 -3
- metadata +2 -2
data/Exit_0.gemspec
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
1
|
Exit\_0
|
3
2
|
=========
|
4
3
|
|
@@ -10,7 +9,8 @@ Don't like Exit\_0? Try:
|
|
10
9
|
* [posix-spawn](https://github.com/rtomayko/posix-spawn).
|
11
10
|
That is the easiest way to handle child processes
|
12
11
|
(aka shelling out).
|
13
|
-
* [
|
12
|
+
* [open4](https://github.com/ahoward/open4)
|
13
|
+
* [POpen4](https://github.com/shairontoledo/popen4)
|
14
14
|
* [Here are other alternatives](http://stackoverflow.com/questions/6338908/ruby-difference-between-exec-system-and-x-or-backticks).
|
15
15
|
|
16
16
|
Windows
|
data/lib/Exit_0.rb
CHANGED
@@ -2,18 +2,6 @@ require 'Exit_0/version'
|
|
2
2
|
require 'Split_Lines'
|
3
3
|
require 'posix/spawn'
|
4
4
|
|
5
|
-
module Kernel
|
6
|
-
|
7
|
-
private
|
8
|
-
|
9
|
-
def exit_0 cmd
|
10
|
-
new = Split_Lines(cmd).join(' && ')
|
11
|
-
o = `#{new} 2>&1`.strip
|
12
|
-
raise Exit_0::Non_0, "#{$?.exitstatus} => #{o}" unless $?.exitstatus == 0
|
13
|
-
o
|
14
|
-
end
|
15
|
-
|
16
|
-
end # === Kernel
|
17
5
|
|
18
6
|
def Exit_0 *cmd, &blok
|
19
7
|
|
@@ -100,4 +88,18 @@ class Exit_0
|
|
100
88
|
include Base
|
101
89
|
end # === Child
|
102
90
|
|
91
|
+
module Top_Methods
|
92
|
+
|
93
|
+
def exit_0 cmd
|
94
|
+
new = Split_Lines(cmd).join(' && ')
|
95
|
+
o = `#{new} 2>&1`.strip
|
96
|
+
raise Exit_0::Non_0, "#{$?.exitstatus} => #{o}" unless $?.exitstatus == 0
|
97
|
+
o
|
98
|
+
end
|
99
|
+
|
100
|
+
end # === module Base
|
101
|
+
|
103
102
|
end # === class Exit_0
|
103
|
+
|
104
|
+
|
105
|
+
include Exit_0::Top_Methods
|
data/lib/Exit_0/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: Exit_0
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-05-
|
12
|
+
date: 2012-05-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bacon
|