progress 3.0.1 → 3.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MzcwYjdhOTE5ZDQ5NWViMWM3NzY2ZmQ3YTQ5MGUzNDI2Njk3MDQ4Yw==
4
+ MTRkZThiZjMwMWU0ZmRiNGE4NDNmYTdiNWQyNjkxYmEzYjNjYjEzNA==
5
5
  data.tar.gz: !binary |-
6
- ZGMyYjk3MTg1N2VlYjBiNWY1NTJlMjdlNmMzNzI1NWY0NmE3ZThjNQ==
7
- !binary "U0hBNTEy":
6
+ ODhlNTFhZTNmMTdlNzI1MTUwN2YzZTU2ODk5OWI2YTAzZmZhYzAyZQ==
7
+ SHA512:
8
8
  metadata.gz: !binary |-
9
- NDQyNzI2YmVlZWQ1YmU2OGIyMGY5M2I3ODFhZTBiYzU4YTZhNjdlM2FmOGI5
10
- MzdjM2E3NDcxZThhMzE2MDEwNTIzOGI5NmM5YzU3YzdiM2UxMGZiMzJhZThi
11
- MzZmZDVkYWQ2ZmFiZDZlNTNmNmUxNGRmNzJhZGNiZDkzNTZlZTU=
9
+ NTNjMGYwYTYwODAxNWZkODE4MWY3ZmExZTNjNWRkMWEyZTFhMDZkMmJmNTUy
10
+ M2EwMjRmYmVlNDQwMTliMmEzNTdjMGE0ZGVlMmE5Mjk5YjQ1MWEwZGUwZGVm
11
+ YTg3OTFiZDBlMjFmMjY3ODFmMjYwNzk0YzZkZjc5YzMzOWI2NTY=
12
12
  data.tar.gz: !binary |-
13
- N2VkZThiYjYxMzhhOGM4ZjkzZDllNzBkYzU4Y2Q5ZDVmN2MyNmY2ZmY1YzQ4
14
- NWExNzdiOWUxMWEyMjdiODBlMWIwNTJkYjEyZmM5MGMxZDFiZjdiODEwYzIx
15
- OTdjNjU0ZTFhODMxYzAwNjQzMjcyNjM4ZmM5NjMxOTMyNjM3OGM=
13
+ NmI1NTEwOTNjNmFkMDc0OTYwNWE4MzI0ZTFiNzNmODQyM2FlYzEzMjE1YmY5
14
+ NDljZDNjOWM5ZWFjZmViZGI0ODMwYmRiZGM0ZDNjNDcyNWMzZDgzNDk4OGQ2
15
+ ZGQzODI3ZDVjYmJiZjZhZTZhN2Q0MWE3YTJlMzJmYWNlM2RmOTg=
@@ -1,20 +1,18 @@
1
1
  class Progress
2
2
  class Beeper
3
- class Restart < RuntimeError; end
4
-
5
3
  def initialize(time, &block)
6
4
  @thread = Thread.new do
7
- begin
5
+ loop do
6
+ @skip = false
8
7
  sleep time
9
- block.call
10
- rescue Restart
8
+ block.call unless @skip
11
9
  end
12
- redo
13
10
  end
14
11
  end
15
12
 
16
13
  def restart
17
- @thread.raise Restart
14
+ @skip = true
15
+ @thread.run
18
16
  end
19
17
 
20
18
  def stop
data/progress.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'progress'
5
- s.version = '3.0.1'
5
+ s.version = '3.0.2'
6
6
  s.summary = %q{Show progress of long running tasks}
7
7
  s.homepage = "http://github.com/toy/#{s.name}"
8
8
  s.authors = ['Ivan Kuchin']
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: progress
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Kuchin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-18 00:00:00.000000000 Z
11
+ date: 2014-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -64,7 +64,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
64
64
  version: '0'
65
65
  requirements: []
66
66
  rubyforge_project: progress
67
- rubygems_version: 2.0.3
67
+ rubygems_version: 2.4.5
68
68
  signing_key:
69
69
  specification_version: 4
70
70
  summary: Show progress of long running tasks