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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f46e4443d512a1f25b9d1d960042905a99e929072dbc7d03261b204a100a7d9a
4
- data.tar.gz: 929a3df513e5cf742d9ce9a954a4a297725b61cb2bf2871504c4ace2831fb827
3
+ metadata.gz: 460a9e7a6cd597a95b8a4d1510776d842433d53d77e12995eaafd14473edaa8d
4
+ data.tar.gz: cb639a1b164c6029577a13643a0688bd68ce09b507b5ad1c962ad9a060e41f55
5
5
  SHA512:
6
- metadata.gz: 2ddae4b92ad60143912b9ec9432c5ef807aff1c7a6165da1f48c7c034d0970071ec6a7d12ec1ba38d788bfee99d4ecc7a73a07ca784be6872be4a4bf838e8e5e
7
- data.tar.gz: 6c3a36a7b33f7234dde63c3cb8fca69e8390003605b962d56e2ac0e9cc2db12893a034a1a4c1e7ef661f1c1859654c34a2a9cf4ab6797a2ce4faa835e592f840
6
+ metadata.gz: 2279da4267561c7b61865047ecb2646de2d288954e792496272cf5c1ddf3408b59c333498120bb29a86c43f534b029632f9ad5b38bc1e51c0fccdfb17da47fa9
7
+ data.tar.gz: 2dba9cc6ad70e3c8b682c760d7f8b9a20698362d06bca51487e4475ed39265db86589c28ff1596926495c5e7de7554871e9d85f124ff7a79d5bf2f220568df12
data/Gemfile.lock CHANGED
@@ -12,7 +12,7 @@ GIT
12
12
  PATH
13
13
  remote: .
14
14
  specs:
15
- checkoff (0.171.0)
15
+ checkoff (0.172.0)
16
16
  activesupport
17
17
  asana (> 0.10.0)
18
18
  cache_method
@@ -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
- out = filter_matches_asana_event?(filter, asana_event)
36
- logger.debug { "Filter #{filter.inspect} matched? #{out} against event #{asana_event.inspect}" }
37
- out
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
 
@@ -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.171.0'
6
+ VERSION = '0.172.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.171.0
4
+ version: 0.172.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vince Broz