checkoff 0.25.0 → 0.26.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1adcf7ca7bea1514f07f234a4952e550afeb47be68882a631d26b88231839ec4
|
4
|
+
data.tar.gz: e2d86531a6e256cbfb9315199b529d6e587263dc6a750c6ab3a28faa8e1f0b12
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 636615e7e3b49a763e71c867718b6441bde385eb30533263c67030cb9b6febd7a3c233087daec5c30e2ec1e2bf24d0fe97c7480faf6feb18baf121c140e14642
|
7
|
+
data.tar.gz: ab00d105d5f79e402c2030a4a982fe3b863270c9477ffa4c4fccf686d79a1280ab3a20561be72311711ee481544a206f2af9785eaaab5db3d3646a466f6f888d
|
data/Gemfile.lock
CHANGED
@@ -33,14 +33,17 @@ module Checkoff
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def merge_args_and_task_selectors(args, new_args, task_selector, new_task_selector)
|
36
|
-
|
37
|
-
return [args, task_selector] if new_task_selector == []
|
36
|
+
final_args = args.merge(new_args)
|
38
37
|
|
39
|
-
|
38
|
+
final_task_selector = if new_task_selector == []
|
39
|
+
task_selector
|
40
|
+
elsif task_selector == []
|
41
|
+
new_task_selector
|
42
|
+
else
|
43
|
+
[:and, task_selector, new_task_selector]
|
44
|
+
end
|
40
45
|
|
41
|
-
|
42
|
-
|
43
|
-
[args, task_selector]
|
46
|
+
[final_args, final_task_selector]
|
44
47
|
end
|
45
48
|
|
46
49
|
VARIANTS = {
|
@@ -20,6 +20,17 @@ module Checkoff
|
|
20
20
|
attr_reader :task_selector
|
21
21
|
end
|
22
22
|
|
23
|
+
# :and function
|
24
|
+
class AndFunctionEvaluator < FunctionEvaluator
|
25
|
+
def matches?
|
26
|
+
fn?(task_selector, :and)
|
27
|
+
end
|
28
|
+
|
29
|
+
def evaluate(_task, lhs, rhs)
|
30
|
+
lhs && rhs
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
23
34
|
# :not function
|
24
35
|
class NotFunctionEvaluator < FunctionEvaluator
|
25
36
|
def matches?
|
@@ -154,6 +165,7 @@ module Checkoff
|
|
154
165
|
TagPFunctionEvaluator,
|
155
166
|
CustomFieldValueFunctionEvaluator,
|
156
167
|
CustomFieldGidValueContainsAnyGidFunctionEvaluator,
|
168
|
+
AndFunctionEvaluator,
|
157
169
|
].freeze
|
158
170
|
|
159
171
|
def evaluate(task_selector)
|
data/lib/checkoff/version.rb
CHANGED