frontkick 0.0.3 → 0.1.0

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: 2cf07ddce7bfbc98fb924b0814a05cec103d8761
4
- data.tar.gz: d9c5270fc1c3160c2d1241710c8cf07f64ccb67b
3
+ metadata.gz: 72aa979e5f8b0fcc7424d0db082038483f84dfdc
4
+ data.tar.gz: 255712e57011e231886af33fc424185380a65d2b
5
5
  SHA512:
6
- metadata.gz: d8f8934f8784a37ba720d91690dd682e35094b2ba800b6a3741974f3b07865bbd101a4b8627211ffa8dbb1b3da8d4d2eb9fcb0355acd51d33e3d20f08c4f01e7
7
- data.tar.gz: c840cd7ebbf6806245ef75a903b6c9e91dc93b82b7f96d7eeb91758be022b8ef3f77103ec50ea50a79713c1580bb93824ea07de9a02663a7ccf2b34bf808394d
6
+ metadata.gz: 0e972160b2aba8082fcd4583a36e1694959f10913f4970afe6b10b346e2201f3de6c8d8ae1b878752b22ff09122d8d6787eba8645af377be7fe13b713ecda8fa
7
+ data.tar.gz: c22c2214ab5e7f7cf427b1096d00445cea8d6e573e92aeb3317e55ad8e398926b16d01154cf1ebed2a52f5274ead6592f6e24e53e04dd075a982df0baf03fe49
data/README.md CHANGED
@@ -2,9 +2,7 @@
2
2
 
3
3
  testing ruby: 1.9.2, 1.9.3, 2.0.0;
4
4
 
5
- ## About OnePuch
6
-
7
- frontkick is a wrapper of Open3#popen3 to execute a command easily
5
+ frontkick is a wrapper of Open3#popen3 to execute a command easily.
8
6
 
9
7
  ## USAGE
10
8
 
data/frontkick.gemspec CHANGED
@@ -1,9 +1,11 @@
1
1
  #! /usr/bin/env gem build
2
2
  # encoding: utf-8
3
+ $LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
4
+ require 'frontkick/version'
3
5
 
4
6
  Gem::Specification.new do |gem|
5
7
  gem.name = 'frontkick'
6
- gem.version = File.read(File.expand_path('VERSION', File.dirname(__FILE__))).chomp
8
+ gem.version = Frontkick::VERSION
7
9
  gem.authors = ["Naotoshi Seo"]
8
10
  gem.email = ["sonots@gmail.com"]
9
11
  gem.homepage = "https://github.com/sonots/frontkick"
@@ -12,6 +12,7 @@ module Frontkick
12
12
  timeout(opts[:timeout]) do # nil is for no timeout
13
13
  duration = Benchmark.realtime do
14
14
  stdin, out, err, wait_thr = Open3.popen3(*cmd_array)
15
+ stdin.close
15
16
  pid = wait_thr.pid
16
17
  stdout = out.read
17
18
  stderr = err.read
@@ -27,10 +28,10 @@ module Frontkick
27
28
  stdout = ""
28
29
  stderr = "pid:#{pid}\tcommand:#{cmd_array.join(' ')} is timeout!"
29
30
  ensure
30
- stdin.close unless stdin.nil?
31
- out.close unless out.nil?
32
- err.close unless err.nil?
33
- wait_thr.kill unless wait_thr.stop?
31
+ stdin.close if stdin and !stdin.closed?
32
+ out.close if out and !out.closed?
33
+ err.close if err and !err.closed?
34
+ wait_thr.kill if wait_thr and !wait_thr.stop?
34
35
  end
35
36
 
36
37
  CommandResult.new(stdout, stderr, exit_code, duration)
@@ -0,0 +1,3 @@
1
+ module Frontkick
2
+ VERSION = "0.1.0"
3
+ end
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.3
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naotoshi Seo
@@ -67,11 +67,11 @@ files:
67
67
  - LICENSE
68
68
  - README.md
69
69
  - Rakefile
70
- - VERSION
71
70
  - frontkick.gemspec
72
71
  - lib/frontkick.rb
73
72
  - lib/frontkick/command.rb
74
73
  - lib/frontkick/command_result.rb
74
+ - lib/frontkick/version.rb
75
75
  - spec/spec_helper.rb
76
76
  homepage: https://github.com/sonots/frontkick
77
77
  licenses: []
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.0.3