checkoff 0.3.2 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/coverage/.last_run.json +1 -1
- data/lib/checkoff/projects.rb +3 -2
- data/lib/checkoff/sections.rb +9 -15
- data/lib/checkoff/version.rb +1 -1
- data/metrics/bigfiles_high_water_mark +1 -1
- data/metrics/punchlist_high_water_mark +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: abb481b28efc4dc6131fdc028fe0bffb8c441dc92c95474e23455f7a1fed8ede
|
4
|
+
data.tar.gz: 98e270c7be0078e5efa19425affc4692c3343d093e5ab96d027eb5b643d8b141
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c6ddd7d5092290e0fbc953274f98c2b0b68262aef2201a378fa71a947152ee3c0d331c730127e5ba05616e7e9afc3261324a5d0b6babbaf63c4bd96115fcfa2
|
7
|
+
data.tar.gz: 3ba297866e0c3970e12a8f31b796359f58b93d02a2d7aae5aef04dd071e68a5d4d41a4c5c4e8b3ec5f38123b0f7072f1dd2ee98217fae9bd3d1a6fb2aa843012
|
data/coverage/.last_run.json
CHANGED
data/lib/checkoff/projects.rb
CHANGED
@@ -77,7 +77,8 @@ module Checkoff
|
|
77
77
|
{
|
78
78
|
per_page: 100,
|
79
79
|
options: {
|
80
|
-
fields: %w[name completed_at due_at due_on assignee_status tags
|
80
|
+
fields: %w[name completed_at due_at due_on assignee_status tags
|
81
|
+
memberships.project.gid memberships.section.name],
|
81
82
|
},
|
82
83
|
}
|
83
84
|
end
|
@@ -87,7 +88,7 @@ module Checkoff
|
|
87
88
|
options[:completed_since] = '9999-12-01' if only_uncompleted
|
88
89
|
options[:project] = project.gid
|
89
90
|
options[:options][:fields] += extra_fields
|
90
|
-
client.tasks.find_all(options).to_a
|
91
|
+
client.tasks.find_all(**options).to_a
|
91
92
|
end
|
92
93
|
cache_method :tasks_from_project, SHORT_CACHE_TIME
|
93
94
|
end
|
data/lib/checkoff/sections.rb
CHANGED
@@ -21,23 +21,17 @@ module Checkoff
|
|
21
21
|
|
22
22
|
def_delegators :@projects, :client
|
23
23
|
|
24
|
-
def file_task_by_section(
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
by_section[current_section] ||= []
|
30
|
-
by_section[current_section] << task
|
31
|
-
end
|
32
|
-
[current_section, by_section]
|
24
|
+
def file_task_by_section(by_section, task, project_gid)
|
25
|
+
membership = task.memberships.find { |m| m.project.gid == project_gid }
|
26
|
+
current_section = membership.section.name
|
27
|
+
by_section[current_section] ||= []
|
28
|
+
by_section[current_section] << task
|
33
29
|
end
|
34
30
|
|
35
|
-
def by_section(tasks)
|
36
|
-
current_section = nil
|
31
|
+
def by_section(tasks, project_gid)
|
37
32
|
by_section = {}
|
38
33
|
tasks.each do |task|
|
39
|
-
|
40
|
-
by_section, task)
|
34
|
+
file_task_by_section(by_section, task, project_gid)
|
41
35
|
end
|
42
36
|
by_section
|
43
37
|
end
|
@@ -46,7 +40,7 @@ module Checkoff
|
|
46
40
|
def tasks_by_section_for_project(project)
|
47
41
|
raw_tasks = projects.tasks_from_project(project)
|
48
42
|
active_tasks = projects.active_tasks(raw_tasks)
|
49
|
-
by_section(active_tasks)
|
43
|
+
by_section(active_tasks, project.gid)
|
50
44
|
end
|
51
45
|
|
52
46
|
def tasks_by_section_for_project_and_assignee_status(project,
|
@@ -56,7 +50,7 @@ module Checkoff
|
|
56
50
|
projects.active_tasks(raw_tasks)
|
57
51
|
.group_by(&:assignee_status)
|
58
52
|
active_tasks = by_assignee_status[assignee_status]
|
59
|
-
by_section(active_tasks)
|
53
|
+
by_section(active_tasks, project.gid)
|
60
54
|
end
|
61
55
|
|
62
56
|
def project_or_raise(workspace_name, project_name)
|
data/lib/checkoff/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
390
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3
|
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.4.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: 2020-10-
|
11
|
+
date: 2020-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|