frontkick 0.4.5 → 0.4.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +8 -1
- data/lib/frontkick/command.rb +1 -1
- data/lib/frontkick/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b112f355e7130d374cbe37602fcba01a33d63b48
|
4
|
+
data.tar.gz: 29951a2c3981fcc6d5cc802894fb8247440a1a63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d73e071d663f8494d6beecd12c68bd3d7eb448fa3fff2f848a5f5ab9669dd320c1a0ac178aac26b2f4d7c7bb840342efe167260129d68ffa5d1b72e8aaa06a62
|
7
|
+
data.tar.gz: be8919c5ffd4aaea0d320ae0c749612b2b5b8477cba5684b4e485c91aca2ccd679e50c9ac69275843cdb6139764935009bc68dba8e910a731b15cd01c62a47a0
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -33,7 +33,7 @@ With frontkick, you can easily get the exit code, STDOUT, and STDERR.
|
|
33
33
|
|
34
34
|
### Dry Run Option
|
35
35
|
|
36
|
-
result = Frontkick.exec(["echo", "*"], :dry_run =>
|
36
|
+
result = Frontkick.exec(["echo", "*"], :dry_run => true)
|
37
37
|
puts result.stdout #=> echo \*
|
38
38
|
|
39
39
|
### Timeout Option
|
@@ -54,6 +54,13 @@ If you prefer to be blocked:
|
|
54
54
|
|
55
55
|
Frontkick.exec("sleep 2 && ls /hoge", :exclusive => "/tmp/frontkick.lock", :exclusive_blocking => true)
|
56
56
|
|
57
|
+
### Hint: Redirect stderr to stdout
|
58
|
+
|
59
|
+
Frontkick itself does not aid anything, but you can do as
|
60
|
+
|
61
|
+
result = Frontkick.exec(["ls /something_not_found 2>&1"])
|
62
|
+
puts result.stdout #=> ls: /something_not_found: No such file or directory
|
63
|
+
|
57
64
|
## Contributing
|
58
65
|
|
59
66
|
1. Fork it
|
data/lib/frontkick/command.rb
CHANGED
@@ -19,7 +19,7 @@ module Frontkick
|
|
19
19
|
|
20
20
|
lock_fd = file_lock(opts[:exclusive], opts[:exclusive_blocking]) if opts[:exclusive]
|
21
21
|
begin
|
22
|
-
timeout(opts[:timeout], Frontkick::TimeoutLocal) do # nil is for no timeout
|
22
|
+
::Timeout.timeout(opts[:timeout], Frontkick::TimeoutLocal) do # nil is for no timeout
|
23
23
|
duration = Benchmark.realtime do
|
24
24
|
stdin, out, err, wait_thr = Open3.popen3(*cmd_array)
|
25
25
|
out_reader = Thread.new { out.read }
|
data/lib/frontkick/version.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.4.
|
4
|
+
version: 0.4.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Naotoshi Seo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|