checkoff 0.45.0 → 0.45.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/checkoff/internal/task_selector_evaluator.rb +10 -3
- data/lib/checkoff/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 166520f53086eea60a30deae24eacea2bff98b58cc63e1bc14397e016cfce5a3
|
4
|
+
data.tar.gz: 182f61588c6343c7b16100a56357909b5d1c532a2580040fdb50828dedeb4032
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00461660f5b2f2927d5c0bd89b34e12a1393ce105dcddf6782054ef655c3ba55654c0d5a818e35907dd46d457beac3a18b637bb2a5379ae78d30913fdd55944d
|
7
|
+
data.tar.gz: 8aa6bdc999894732e1e243cac1617b6b40b905b80562c5d8d57bbf2a988b4f1b66fc7848dbe4937dc01228c503a4e26661bc17a28c75c6effed5b10d9afd10db
|
data/Gemfile.lock
CHANGED
@@ -349,7 +349,11 @@ module Checkoff
|
|
349
349
|
def evaluate(task, custom_field_name, num_days)
|
350
350
|
custom_field = pull_custom_field_by_name_or_raise(task, custom_field_name)
|
351
351
|
|
352
|
+
# @sg-ignore
|
353
|
+
# @type [String, nil]
|
352
354
|
time_str = custom_field.fetch('display_value')
|
355
|
+
return false if time_str.nil?
|
356
|
+
|
353
357
|
time = Time.parse(time_str)
|
354
358
|
n_days_from_now = (Time.now + (num_days * 24 * 60 * 60))
|
355
359
|
time < n_days_from_now
|
@@ -375,7 +379,11 @@ module Checkoff
|
|
375
379
|
def evaluate(task, custom_field_name, num_days)
|
376
380
|
custom_field = pull_custom_field_by_name_or_raise(task, custom_field_name)
|
377
381
|
|
382
|
+
# @sg-ignore
|
383
|
+
# @type [String, nil]
|
378
384
|
time_str = custom_field.fetch('display_value')
|
385
|
+
return false if time_str.nil?
|
386
|
+
|
379
387
|
time = Time.parse(time_str)
|
380
388
|
n_days_from_now = (Time.now + (num_days * 24 * 60 * 60))
|
381
389
|
time >= n_days_from_now
|
@@ -429,10 +437,9 @@ module Checkoff
|
|
429
437
|
def evaluate(task_selector)
|
430
438
|
return true if task_selector.empty?
|
431
439
|
|
432
|
-
# @param evaluator_class [Class<FunctionEvaluator>]
|
440
|
+
# @param evaluator_class [Class<TaskSelectorClasses::FunctionEvaluator>]
|
433
441
|
FUNCTION_EVALUTORS.each do |evaluator_class|
|
434
442
|
# @sg-ignore
|
435
|
-
# @type [FunctionEvaluator]
|
436
443
|
evaluator = evaluator_class.new(task_selector: task_selector,
|
437
444
|
tasks: tasks)
|
438
445
|
|
@@ -448,7 +455,7 @@ module Checkoff
|
|
448
455
|
|
449
456
|
# @sg-ignore
|
450
457
|
# @param task_selector [Array]
|
451
|
-
# @param evaluator [FunctionEvaluator]
|
458
|
+
# @param evaluator [TaskSelectorClasses::FunctionEvaluator]
|
452
459
|
# @return [Boolean, Object, nil]
|
453
460
|
def try_this_evaluator(task_selector, evaluator)
|
454
461
|
# if task_selector is an array
|
data/lib/checkoff/version.rb
CHANGED