frontkick 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +8 -1
- data/lib/frontkick/command.rb +1 -1
- data/lib/frontkick/{command_result.rb → result.rb} +2 -1
- data/lib/frontkick/version.rb +1 -1
- data/lib/frontkick.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: afbcaf599563d9ebb1395512e65ce021d9f314e6
|
4
|
+
data.tar.gz: 203a79a478f3bc6acccb641160ca2ba73af1049d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a42da35a826093ba55a28d1494531f52a727b7d8f0b4af13d3faf607a7426f02c58bf8fad3e49b0305e2d5ce656b0eb08737620ce3cf33c50962f39456e4e6d
|
7
|
+
data.tar.gz: 79a39227fbf5051c94afd63cdf50c3852c1ac218b626028b34004715d6b7bf8d191355d586cfc333726402ae466f6776a3d7b0ef4da72c4b65b1aac61fcf2342
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -2,7 +2,14 @@
|
|
2
2
|
|
3
3
|
testing ruby: 1.9.2, 1.9.3, 2.0.0;
|
4
4
|
|
5
|
-
Frontkick is a gem to execute a command and obtain exit\_code, stdout, stderr simply
|
5
|
+
Frontkick is a gem to execute a command and obtain exit\_code, stdout, stderr simply.
|
6
|
+
|
7
|
+
## What is This For?
|
8
|
+
|
9
|
+
Ruby's `Kernel.#system` method does not return STDOUT and STDERR.
|
10
|
+
Ruby's back quote (``) returns STDOUT, but does not return STDERR.
|
11
|
+
|
12
|
+
With frontkick, you can easily get the exit code, STDOUT, and STDERR.
|
6
13
|
|
7
14
|
## USAGE
|
8
15
|
|
data/lib/frontkick/command.rb
CHANGED
@@ -36,7 +36,7 @@ module Frontkick
|
|
36
36
|
lock_fd.flock(File::LOCK_UN) if lock_fd
|
37
37
|
end
|
38
38
|
|
39
|
-
|
39
|
+
Result.new(:stdout => stdout, :stderr => stderr, :exit_code => exit_code, :duration => duration)
|
40
40
|
end
|
41
41
|
|
42
42
|
def self.process_wait(pid)
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Frontkick
|
2
|
-
class
|
2
|
+
class Result
|
3
3
|
attr_accessor :stdout, :stderr, :exit_code, :duration
|
4
4
|
alias :status :exit_code
|
5
5
|
alias :status= :exit_code=
|
@@ -23,4 +23,5 @@ module Frontkick
|
|
23
23
|
@exit_code == 0
|
24
24
|
end
|
25
25
|
end
|
26
|
+
CommandResult = Result # for lower version compatibility
|
26
27
|
end
|
data/lib/frontkick/version.rb
CHANGED
data/lib/frontkick.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: frontkick
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Naotoshi Seo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -70,8 +70,8 @@ files:
|
|
70
70
|
- frontkick.gemspec
|
71
71
|
- lib/frontkick.rb
|
72
72
|
- lib/frontkick/command.rb
|
73
|
-
- lib/frontkick/command_result.rb
|
74
73
|
- lib/frontkick/error.rb
|
74
|
+
- lib/frontkick/result.rb
|
75
75
|
- lib/frontkick/version.rb
|
76
76
|
- spec/spec_helper.rb
|
77
77
|
homepage: https://github.com/sonots/frontkick
|