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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 01d81fe27d75745783f882710005259ad6c906be
4
- data.tar.gz: faf7d294bc7bda0101193a16c5cb4b4df68eb803
3
+ metadata.gz: 2cf07ddce7bfbc98fb924b0814a05cec103d8761
4
+ data.tar.gz: d9c5270fc1c3160c2d1241710c8cf07f64ccb67b
5
5
  SHA512:
6
- metadata.gz: 515e97ebefd91655e3a0290e18c673a8582bc9bf32a8cdd7d4c1fcd7fe82adab6327bc97563c13b1cd0af411c7dc004e472da8160df9e41db6731174160849c7
7
- data.tar.gz: 00251c8ad5cd01d07144bec5e7d8ed4be70c621924cee0b0ed2e9083fdfbeac2c0b3d7a957c46d3b54fdca4c7e2e58763fa02e6e0ddbda49b03a085e464f1772
6
+ metadata.gz: d8f8934f8784a37ba720d91690dd682e35094b2ba800b6a3741974f3b07865bbd101a4b8627211ffa8dbb1b3da8d4d2eb9fcb0355acd51d33e3d20f08c4f01e7
7
+ data.tar.gz: c840cd7ebbf6806245ef75a903b6c9e91dc93b82b7f96d7eeb91758be022b8ef3f77103ec50ea50a79713c1580bb93824ea07de9a02663a7ccf2b34bf808394d
data/.gitignore CHANGED
@@ -10,3 +10,4 @@ vendor
10
10
  doc/*
11
11
  tmp/*
12
12
  .yardoc
13
+ pkg
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 0.0.3 (2013/06/23)
2
+
3
+ Changes:
4
+
5
+ - attr_accessor :exit_code
6
+
1
7
  # 0.0.2 (2013/06/23)
2
8
 
3
9
  Features:
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.2
1
+ 0.0.3
@@ -1,6 +1,6 @@
1
1
  module Frontkick
2
2
  class CommandResult
3
- attr_accessor :stdout, :stderr, :duration
3
+ attr_accessor :stdout, :stderr, :exit_code, :duration
4
4
 
5
5
  def initialize(stdout, stderr, exit_code, duration)
6
6
  @stdout = stdout
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: frontkick
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naotoshi Seo