frontkick 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/CHANGELOG.md +6 -0
- data/README.md +17 -0
- data/VERSION +1 -1
- data/lib/frontkick/command_result.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2cf07ddce7bfbc98fb924b0814a05cec103d8761
|
4
|
+
data.tar.gz: d9c5270fc1c3160c2d1241710c8cf07f64ccb67b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8f8934f8784a37ba720d91690dd682e35094b2ba800b6a3741974f3b07865bbd101a4b8627211ffa8dbb1b3da8d4d2eb9fcb0355acd51d33e3d20f08c4f01e7
|
7
|
+
data.tar.gz: c840cd7ebbf6806245ef75a903b6c9e91dc93b82b7f96d7eeb91758be022b8ef3f77103ec50ea50a79713c1580bb93824ea07de9a02663a7ccf2b34bf808394d
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -10,6 +10,23 @@ frontkick is a wrapper of Open3#popen3 to execute a command easily
|
|
10
10
|
|
11
11
|
gem install frontkick
|
12
12
|
|
13
|
+
### Basic Usage
|
14
|
+
|
15
|
+
result = Frontkick::Command.exec("echo *")
|
16
|
+
puts result.successful? #=> true if exit_code is 0
|
17
|
+
puts result.stdout #=> stdout output of the command
|
18
|
+
puts result.stderr #=> stderr output of the command
|
19
|
+
puts result.exit_code #=> exit_code of the command
|
20
|
+
puts result.duration #=> the time used to execute the command
|
21
|
+
|
22
|
+
### Escape Command
|
23
|
+
|
24
|
+
result = Frontkick::Command.exec(["echo", "*"]) #=> echo the asterisk character
|
25
|
+
|
26
|
+
### Timeout Option
|
27
|
+
|
28
|
+
Frontkick::Command.exec("sleep 2 && ls /hoge", :timeout => 1)
|
29
|
+
|
13
30
|
## Contributing
|
14
31
|
|
15
32
|
1. Fork it
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.3
|