mt-uv-rays 2.4.71 → 2.4.72
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mt-uv-rays/scheduler.rb +8 -8
- data/lib/mt-uv-rays/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8db219895c3eb81dfdcbc2772eeb9d0521b98da3fefcff47cfb4778fbb2d6c8
|
4
|
+
data.tar.gz: '003427919c7cde49aa7fc93817acbe77dcd2ba397eeba33c7cdf97f13af111e0'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 182ce1d9ce72bbacb9343b308eb1ab6b048bffc754964f2e5cf9babd335f29096fde33719311cc2d5265c43b1b9ffe89867832d2edc56a49d829830e9409c665
|
7
|
+
data.tar.gz: '08288e8d49a2551b83242005ddaf79d28afae10bf6cc5fded5e4d92b0a9b0d22aca906b2d785893c0f3dd6ca3416b8c9c51940f50e74f1dc7dd77aeaf4719420'
|
data/lib/mt-uv-rays/scheduler.rb
CHANGED
@@ -210,10 +210,10 @@ module MTUV
|
|
210
210
|
# @param time [String] a human readable string representing the time period. 3w2d4h1m2s for example.
|
211
211
|
# @param callback [Proc] a block or method to execute when the event triggers
|
212
212
|
# @return [::MTUV::Repeat]
|
213
|
-
def every(time)
|
213
|
+
def every(time, &block)
|
214
214
|
ms = Scheduler.parse_in(time)
|
215
215
|
event = Repeat.new(self, ms)
|
216
|
-
event.progress &
|
216
|
+
event.progress &block if block_given?
|
217
217
|
schedule(event)
|
218
218
|
event
|
219
219
|
end
|
@@ -223,10 +223,10 @@ module MTUV
|
|
223
223
|
# @param time [String] a human readable string representing the time period. 3w2d4h1m2s for example.
|
224
224
|
# @param callback [Proc] a block or method to execute when the event triggers
|
225
225
|
# @return [::MTUV::OneShot]
|
226
|
-
def in(time)
|
226
|
+
def in(time, &block)
|
227
227
|
ms = @reactor.now + Scheduler.parse_in(time)
|
228
228
|
event = OneShot.new(self, ms)
|
229
|
-
event.progress &
|
229
|
+
event.progress &block if block_given?
|
230
230
|
schedule(event)
|
231
231
|
event
|
232
232
|
end
|
@@ -236,10 +236,10 @@ module MTUV
|
|
236
236
|
# @param time [String, Time] a representation of a date and time that can be parsed
|
237
237
|
# @param callback [Proc] a block or method to execute when the event triggers
|
238
238
|
# @return [::MTUV::OneShot]
|
239
|
-
def at(time)
|
239
|
+
def at(time, &block)
|
240
240
|
ms = Scheduler.parse_at(time) - @time_diff
|
241
241
|
event = OneShot.new(self, ms)
|
242
|
-
event.progress &
|
242
|
+
event.progress &block if block_given?
|
243
243
|
schedule(event)
|
244
244
|
event
|
245
245
|
end
|
@@ -249,10 +249,10 @@ module MTUV
|
|
249
249
|
# @param schedule [String] a standard CRON job line.
|
250
250
|
# @param callback [Proc] a block or method to execute when the event triggers
|
251
251
|
# @return [::MTUV::Repeat]
|
252
|
-
def cron(schedule, timezone: nil)
|
252
|
+
def cron(schedule, timezone: nil, &block)
|
253
253
|
ms = Scheduler.parse_cron(schedule, timezone: timezone)
|
254
254
|
event = Repeat.new(self, ms)
|
255
|
-
event.progress &
|
255
|
+
event.progress &block if block_given?
|
256
256
|
schedule(event)
|
257
257
|
event
|
258
258
|
end
|
data/lib/mt-uv-rays/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mt-uv-rays
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.72
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Giallombardo Nathan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mt-libuv
|