autoreporter 0.0.20181006 → 0.0.20190730

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/autoreporter.rb +6 -1
  3. metadata +3 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3fa7ba235319b1e90a154ac59570559be2ea26344561f4db2d9e4262522d41ac
4
- data.tar.gz: d2e59e3b9701f1320998275f4cd9784127fe71f639379bca8798f4d92e7b198d
3
+ metadata.gz: e8cf6e72dc26da8d8dd74347e87d2b2edf8ff287976c2b4c50cfff6c5e368426
4
+ data.tar.gz: b39de6dc7448ca857eed03fb47dd213977401df6a094b62eb679201788e5abf9
5
5
  SHA512:
6
- metadata.gz: ce59addd8a7794056090112edb8d2856ab9c41e830ed88019478626000e30e72057c05a1763c0ec4590bcf6dfd9216c089b12360f12af82161612072ec8447cb
7
- data.tar.gz: b942f21d341a02c74d2c47bcd2145dff1128d3b4f94bc2af3aec8a35c4f907a60e19d12e80b3e762733f58f24952287911d31a37a689f666a8e16b6b296014cb
6
+ metadata.gz: 91c8ecf5cd28319ae1b458082f615711130751563d8d559f272dfa1a2e402d7ea3853035c325712fcec716b540648f47ff58376daf3f85158dc1d9cd4b02cde1
7
+ data.tar.gz: b725dfb8d2e37ba6597ab88f279de3898dd870f5acb9930c0c3bfbad076a950077ed5e84377f3b7d93fb393d4b51104652997b0b5f77bdb01b497678bec422c6
data/lib/autoreporter.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require "open3"
2
2
  require "shellwords"
3
+ require "timeout"
3
4
 
4
5
  class Autoreporter
5
6
  attr_accessor :delay, :commands, :verbose
@@ -32,8 +33,12 @@ class Autoreporter
32
33
  puts *@output
33
34
  end
34
35
 
36
+ # Wait for either @delay seconds
37
+ # or for user forcing autorefresh by pressing enter
35
38
  def wait_for_condition!
36
- sleep @delay
39
+ Timeout.timeout(@delay) do
40
+ STDIN.readline
41
+ end
37
42
  end
38
43
 
39
44
  def call
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autoreporter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.20181006
4
+ version: 0.0.20190730
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomasz Wegrzanowski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-06 00:00:00.000000000 Z
11
+ date: 2019-07-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: optimist
@@ -80,8 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
80
80
  - !ruby/object:Gem::Version
81
81
  version: '0'
82
82
  requirements: []
83
- rubyforge_project:
84
- rubygems_version: 2.7.6
83
+ rubygems_version: 3.0.3
85
84
  signing_key:
86
85
  specification_version: 4
87
86
  summary: Command line report runner