checkoff 0.174.0 → 0.175.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: afd1b7c89796ffabac7ae3776f3b1f55abd649355d30b2f7c05865d359841116
4
- data.tar.gz: 7970b7b72e38f600ff5ff03f21ab8a97fc6e4f583d963422c79006541758344b
3
+ metadata.gz: ad196605a8e7b9fb2a14a28040f8f7ee261f13aed5fa6aec8cfde037c174943d
4
+ data.tar.gz: da12083f2d30e975a21464877c8ad47b63c63ea25f05d5599a1944d03c889dbd
5
5
  SHA512:
6
- metadata.gz: ffb5752c0a924f5fb4942a44a22e0778fe0c129048f7a893ae899b73731f13f5f5890671c018322d98057f82d284c35febe3ca92dbb7d34247dbc7b68d8bc5b4
7
- data.tar.gz: 4456268d46432f2187d4984b1df16711bcc1fc82efb3c07f899225d21df897308cc6f5d206a8ff3b8859dfc4d9feaaed60925f697a1fa8646fdd0a45385b81d2
6
+ metadata.gz: b5a8ff3e8f5598e6392c7528057e7d0077bf95f10cab13faaaff4e09a78be8582d64426f27262f01d2568159ef35213ad2fbc2a4b564144f464a9b112ec5aeac
7
+ data.tar.gz: 968285c9e60e3543ea60a858c0ab845e889b68fe41b2839f37a4163c893ef79449382299c2e413342740419b7812d7f70e2b3cd07d87f613fad7ad80f671e192
data/Gemfile.lock CHANGED
@@ -12,7 +12,7 @@ GIT
12
12
  PATH
13
13
  remote: .
14
14
  specs:
15
- checkoff (0.174.0)
15
+ checkoff (0.175.0)
16
16
  activesupport
17
17
  asana (> 0.10.0)
18
18
  cache_method
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Checkoff
4
+ module Internal
5
+ # Manage thread lock variables in a block
6
+ class ThreadLocal
7
+ # @sg-ignore
8
+ # @param name [Symbol]
9
+ # @param value [Object,Boolean]
10
+ #
11
+ # @return [Object,Boolean]
12
+ def with_thread_local_variable(name, value, &block)
13
+ old_value = Thread.current[name]
14
+ Thread.current[name] = value
15
+ block.yield
16
+ ensure
17
+ Thread.current[name] = old_value
18
+ end
19
+ end
20
+ end
21
+ end
@@ -9,6 +9,7 @@ require_relative 'internal/config_loader'
9
9
  require_relative 'internal/task_timing'
10
10
  require_relative 'internal/task_hashes'
11
11
  require_relative 'internal/logging'
12
+ require_relative 'internal/thread_local'
12
13
  require 'asana'
13
14
 
14
15
  module Checkoff
@@ -116,8 +117,11 @@ module Checkoff
116
117
  section_name: :unspecified,
117
118
  only_uncompleted: true,
118
119
  extra_fields: [])
119
- task_gid = gid_for_task(workspace_name, project_name, section_name, task_name)
120
-
120
+ thread_local = Checkoff::Internal::ThreadLocal.new
121
+ task_gid = thread_local.with_thread_local_variable(:suppress_asana_webhook_watch_creation,
122
+ true) do
123
+ gid_for_task(workspace_name, project_name, section_name, task_name)
124
+ end
121
125
  return nil if task_gid.nil?
122
126
 
123
127
  task_by_gid(task_gid, only_uncompleted: only_uncompleted, extra_fields: extra_fields)
@@ -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.174.0'
6
+ VERSION = '0.175.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.174.0
4
+ version: 0.175.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vince Broz
@@ -177,6 +177,7 @@ files:
177
177
  - lib/checkoff/internal/task_hashes.rb
178
178
  - lib/checkoff/internal/task_selector_evaluator.rb
179
179
  - lib/checkoff/internal/task_timing.rb
180
+ - lib/checkoff/internal/thread_local.rb
180
181
  - lib/checkoff/monkeypatches/resource_marshalling.rb
181
182
  - lib/checkoff/my_tasks.rb
182
183
  - lib/checkoff/portfolios.rb