reactor 0.9.1 → 0.9.2

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: 5a13c2ae63828aa90ca4f15267e291f92a6ca0ee
4
- data.tar.gz: 32a5e12b5789a4f73cbfa26795c2a5e61de19f99
3
+ metadata.gz: 2c9de12205e0a8f3710f84534cb634fb2270b2e7
4
+ data.tar.gz: dc1e8f7268a6ca74d744f3e524b742f9bf4fcec9
5
5
  SHA512:
6
- metadata.gz: 3ada144fdbe05103ae052c6a7e09eec202d09526fabc82a6f36defc596a0d78564c5c0d470a90327ee7a5b2d467536cb621a5f0a9735198c1039be7a86edb605
7
- data.tar.gz: bb1d0ce4bb234cf1b71b775afd7511bfd08aaae176da7c24377767022e36e5032c612f180a137f0bf06e39748f835f05742b7928075c9803f72bf39b89b93acc
6
+ metadata.gz: c12f75f204e699aabd87ce268f06f1d4aebed23e96af6b9d844b76cb7998c2d9d6ca50e52b8439a5c25e6969659de676c376e73b61003410f9e360f8bb766ebb
7
+ data.tar.gz: 218dd37d4a43ce958a2482347cc5b87e3fe43edad8ce2af84e5cd78f4ad1459ad9af9f9f897be7d98e35a205c3cdc91abd283c89c3d5267f2ca11565d21d4fb3
data/lib/reactor/event.rb CHANGED
@@ -73,7 +73,7 @@ class Reactor::Event
73
73
 
74
74
  job.delete if job
75
75
 
76
- publish(name, data.except([:was, :if])) if data[:at].future?
76
+ publish(name, data.except([:was, :if])) if data[:at].try(:future?)
77
77
  end
78
78
  end
79
79
 
@@ -1,3 +1,3 @@
1
1
  module Reactor
2
- VERSION = "0.9.1"
2
+ VERSION = "0.9.2"
3
3
  end
data/spec/event_spec.rb CHANGED
@@ -88,6 +88,12 @@ describe Reactor::Event do
88
88
  expect(scheduled.find_job(jid).score).to eq((time + 2.hours).to_f)
89
89
  }.to change{ scheduled.size }.by(1)
90
90
  end
91
+
92
+ it 'will not schedule an event when the time passed in is nil' do
93
+ expect {
94
+ Reactor::Event.reschedule :no_old_turtule_time, at: nil, was: time
95
+ }.to_not change{ scheduled.size }
96
+ end
91
97
  end
92
98
 
93
99
  describe 'event content' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reactor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - winfred