polling 0.1.4 → 0.1.5

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: ad86e5d3482a48a478ee18550da47f30a6e55f92
4
- data.tar.gz: 690d6c6395be49bf1a582369fc7275fe9c08d7b9
3
+ metadata.gz: e591e6572041ad6e7f2bd8b069c8df6a2b4f658a
4
+ data.tar.gz: cb7031b6c42b26648bd96c0727ec607cbed96dd8
5
5
  SHA512:
6
- metadata.gz: b1b0984f266e31cac791e25807d629b4ab4c1e0e96076142245aef0ba4d83a3cbcb27a4738a1c9878a6fce215d2ee35082b883a44f758e62c9ccdede4bc01439
7
- data.tar.gz: bb4f40ee5d92695a408b8867f75c8b7feec3e7d02d50072b5131b7b10a69999b4d72a7d0e399e328632b9a21d5b916a8b362ca07f87fbd62e4f43497aab362bb
6
+ metadata.gz: 6df5b59fb79a707fc8a915e8cf2138e405db1bce42e23bb6328b40f1bac7543530432bbe1b5c8fed58364fc6845c3f2d98fe93938febde71311c5f3efdb48c43
7
+ data.tar.gz: 05821621d9f786994be8edb6d5f20a8f5f9e4d6c6aea26d36f93efcae0f5f4aa2083503df0dafa2abac6cdf19a6b307f77bc271f5444fada3fb373950a0a99d3
data/lib/polling.rb CHANGED
@@ -39,8 +39,6 @@ module Polling
39
39
  Sleep.exec e.stime(:debug=>@debug)
40
40
  loop { exec.call interval }
41
41
  end
42
- rescue => ex
43
- $stderr.puts ex.to_s
44
42
  end
45
43
 
46
44
  def async_run interval=@interval, debug=false
@@ -67,8 +65,6 @@ module Polling
67
65
 
68
66
  e.__send__(:start_print, 0) if @print_start_time || @debug
69
67
  loop { exec.call interval }
70
- rescue => ex
71
- $stderr.puts ex.to_s
72
68
  end
73
69
 
74
70
  private
@@ -38,17 +38,12 @@ module Polling
38
38
 
39
39
  debug debug: opts[:debug], stime: stime
40
40
  stime
41
- rescue => ex
42
- $stderr.puts ex.to_s
43
- return opts[:init_time]
44
41
  end
45
42
 
46
43
  def stime_async opts={}
47
44
  stime = opts[:interval] - (opts[:after] - opts[:before])
48
45
  debug debug: opts[:debug], stime: stime
49
46
  stime
50
- rescue => ex
51
- raise ex
52
47
  end
53
48
 
54
49
  private
data/lib/polling/sleep.rb CHANGED
@@ -2,8 +2,6 @@ module Polling
2
2
  module Sleep
3
3
  def self.exec stime
4
4
  stime > 0 ? (sleep stime) : false
5
- rescue Interrupt
6
- exit 0
7
5
  end
8
6
  end
9
7
  end
@@ -1,3 +1,3 @@
1
1
  module Polling
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polling
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - hiro-su
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-11 00:00:00.000000000 Z
11
+ date: 2014-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler