checkoff 0.182.0 → 0.184.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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/checkoff/internal/asana_event_filter.rb +7 -1
- data/lib/checkoff/internal/selector_classes/common.rb +21 -0
- data/lib/checkoff/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e8eb599f0019414a7aaa86484ebacab58fdc9abd5f0e011c789cbff5672be954
|
|
4
|
+
data.tar.gz: 496e59dacc6ca7319b5549ae56fcfe9054fcc567b93e2df51dc45bebb6d43854
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a8feba7f88c8a1fade31615176feacb95ec1b42cdde47cf41a44779fc04c87822d131f5d68c9bbafe5b714f2e7fa58dcf06db8ce38fb19145d6eb0db5091f413
|
|
7
|
+
data.tar.gz: b52827bd2a85db528b50d899b1c78f057364590a46ec603d2a4ae8d1dfc975c896672eb8b9a4dcad28809f8e67afab21b56d4ca35b0aa1910bd1eee8e35ee214
|
data/Gemfile.lock
CHANGED
|
@@ -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
|
|
@@ -211,6 +211,27 @@ module Checkoff
|
|
|
211
211
|
end
|
|
212
212
|
end
|
|
213
213
|
|
|
214
|
+
# :name_starts_with? function
|
|
215
|
+
class NameStartsWithPFunctionEvaluator < FunctionEvaluator
|
|
216
|
+
FUNCTION_NAME = :name_starts_with?
|
|
217
|
+
|
|
218
|
+
def matches?
|
|
219
|
+
fn?(selector, FUNCTION_NAME)
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
def evaluate_arg?(_index)
|
|
223
|
+
false
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
# @param resource [Asana::Resources::Task,Asana::Resources::Project]
|
|
227
|
+
# @param prefix [String]
|
|
228
|
+
# @return [Boolean]
|
|
229
|
+
# @sg-ignore
|
|
230
|
+
def evaluate(resource, prefix)
|
|
231
|
+
resource.name.start_with?(prefix)
|
|
232
|
+
end
|
|
233
|
+
end
|
|
234
|
+
|
|
214
235
|
# String literals
|
|
215
236
|
class StringLiteralEvaluator < FunctionEvaluator
|
|
216
237
|
def matches?
|
data/lib/checkoff/version.rb
CHANGED
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.
|
|
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-
|
|
11
|
+
date: 2024-01-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|