checkoff 0.134.0 → 0.135.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: 774ff63fdebd9187b4aedf1cad2ee5ba52c4d7f5d582747b0414e698c6c31d9d
4
- data.tar.gz: de61ee88dc1e575702bbe15df6fcd0e70738a3b0f5ffb10654633260831c9923
3
+ metadata.gz: a1405ced59ee8be44fb64638fb70395489ac438812bb1307a58dc46f9bf2b0a3
4
+ data.tar.gz: 2a3eb1041ff8894f18ea135774542c0efc09ed0f3ec1771130059aacd93b7733
5
5
  SHA512:
6
- metadata.gz: 767386a4cb59daf9085a545e1e6bb8b76d01ac374785c2c574a285142b0531ebf1c3c7f930b3d104262452bdb1975b8158a2906d157cc88b46bce0852fd357e9
7
- data.tar.gz: c3f95457b476ff66133dba010920db1feee0f27f98fa35ed92246b677dde95f17fd8347b91de6aa63f2777c2dcebef061a8d5aefaf85638e4c321009b68185d6
6
+ metadata.gz: 376987e755790ea699766a7d419ff07353122a256d6d398c4cfbc015ef29418f396e3b3b5761de595e28f0c9bf29baf74afe87ede5c885e6bea5b1d742ebc3bc
7
+ data.tar.gz: 70c8298da537b7c9bdc9562eebdc03a5cffc04762917b9fcef577bef05c9dfc4bdc2a2bfba72c295b3dc7f343be08e1d4febbbcb3cc0817470118b0bca8adb0a
data/Gemfile.lock CHANGED
@@ -12,7 +12,7 @@ GIT
12
12
  PATH
13
13
  remote: .
14
14
  specs:
15
- checkoff (0.134.0)
15
+ checkoff (0.135.0)
16
16
  activesupport
17
17
  asana (> 0.10.0)
18
18
  cache_method
@@ -127,11 +127,16 @@ module Checkoff
127
127
  #
128
128
  # @param task_gid [String]
129
129
  # @param extra_fields [Array<String>]
130
+ # @param only_uncompleted [Boolean]
131
+ #
130
132
  # @return [Asana::Resources::Task, nil]
131
133
  def task_by_gid(task_gid,
132
- extra_fields: [])
134
+ extra_fields: [],
135
+ only_uncompleted: false)
136
+ # @type [Hash]
133
137
  options = projects.task_options.fetch(:options, {})
134
138
  options[:fields] += extra_fields
139
+ options[:completed_since] = '9999-12-01' if only_uncompleted
135
140
  client.tasks.find_by_id(task_gid, options: options)
136
141
  end
137
142
  cache_method :task_by_gid, SHORT_CACHE_TIME
@@ -182,9 +187,10 @@ module Checkoff
182
187
  # the completion status of dependencies, so we need to do this
183
188
  # regardless:
184
189
  parent_task_gid = parent_task_info.fetch('gid')
185
- parent_task = @asana_task.find_by_id(client, parent_task_gid,
186
- options: { fields: ['completed'] })
187
- !parent_task.completed
190
+
191
+ parent_task = task_by_gid(parent_task_gid,
192
+ only_uncompleted: false)
193
+ parent_task.completed_at.nil?
188
194
  end
189
195
  end
190
196
 
@@ -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.134.0'
6
+ VERSION = '0.135.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.134.0
4
+ version: 0.135.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: 2023-11-23 00:00:00.000000000 Z
11
+ date: 2023-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport