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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e441dfbcef11d610f73873858235bd110aa27b730a40eca5c5a38aac3e27ff5c
4
- data.tar.gz: 4810a4c39437830b9dd6a909102328d6f413600a30bf2fe92702d1a59fe4ae61
3
+ metadata.gz: 48f7926e53c17c01d34979e6e179e7de9f9c3f75e4b525ad198c12c774d2187e
4
+ data.tar.gz: faba1965ff8947718c5118a30d4271a1ca8445ff43722f3fe0cfc77b0eb25e38
5
5
  SHA512:
6
- metadata.gz: '08ad245068e7a1278a90943eff26e239175aa2874b9db59b682448f3069f8d3e71bddae0f21cefcddf2f315a95cfc0094800759487953fb519be6af9935886d1'
7
- data.tar.gz: 02c0f071c4d722f26014d2029e13794a26e15ab1396291177e80b8d4506e301bd33b2e3984296314e8a57bf522c589c1a9f4684810564f8f3b387b1e780bbbe3
6
+ metadata.gz: 396211f82f8e9636af8c46ee4049a7a5fae6278df3bd95f41bfb7350ca5cfe12fcc45544dac8800a4a2d7a2a8fd811a787657dad1d9c311c8fa1cdc989ba6d5a
7
+ data.tar.gz: 81fa41307abbb32f576411fa147cbbf845eb341e086ab8697b2c715e4dd756b40709e84f471881ef0e192f77fce8f80beecc56586d3abad395a979de9078f2b7
data/Gemfile.lock CHANGED
@@ -12,7 +12,7 @@ GIT
12
12
  PATH
13
13
  remote: .
14
14
  specs:
15
- checkoff (0.55.0)
15
+ checkoff (0.56.0)
16
16
  activesupport
17
17
  asana (> 0.10.0)
18
18
  cache_method
@@ -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,
@@ -3,5 +3,5 @@
3
3
  # Command-line and gem client for Asana (unofficial)
4
4
  module Checkoff
5
5
  # Version of library
6
- VERSION = '0.55.0'
6
+ VERSION = '0.56.0'
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: checkoff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.55.0
4
+ version: 0.56.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vince Broz