checkoff 0.183.0 → 0.184.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: 393f21b871da67bd72c7aa7722e8242bf2bf0cc537223d3038721b195468fbe5
4
- data.tar.gz: f1fcca65484d4368e82a7873a7f3ee81215c50b4ca74417c128467d6c9a8f50e
3
+ metadata.gz: e8eb599f0019414a7aaa86484ebacab58fdc9abd5f0e011c789cbff5672be954
4
+ data.tar.gz: 496e59dacc6ca7319b5549ae56fcfe9054fcc567b93e2df51dc45bebb6d43854
5
5
  SHA512:
6
- metadata.gz: d2adb21b7d35163eb7dd30bd2482e199b6a5a4710778f16792b42e4b50a23798ad37a6401f923dede83e146476655e96b4699ba395fae54d335fea615f90c4b4
7
- data.tar.gz: 8418eeab8543379f9ca76e8d0f0f31a08bbdade82f73f1c074b429c8d44a2b22b7b64aec94aabb4535d231cd28e6885a9c3f04f0a65d2cc706559c9a669dcad5
6
+ metadata.gz: a8feba7f88c8a1fade31615176feacb95ec1b42cdde47cf41a44779fc04c87822d131f5d68c9bbafe5b714f2e7fa58dcf06db8ce38fb19145d6eb0db5091f413
7
+ data.tar.gz: b52827bd2a85db528b50d899b1c78f057364590a46ec603d2a4ae8d1dfc975c896672eb8b9a4dcad28809f8e67afab21b56d4ca35b0aa1910bd1eee8e35ee214
data/Gemfile.lock CHANGED
@@ -12,7 +12,7 @@ GIT
12
12
  PATH
13
13
  remote: .
14
14
  specs:
15
- checkoff (0.183.0)
15
+ checkoff (0.184.0)
16
16
  activesupport
17
17
  asana (> 0.10.0)
18
18
  cache_method
@@ -92,11 +92,15 @@ module Checkoff
92
92
  fields = ['memberships.project.gid', 'memberships.project.name',
93
93
  'memberships.section.name', 'assignee', 'assignee_section']
94
94
  task = uncached_fetch_task(key, asana_event, fields)
95
+ return false if task.nil?
96
+
95
97
  task_data = @tasks.task_to_h(task)
96
98
  task_data.fetch('unwrapped').fetch('membership_by_section_gid').keys.include?(value)
97
99
  when 'checkoff:fetched.completed'
98
100
  fields = ['completed_at']
99
101
  task = uncached_fetch_task(key, asana_event, fields)
102
+ return false if task.nil?
103
+
100
104
  task_completed = !task.completed_at.nil?
101
105
  task_completed == value
102
106
  else
@@ -108,7 +112,7 @@ module Checkoff
108
112
  # @param asana_event [Hash]
109
113
  # @param fields [Array<String>]
110
114
  #
111
- # @return [Asana::Resources::Task]
115
+ # @return [Asana::Resources::Task,nil]
112
116
  def uncached_fetch_task(key, asana_event, fields)
113
117
  # @type [Hash{String => String}]
114
118
  # @sg-ignore
@@ -124,6 +128,8 @@ module Checkoff
124
128
  fields: fields,
125
129
  }
126
130
  @client.tasks.find_by_id(task_gid, options: options)
131
+ rescue Asana::Errors::NotFound
132
+ nil
127
133
  end
128
134
  end
129
135
  end
@@ -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.183.0'
6
+ VERSION = '0.184.0'
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: checkoff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.183.0
4
+ version: 0.184.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vince Broz
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-01-21 00:00:00.000000000 Z
11
+ date: 2024-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport