checkoff 0.55.0 → 0.56.0
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 +22 -1
- 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: 48f7926e53c17c01d34979e6e179e7de9f9c3f75e4b525ad198c12c774d2187e
|
4
|
+
data.tar.gz: faba1965ff8947718c5118a30d4271a1ca8445ff43722f3fe0cfc77b0eb25e38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 396211f82f8e9636af8c46ee4049a7a5fae6278df3bd95f41bfb7350ca5cfe12fcc45544dac8800a4a2d7a2a8fd811a787657dad1d9c311c8fa1cdc989ba6d5a
|
7
|
+
data.tar.gz: 81fa41307abbb32f576411fa147cbbf845eb341e086ab8697b2c715e4dd756b40709e84f471881ef0e192f77fce8f80beecc56586d3abad395a979de9078f2b7
|
data/Gemfile.lock
CHANGED
@@ -163,6 +163,26 @@ module Checkoff
|
|
163
163
|
end
|
164
164
|
end
|
165
165
|
|
166
|
+
# :or function
|
167
|
+
#
|
168
|
+
# Does not yet shortcut, but may in future - be careful with side
|
169
|
+
# effects!
|
170
|
+
class OrFunctionEvaluator < FunctionEvaluator
|
171
|
+
FUNCTION_NAME = :or
|
172
|
+
|
173
|
+
def matches?
|
174
|
+
fn?(task_selector, FUNCTION_NAME)
|
175
|
+
end
|
176
|
+
|
177
|
+
# @param _task [Asana::Resources::Task]
|
178
|
+
# @param lhs [Object]
|
179
|
+
# @param rhs [Object]
|
180
|
+
# @return [Object]
|
181
|
+
def evaluate(_task, lhs, rhs)
|
182
|
+
lhs || rhs
|
183
|
+
end
|
184
|
+
end
|
185
|
+
|
166
186
|
# :not function
|
167
187
|
class NotFunctionEvaluator < FunctionEvaluator
|
168
188
|
FUNCTION_NAME = :not
|
@@ -504,7 +524,7 @@ module Checkoff
|
|
504
524
|
# for whatever reason, .last on the enumerable does not impose ordering; .to_a does!
|
505
525
|
|
506
526
|
# @type [Array<Asana::Resources::Story>]
|
507
|
-
stories = task.stories.to_a.reject do |story|
|
527
|
+
stories = task.stories(per_page: 100).to_a.reject do |story|
|
508
528
|
excluding_resource_subtypes.include? story.resource_subtype
|
509
529
|
end
|
510
530
|
return true if stories.empty? # no stories == infinitely old!
|
@@ -592,6 +612,7 @@ module Checkoff
|
|
592
612
|
Checkoff::TaskSelectorClasses::CustomFieldGidValueContainsAnyGidFunctionEvaluator,
|
593
613
|
Checkoff::TaskSelectorClasses::CustomFieldGidValueContainsAllGidsFunctionEvaluator,
|
594
614
|
Checkoff::TaskSelectorClasses::AndFunctionEvaluator,
|
615
|
+
Checkoff::TaskSelectorClasses::OrFunctionEvaluator,
|
595
616
|
Checkoff::TaskSelectorClasses::DuePFunctionEvaluator,
|
596
617
|
Checkoff::TaskSelectorClasses::UnassignedPFunctionEvaluator,
|
597
618
|
Checkoff::TaskSelectorClasses::DueDateSetPFunctionEvaluator,
|
data/lib/checkoff/version.rb
CHANGED