zoidberg 0.1.6 → 0.1.8

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: 08a8fcac4a08bd3faf0b9df558810aff252ad731
4
- data.tar.gz: 592ee902246aa7894b9a06e3fe5a1a5004cd79cf
3
+ metadata.gz: df52de1159262a58d00a216caaa8fe027a77dd9b
4
+ data.tar.gz: 6cfa6c993544ef1e5eac1e8ebbc441d229127028
5
5
  SHA512:
6
- metadata.gz: 30c31fccb644651b16bcb4800950abaad291a1c889e0610e35eda0544478b9b36d4395ded8689965ad6f27b25b3948e690bd051e7b4edb5f86013779595dd5e4
7
- data.tar.gz: da72c8a5e1e394cd6acdd2898aa7e647da58478d5408c6b4f2c741fac92705fc1efe641d8cb729f2913f69bdbfcf66d8d30c9cebafd2f7b99e77eccab9a61cc9
6
+ metadata.gz: 1a1428042644789759af29f18a7f91b9f4a4dd65a7aad27c965451ba2681f87730a2ad39b21efb1adbc34076ae032d759f11d25384aeb5923d468a6b29041b8e
7
+ data.tar.gz: 5996f95418dc32387a87558bdf43ea02494726124ec1955702f61b21a7e7137fedf4dfe0772617287dc40ad4d2f1298603b58b6b80cbf88bd45c2d3f077fdb22
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # v0.1.8
2
+ * Fix to properly remove canceled actions
3
+
1
4
  # v0.1.6
2
5
  * Add Zoidberg::Lazy
3
6
  * Explicitly state what shells are used internally
@@ -45,23 +45,24 @@ module Zoidberg
45
45
  def cancelled?
46
46
  @cancel
47
47
  end
48
+ alias_method :canceled?, :cancelled?
48
49
 
49
50
  # Run the action
50
51
  #
51
52
  # @return [self]
52
53
  def run!
53
- @last_run = Time.now.to_f
54
- action.call
55
- @last_run = Time.now.to_f
54
+ unless(cancelled?)
55
+ @last_run = Time.now.to_f
56
+ action.call
57
+ @last_run = Time.now.to_f
58
+ end
56
59
  self
57
60
  end
58
61
 
59
62
  # @return [TrueClass, FalseClass]
60
63
  def ready?
61
- !cancelled? && (
62
- Time.now.to_f > (
63
- last_run + interval
64
- )
64
+ Time.now.to_f > (
65
+ last_run + interval
65
66
  )
66
67
  end
67
68
 
@@ -1,4 +1,4 @@
1
1
  module Zoidberg
2
2
  # Current library version
3
- VERSION = Gem::Version.new('0.1.6')
3
+ VERSION = Gem::Version.new('0.1.8')
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zoidberg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Roberts
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-22 00:00:00.000000000 Z
11
+ date: 2015-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bogo