roqua-support 0.1.27 → 0.1.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4bda6e60469417b289cc6b362240df7943ef3a32
4
- data.tar.gz: 8b5a13cfbeddc4eb24f7d1cca3fe5c828df019c5
3
+ metadata.gz: ded93f48de2dee044fe41d2803a89e9c789d1bde
4
+ data.tar.gz: 42667e78929fc8f4e50ca8de5b36183e7074db4c
5
5
  SHA512:
6
- metadata.gz: 8dbd51457aa872e2684042494741aadc952814266fde183c09a7bf48f8a6d969df495fe3f708c39aa5d6fb3d4ecbcf6ad716037177b69fe65b3da5b205ec60e2
7
- data.tar.gz: 7f39013acd584c9faead2d9475c0f8ed8fc74b455b4eb621a0596a2fef41482f0b59b7e5fa41c7bb0b8757ed2f1c44bd24875f6bfcc0b02b9084bdca23851779
6
+ metadata.gz: 891b4c42815fc0c3dd06766a7a23de388acbfc17d4898d06b4177d3e1b329817793a0456ff3bbd54efeb248ebbf6b80f27b0073acf5ca11ea6fd51a3564ae7f6
7
+ data.tar.gz: e2a34e8af41127a4924d7b51f75772dd31e9583c051f0ff0539d9eaad18727376c532254e121c3dc05839a633b06c3279c5b3cf7aca8274976520e66d4f08c1f
data/Gemfile.lock CHANGED
@@ -8,7 +8,7 @@ GIT
8
8
  PATH
9
9
  remote: .
10
10
  specs:
11
- roqua-support (0.1.26)
11
+ roqua-support (0.1.28)
12
12
  active_interaction (~> 3.0)
13
13
  activesupport (>= 3.2, < 6)
14
14
  naught (~> 1.0)
@@ -1,5 +1,5 @@
1
1
  module Roqua
2
2
  module Support
3
- VERSION = '0.1.27'.freeze
3
+ VERSION = '0.1.28'.freeze
4
4
  end
5
5
  end
@@ -8,12 +8,8 @@ module Roqua::Scheduling
8
8
  @callback = callback
9
9
  end
10
10
 
11
- def run_at
12
- options[:run_at]
13
- end
14
-
15
11
  def next_run_at
16
- run_at.call
12
+ options[:next_run_at].call
17
13
  end
18
14
 
19
15
  def run
@@ -13,17 +13,17 @@ describe Roqua::Scheduling::Scheduler do
13
13
 
14
14
  def setup_daily_and_hourly_schedule
15
15
  Roqua::Scheduling::Schedule.setup do |cron|
16
- cron.add_task 'hourly', run_at: Roqua::Scheduling::Schedule::BEGINNING_OF_EVERY_HOUR do
16
+ cron.add_task 'hourly', next_run_at: Roqua::Scheduling::Schedule::BEGINNING_OF_EVERY_HOUR do
17
17
  end
18
18
 
19
- cron.add_task 'daily', run_at: Roqua::Scheduling::Schedule::BEGINNING_OF_EVERY_DAY do
19
+ cron.add_task 'daily', next_run_at: Roqua::Scheduling::Schedule::BEGINNING_OF_EVERY_DAY do
20
20
  end
21
21
  end
22
22
  end
23
23
 
24
24
  def setup_hourly_schedule
25
25
  Roqua::Scheduling::Schedule.setup do |cron|
26
- cron.add_task 'hourly', run_at: Roqua::Scheduling::Schedule::BEGINNING_OF_EVERY_HOUR do
26
+ cron.add_task 'hourly', next_run_at: Roqua::Scheduling::Schedule::BEGINNING_OF_EVERY_HOUR do
27
27
  end
28
28
  end
29
29
  end
@@ -58,7 +58,7 @@ describe Roqua::Scheduling::Scheduler do
58
58
  describe 'with a run_at in the future' do
59
59
  before do
60
60
  Roqua::Scheduling::Schedule.setup do |cron|
61
- cron.add_task 'hourly', run_at: proc { 1.minute.from_now } do
61
+ cron.add_task 'hourly', next_run_at: proc { 1.minute.from_now } do
62
62
  end
63
63
  end
64
64
  end
@@ -74,7 +74,7 @@ describe Roqua::Scheduling::Scheduler do
74
74
 
75
75
  it 'get executed' do
76
76
  Roqua::Scheduling::Schedule.setup do |cron|
77
- cron.add_task 'hourly', run_at: proc { 1.minute.ago } do
77
+ cron.add_task 'hourly', next_run_at: proc { 1.minute.ago } do
78
78
  callback_spy.execute
79
79
  end
80
80
  end
@@ -89,7 +89,7 @@ describe Roqua::Scheduling::Scheduler do
89
89
  Timecop.freeze(60.seconds.ago)
90
90
 
91
91
  Roqua::Scheduling::Schedule.setup do |cron|
92
- cron.add_task 'task', run_at: proc { 30.seconds.from_now } do
92
+ cron.add_task 'task', next_run_at: proc { 30.seconds.from_now } do
93
93
  end
94
94
  end
95
95
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roqua-support
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.27
4
+ version: 0.1.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marten Veldthuis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-04 00:00:00.000000000 Z
11
+ date: 2018-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_interaction