membase-dump 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/bin/tap_dump CHANGED
@@ -1,3 +1,18 @@
1
1
  #! /usr/bin/env ruby
2
2
 
3
- system "/usr/bin/env python #{File.dirname(__FILE__)}/../lib/tap_dump.py #{ARGV.first}"
3
+ require 'timeout'
4
+
5
+ def system_with_timeout (timeout, command)
6
+ pipe = IO.popen(command)
7
+ Timeout::timeout timeout do
8
+ while line = pipe.gets
9
+ puts line
10
+ end
11
+ end
12
+ true
13
+ rescue Timeout::Error
14
+ Process.kill("TERM", pipe.pid)
15
+ false
16
+ end
17
+
18
+ system_with_timeout 3000, "/usr/bin/env python #{File.dirname(__FILE__)}/../lib/tap_dump.py #{ARGV.first}"
@@ -1,5 +1,5 @@
1
1
  module Membase
2
2
  module Dump
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: membase-dump
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jean-Louis Giordano
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-12-01 00:00:00 +01:00
18
+ date: 2011-12-05 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency