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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e856731079abb89680364cc6215e7134f1c05cf7c1ea6747ecdad3b8af7cee3e
4
- data.tar.gz: a0e30cb078b30f209c2e5f91de31443865bfb7c49bb7e5ed682af1cfbfe5753a
3
+ metadata.gz: f8db219895c3eb81dfdcbc2772eeb9d0521b98da3fefcff47cfb4778fbb2d6c8
4
+ data.tar.gz: '003427919c7cde49aa7fc93817acbe77dcd2ba397eeba33c7cdf97f13af111e0'
5
5
  SHA512:
6
- metadata.gz: 00fff97c1ff5d0196190f15ef3d035c0ae6ed5e310b28c397127c76c2ad243f39e6a0d40217120e42891975804c477c36c5eed2eca0b6f1097b45ea460f1c54f
7
- data.tar.gz: 3ed6e3d25c907f683db2ae122802c5858d928451328030150e8ee1fd9529d9fa642ea62464df49c7c7500da587b037d7c5534c5aec52f2a4582f44c2bec698cf
6
+ metadata.gz: 182ce1d9ce72bbacb9343b308eb1ab6b048bffc754964f2e5cf9babd335f29096fde33719311cc2d5265c43b1b9ffe89867832d2edc56a49d829830e9409c665
7
+ data.tar.gz: '08288e8d49a2551b83242005ddaf79d28afae10bf6cc5fded5e4d92b0a9b0d22aca906b2d785893c0f3dd6ca3416b8c9c51940f50e74f1dc7dd77aeaf4719420'
@@ -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 &Proc.new if block_given?
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 &Proc.new if block_given?
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 &Proc.new if block_given?
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 &Proc.new if block_given?
255
+ event.progress &block if block_given?
256
256
  schedule(event)
257
257
  event
258
258
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MTUV
4
- VERSION = '2.4.71'
4
+ VERSION = '2.4.72'
5
5
  end
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.71
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-03-25 00:00:00.000000000 Z
11
+ date: 2022-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mt-libuv