checkoff 0.174.0 → 0.175.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/checkoff/internal/thread_local.rb +21 -0
- data/lib/checkoff/tasks.rb +6 -2
- data/lib/checkoff/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ad196605a8e7b9fb2a14a28040f8f7ee261f13aed5fa6aec8cfde037c174943d
|
|
4
|
+
data.tar.gz: da12083f2d30e975a21464877c8ad47b63c63ea25f05d5599a1944d03c889dbd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b5a8ff3e8f5598e6392c7528057e7d0077bf95f10cab13faaaff4e09a78be8582d64426f27262f01d2568159ef35213ad2fbc2a4b564144f464a9b112ec5aeac
|
|
7
|
+
data.tar.gz: 968285c9e60e3543ea60a858c0ab845e889b68fe41b2839f37a4163c893ef79449382299c2e413342740419b7812d7f70e2b3cd07d87f613fad7ad80f671e192
|
data/Gemfile.lock
CHANGED
|
@@ -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
|
data/lib/checkoff/tasks.rb
CHANGED
|
@@ -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
|
-
|
|
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)
|
data/lib/checkoff/version.rb
CHANGED
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.
|
|
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
|