checkoff 0.63.0 → 0.63.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2555cef49fe83b23cb41525e4ec58af676a83064b9b0a1f25627ce0725c9f52
|
4
|
+
data.tar.gz: 6ab72b8c2bcb63e7af1c45d4a027e9827857463d9a85978f44ae1d6c8c4e7c42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d452fb3158109d1a0709d13d9226c91ac05aec44d7ce33bc6e11ad74850816d79750c1fdf64f47cf5eed73527eeb8e742c23a85fae3ce0ce4d9554eeae18366
|
7
|
+
data.tar.gz: 9617ea07417b87675a1789c57d888d50e6f8652ffe913bc2743043c392311cf65fd165344296974dc5a3292a6344ea8a692af63f5a395fb6dc85239a15bedf34
|
data/Gemfile.lock
CHANGED
@@ -116,16 +116,36 @@ module Checkoff
|
|
116
116
|
end
|
117
117
|
end
|
118
118
|
|
119
|
-
# @param
|
119
|
+
# @param custom_field [Hash]
|
120
|
+
# @param enum_value [Object, nil]
|
121
|
+
# @return [Array<String>]
|
122
|
+
def find_names(enum_value)
|
123
|
+
[enum_value.fetch('name')]
|
124
|
+
end
|
125
|
+
|
126
|
+
# @param project [Asana::Resources::Project,Asana::Resources::Task]
|
120
127
|
# @param custom_field_gid [String]
|
121
128
|
# @return [Array<String>]
|
122
|
-
def
|
129
|
+
def pull_custom_field_values_gids_or_raise(project, custom_field_gid)
|
123
130
|
custom_field = pull_custom_field_or_raise(project, custom_field_gid)
|
131
|
+
|
124
132
|
pull_enum_values(custom_field).flat_map do |enum_value|
|
125
133
|
find_gids(custom_field, enum_value)
|
126
134
|
end
|
127
135
|
end
|
128
136
|
|
137
|
+
# @param resource [Asana::Resources::Project,Asana::Resources::Task]
|
138
|
+
# @param custom_field_name [String]
|
139
|
+
# @return [Array<String>]
|
140
|
+
def pull_custom_field_values_names_by_name(resource, custom_field_name)
|
141
|
+
custom_field = pull_custom_field_by_name(resource, custom_field_name)
|
142
|
+
return [] if custom_field.nil?
|
143
|
+
|
144
|
+
pull_enum_values(custom_field).flat_map do |enum_value|
|
145
|
+
find_names(enum_value)
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
129
149
|
# @sg-ignore
|
130
150
|
# @param project [Asana::Resources::Project]
|
131
151
|
# @param custom_field_name [String]
|
@@ -150,7 +150,7 @@ module Checkoff
|
|
150
150
|
# @param custom_field_values_gids [Array<String>]
|
151
151
|
# @return [Boolean]
|
152
152
|
def evaluate(resource, custom_field_gid, custom_field_values_gids)
|
153
|
-
actual_custom_field_values_gids =
|
153
|
+
actual_custom_field_values_gids = pull_custom_field_values_gids_or_raise(resource, custom_field_gid)
|
154
154
|
|
155
155
|
actual_custom_field_values_gids.any? do |custom_field_value|
|
156
156
|
custom_field_values_gids.include?(custom_field_value)
|
@@ -172,14 +172,14 @@ module Checkoff
|
|
172
172
|
|
173
173
|
# @param resource [Asana::Resources::Task,Asana::Resources::Project]
|
174
174
|
# @param custom_field_name [String]
|
175
|
-
# @param
|
175
|
+
# @param custom_field_value_names [Array<String>]
|
176
176
|
# @return [Boolean]
|
177
|
-
def evaluate(resource, custom_field_name,
|
178
|
-
|
179
|
-
|
180
|
-
return false if custom_field.nil?
|
177
|
+
def evaluate(resource, custom_field_name, custom_field_value_names)
|
178
|
+
actual_custom_field_values_names = pull_custom_field_values_names_by_name(resource, custom_field_name)
|
181
179
|
|
182
|
-
|
180
|
+
actual_custom_field_values_names.any? do |custom_field_value|
|
181
|
+
custom_field_value_names.include?(custom_field_value)
|
182
|
+
end
|
183
183
|
end
|
184
184
|
end
|
185
185
|
|
@@ -200,7 +200,7 @@ module Checkoff
|
|
200
200
|
# @param custom_field_values_gids [Array<String>]
|
201
201
|
# @return [Boolean]
|
202
202
|
def evaluate(resource, custom_field_gid, custom_field_values_gids)
|
203
|
-
actual_custom_field_values_gids =
|
203
|
+
actual_custom_field_values_gids = pull_custom_field_values_gids_or_raise(resource, custom_field_gid)
|
204
204
|
|
205
205
|
custom_field_values_gids.all? do |custom_field_value|
|
206
206
|
actual_custom_field_values_gids.include?(custom_field_value)
|
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.63.
|
4
|
+
version: 0.63.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vince Broz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-10-
|
11
|
+
date: 2023-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|