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 +4 -4
- data/README.md +1 -3
- data/frontkick.gemspec +3 -1
- data/lib/frontkick/command.rb +5 -4
- data/lib/frontkick/version.rb +3 -0
- metadata +2 -2
- data/VERSION +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72aa979e5f8b0fcc7424d0db082038483f84dfdc
|
4
|
+
data.tar.gz: 255712e57011e231886af33fc424185380a65d2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e972160b2aba8082fcd4583a36e1694959f10913f4970afe6b10b346e2201f3de6c8d8ae1b878752b22ff09122d8d6787eba8645af377be7fe13b713ecda8fa
|
7
|
+
data.tar.gz: c22c2214ab5e7f7cf427b1096d00445cea8d6e573e92aeb3317e55ad8e398926b16d01154cf1ebed2a52f5274ead6592f6e24e53e04dd075a982df0baf03fe49
|
data/README.md
CHANGED
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 =
|
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"
|
data/lib/frontkick/command.rb
CHANGED
@@ -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
|
31
|
-
out.close
|
32
|
-
err.close
|
33
|
-
wait_thr.kill
|
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)
|
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
|
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
|