checkoff 0.119.0 → 0.121.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/selector_classes/task.rb +8 -2
- data/lib/checkoff/timelines.rb +14 -1
- data/lib/checkoff/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: adb0889f94b23a7b635cd7cf9a2b45e8e927a23e0ab7086f986126807cc7fc87
|
4
|
+
data.tar.gz: ea19c8cc593548a8e26f53526c609635b4e889b7a5748eb7563e860ab5714401
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4032ebf8d43d16b13d5012e37ab3d979ad9bf7738a25e3c0e8d13abe7b49582d581995c71304538468974e3ccda121fad8b1c4f2189d553eca8447beff26fac
|
7
|
+
data.tar.gz: 2a7ba839c8334e58729a483b3014e92d67ea519bedf8c6b85d7e893fec59bd695f306463b2ccd92af039d17408faf24ca924422d57bfc58df1f3526a59b1d120
|
data/Gemfile.lock
CHANGED
@@ -265,11 +265,17 @@ module Checkoff
|
|
265
265
|
fn?(selector, FUNCTION_NAME)
|
266
266
|
end
|
267
267
|
|
268
|
+
def evaluate_arg?(_index)
|
269
|
+
false
|
270
|
+
end
|
271
|
+
|
268
272
|
# @param task [Asana::Resources::Task]
|
273
|
+
# @param limit_to_portfolio_name [String, nil]
|
269
274
|
#
|
270
275
|
# @return [Boolean]
|
271
|
-
def evaluate(task)
|
272
|
-
!@timelines.last_task_milestone_depends_on_this_task?(task
|
276
|
+
def evaluate(task, limit_to_portfolio_name = nil)
|
277
|
+
!@timelines.last_task_milestone_depends_on_this_task?(task,
|
278
|
+
limit_to_portfolio_name: limit_to_portfolio_name)
|
273
279
|
end
|
274
280
|
end
|
275
281
|
end
|
data/lib/checkoff/timelines.rb
CHANGED
@@ -27,17 +27,20 @@ module Checkoff
|
|
27
27
|
# @param workspaces [Checkoff::Workspaces]
|
28
28
|
# @param sections [Checkoff::Sections]
|
29
29
|
# @param tasks [Checkoff::Tasks]
|
30
|
+
# @param portfolios [Checkoff::Portfolios]
|
30
31
|
# @param clients [Checkoff::Clients]
|
31
32
|
# @param client [Asana::Client]
|
32
33
|
def initialize(config: Checkoff::Internal::ConfigLoader.load(:asana),
|
33
34
|
workspaces: Checkoff::Workspaces.new(config: config),
|
34
35
|
sections: Checkoff::Sections.new(config: config),
|
35
36
|
tasks: Checkoff::Tasks.new(config: config),
|
37
|
+
portfolios: Checkoff::Portfolios.new(config: config),
|
36
38
|
clients: Checkoff::Clients.new(config: config),
|
37
39
|
client: clients.client)
|
38
40
|
@workspaces = workspaces
|
39
41
|
@sections = sections
|
40
42
|
@tasks = tasks
|
43
|
+
@portfolios = portfolios
|
41
44
|
@client = client
|
42
45
|
end
|
43
46
|
|
@@ -59,9 +62,19 @@ module Checkoff
|
|
59
62
|
end
|
60
63
|
|
61
64
|
# @param task [Asana::Resources::Task]
|
62
|
-
|
65
|
+
# @param limit_to_portfolio_name [String, nil]
|
66
|
+
def last_task_milestone_depends_on_this_task?(task, limit_to_portfolio_name: nil)
|
67
|
+
unless limit_to_portfolio_name.nil?
|
68
|
+
limit_to_projects = @portfolios.projects_in_portfolio(@workspaces.default_workspace.name,
|
69
|
+
limit_to_portfolio_name)
|
70
|
+
end
|
71
|
+
|
63
72
|
all_dependent_task_gids = @tasks.all_dependent_tasks(task).map(&:gid)
|
64
73
|
task.memberships.all? do |membership_data|
|
74
|
+
unless limit_to_portfolio_name.nil?
|
75
|
+
project_gid = membership_data.fetch('project').fetch('gid')
|
76
|
+
next true unless limit_to_projects.map(&:gid).include? project_gid
|
77
|
+
end
|
65
78
|
# @type [Hash{String => String}]
|
66
79
|
section_data = membership_data.fetch('section')
|
67
80
|
# @type [String]
|
data/lib/checkoff/version.rb
CHANGED
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.
|
4
|
+
version: 0.121.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
|
+
date: 2023-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|