checkoff 0.5.0 → 0.5.1
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/coverage/.last_run.json +1 -1
- data/lib/checkoff/sections.rb +26 -1
- data/lib/checkoff/version.rb +1 -1
- data/metrics/bigfiles_high_water_mark +1 -1
- data/metrics/rubocop_high_water_mark +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7b1f3d6529d89f32c97dd4d8a1f1b83d3bbcb49381878a0cfdc829d888f92f38
|
4
|
+
data.tar.gz: b8d51699db4f09ed1ccd73ef880599d6a0eb16c5db099f8f7a4f14b838986034
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35721e0504bafa225ba9ce30f5986bee48ebac72eb1b662517446b16336ec59299e135629eead8a65d1c949853795f14d4efe1a174d5584774b115eeafeab020
|
7
|
+
data.tar.gz: 79e75059b2a1268fc4cb5399d1d5455ef124203afe44d564aa2979ba9c631bedc30cd11c95bb1ee43f48884f39bbb77c033b587ee65e5a4694bf6b46bb793749
|
data/coverage/.last_run.json
CHANGED
data/lib/checkoff/sections.rb
CHANGED
@@ -23,6 +23,10 @@ module Checkoff
|
|
23
23
|
|
24
24
|
def file_task_by_section(by_section, task, project_gid)
|
25
25
|
membership = task.memberships.find { |m| m.project.gid == project_gid }
|
26
|
+
if membership.nil?
|
27
|
+
raise "Could not find task in project_gid #{project_gid}: #{task}"
|
28
|
+
end
|
29
|
+
|
26
30
|
current_section = membership.section.name
|
27
31
|
by_section[current_section] ||= []
|
28
32
|
by_section[current_section] << task
|
@@ -43,6 +47,27 @@ module Checkoff
|
|
43
47
|
by_section(active_tasks, project.gid)
|
44
48
|
end
|
45
49
|
|
50
|
+
def legacy_file_task_by_section(current_section, by_section, task)
|
51
|
+
if task.name =~ /:$/
|
52
|
+
current_section = task.name
|
53
|
+
by_section[current_section] = []
|
54
|
+
else
|
55
|
+
by_section[current_section] ||= []
|
56
|
+
by_section[current_section] << task
|
57
|
+
end
|
58
|
+
[current_section, by_section]
|
59
|
+
end
|
60
|
+
|
61
|
+
def legacy_by_section(tasks)
|
62
|
+
current_section = nil
|
63
|
+
by_section = {}
|
64
|
+
tasks.each do |task|
|
65
|
+
current_section, by_section =
|
66
|
+
legacy_file_task_by_section(current_section, by_section, task)
|
67
|
+
end
|
68
|
+
by_section
|
69
|
+
end
|
70
|
+
|
46
71
|
def tasks_by_section_for_project_and_assignee_status(project,
|
47
72
|
assignee_status)
|
48
73
|
raw_tasks = projects.tasks_from_project(project)
|
@@ -50,7 +75,7 @@ module Checkoff
|
|
50
75
|
projects.active_tasks(raw_tasks)
|
51
76
|
.group_by(&:assignee_status)
|
52
77
|
active_tasks = by_assignee_status[assignee_status]
|
53
|
-
|
78
|
+
legacy_by_section(active_tasks)
|
54
79
|
end
|
55
80
|
|
56
81
|
def project_or_raise(workspace_name, project_name)
|
data/lib/checkoff/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
409
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
1
|