checkoff 0.178.0 → 0.180.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c51b55b3779bf1e217de821053f2c562b733837840d68537f392f3321fee1df1
4
- data.tar.gz: b73c3f21801a771e88385eba5c9c02efa95664550d460acaec72887febedae95
3
+ metadata.gz: 8ceda0a224245a150ec0e9a2a5a13bd5977ff985e9b621c3922a839f29b8d8ff
4
+ data.tar.gz: 75758cd84def7f935d9fc2b09a281867c60894bab6d9b726bf51bb9eb495e2ee
5
5
  SHA512:
6
- metadata.gz: 1b54f07192c810b7a20bcb456406fec04957a16ef1e60aa059dbae6d8a6e48dc0252b461dba6a6695bdc126037f09e6d18f0f5cb11802c4a55e92fedf8e98967
7
- data.tar.gz: c6e03eb0e95ba7f61ca73bc5ce33bdaa16dcc9981455b997388c86602ab28ae0d9f35d24a5e721c26f80307caa44fa818a4e15cafd019938d8605c46a72ad4e9
6
+ metadata.gz: dd2d5f5cf6b74502ac3392b96842afe53ea239fdfd0598e2dee02d9525a1011b2d204a7d274f59745f2b19fe33bcaceabd27bcdd51dc8c9bd8e439f049c50cda
7
+ data.tar.gz: 35bd117de452142c2640cfe0a21e2975047cd8d1355669b55f08b57a724d153043b39d05f50acc796146ff0cecab364c394f5a1f9f62d933f0e4832118a893d5
data/Gemfile.lock CHANGED
@@ -12,7 +12,7 @@ GIT
12
12
  PATH
13
13
  remote: .
14
14
  specs:
15
- checkoff (0.178.0)
15
+ checkoff (0.180.0)
16
16
  activesupport
17
17
  asana (> 0.10.0)
18
18
  cache_method
@@ -33,11 +33,10 @@ module Checkoff
33
33
  end
34
34
 
35
35
  # @param _resource [Asana::Resources::Task,Asana::Resources::Project]
36
- # @param lhs [Object]
37
- # @param rhs [Object]
38
- # @return [Object]
39
- def evaluate(_resource, lhs, rhs)
40
- lhs || rhs
36
+ # @param args [Array<Object>]
37
+ # @return [Boolean]
38
+ def evaluate(_resource, *args)
39
+ args.any? { |arg| arg }
41
40
  end
42
41
  end
43
42
 
@@ -6,6 +6,31 @@ require 'checkoff/internal/task_timing'
6
6
  module Checkoff
7
7
  module SelectorClasses
8
8
  module Task
9
+ # :in_a_real_project? function
10
+ class InARealProjectPFunctionEvaluator < FunctionEvaluator
11
+ def matches?
12
+ fn?(selector, :in_a_real_project?)
13
+ end
14
+
15
+ # @param _index [Integer]
16
+ def evaluate_arg?(_index)
17
+ false
18
+ end
19
+
20
+ # @sg-ignore
21
+ # @param task [Asana::Resources::Task]
22
+ # @return [Boolean]
23
+ def evaluate(task)
24
+ # @type [Hash{'unwrapped' => Hash}]
25
+ task_data = @tasks.task_to_h(task)
26
+ # @type [Hash{'membership_by_project_name' => Hash}]
27
+ unwrapped = task_data.fetch('unwrapped')
28
+ # @type [Array]
29
+ projects = unwrapped.fetch('membership_by_project_name').keys
30
+ !(projects - [:my_tasks]).empty?
31
+ end
32
+ end
33
+
9
34
  # :section_name_starts_with? function
10
35
  class SectionNameStartsWithPFunctionEvaluator < FunctionEvaluator
11
36
  def matches?
@@ -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.178.0'
6
+ VERSION = '0.180.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.178.0
4
+ version: 0.180.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vince Broz