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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 90e8f994ea85285a3a1f0130061293b7fc557366
4
- data.tar.gz: b9e07e7c2dcd214347e6aa1fb45b523e515e323a
3
+ metadata.gz: b112f355e7130d374cbe37602fcba01a33d63b48
4
+ data.tar.gz: 29951a2c3981fcc6d5cc802894fb8247440a1a63
5
5
  SHA512:
6
- metadata.gz: 210662fde91518f8c9a40dfbbe3516df357d8bbfcd00d16bd9e496cd68f0dca6fabe273ca68dd7914324cd3329fb482cf769a937ec3e7259a64cbc1dbf3ebac7
7
- data.tar.gz: b1f7dc35e1542f1aa350001859b42ec0920ff63c20084478ed429ea339cde1d85d6ec1caa3046b2c2e4be9b2968ed3e6b8a607b841eb6c99365217b3dd35fdf8
6
+ metadata.gz: d73e071d663f8494d6beecd12c68bd3d7eb448fa3fff2f848a5f5ab9669dd320c1a0ac178aac26b2f4d7c7bb840342efe167260129d68ffa5d1b72e8aaa06a62
7
+ data.tar.gz: be8919c5ffd4aaea0d320ae0c749612b2b5b8477cba5684b4e485c91aca2ccd679e50c9ac69275843cdb6139764935009bc68dba8e910a731b15cd01c62a47a0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 0.4.6 (2016/01/07)
2
+
3
+ Fixes:
4
+
5
+ - Object#timeout is deprecated, use Timeout.timeout instead.
6
+
1
7
  # 0.4.5 (2016/01/05)
2
8
 
3
9
  Fixes:
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 => 1)
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
@@ -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 }
@@ -1,3 +1,3 @@
1
1
  module Frontkick
2
- VERSION = "0.4.5"
2
+ VERSION = "0.4.6"
3
3
  end
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.5
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-05 00:00:00.000000000 Z
11
+ date: 2016-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake