checkoff 0.171.0 → 0.172.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/checkoff/internal/asana_event_filter.rb +17 -5
- data/lib/checkoff/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 460a9e7a6cd597a95b8a4d1510776d842433d53d77e12995eaafd14473edaa8d
|
4
|
+
data.tar.gz: cb639a1b164c6029577a13643a0688bd68ce09b507b5ad1c962ad9a060e41f55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2279da4267561c7b61865047ecb2646de2d288954e792496272cf5c1ddf3408b59c333498120bb29a86c43f534b029632f9ad5b38bc1e51c0fccdfb17da47fa9
|
7
|
+
data.tar.gz: 2dba9cc6ad70e3c8b682c760d7f8b9a20698362d06bca51487e4475ed39265db86589c28ff1596926495c5e7de7554871e9d85f124ff7a79d5bf2f220568df12
|
data/Gemfile.lock
CHANGED
@@ -31,10 +31,18 @@ module Checkoff
|
|
31
31
|
logger.debug { "Filtering using #{@filters.inspect}" }
|
32
32
|
return true if @filters.nil?
|
33
33
|
|
34
|
+
failures = []
|
35
|
+
|
34
36
|
@filters.any? do |filter|
|
35
|
-
|
36
|
-
logger.debug { "Filter #{filter.inspect} matched? #{
|
37
|
-
|
37
|
+
filter_matches = filter_matches_asana_event?(filter, asana_event, failures)
|
38
|
+
logger.debug { "Filter #{filter.inspect} matched? #{filter_matches} against event #{asana_event.inspect}" }
|
39
|
+
unless filter_matches
|
40
|
+
logger.info do
|
41
|
+
"Filter #{filter.inspect} failed to match event #{asana_event.inspect} because of #{failures.inspect}"
|
42
|
+
end
|
43
|
+
failures << filter
|
44
|
+
end
|
45
|
+
filter_matches
|
38
46
|
end
|
39
47
|
end
|
40
48
|
|
@@ -42,14 +50,18 @@ module Checkoff
|
|
42
50
|
|
43
51
|
# @param filter [Hash]
|
44
52
|
# @param asana_event [Hash]
|
53
|
+
# @param failures [Array<String>]
|
45
54
|
#
|
46
55
|
# @sg-ignore
|
47
56
|
# @return [Boolean]
|
48
|
-
def filter_matches_asana_event?(filter, asana_event)
|
57
|
+
def filter_matches_asana_event?(filter, asana_event, failures)
|
49
58
|
# @param key [String]
|
50
59
|
# @param value [String, Array<String>]
|
51
60
|
filter.all? do |key, value|
|
52
|
-
asana_event_matches_filter_item?(key, value, asana_event)
|
61
|
+
matches = asana_event_matches_filter_item?(key, value, asana_event)
|
62
|
+
failures << "#{key.inspect} = #{value.inspect}" unless matches
|
63
|
+
|
64
|
+
matches
|
53
65
|
end
|
54
66
|
end
|
55
67
|
|
data/lib/checkoff/version.rb
CHANGED