todo-jsonl 1.0.2 → 1.0.3
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/bin/todo.rb +6 -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: 40ddf723c9cd6d6f2bbfd6a2e79d793b2e4a9e566ab03decb98ffa2b26ab7aae
|
4
|
+
data.tar.gz: f503bf830367cca971c40625adbf5d2ac73f75055c0ec1aa7d5d76676b2a8dce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6938c3a54128c70a606db10c737a482bf9192d2f6dfa8f01c66e1805ec3af1f7da1ddba7f99769015e29349c63f153eb409fea3b68db5f68c8629ac99113dff
|
7
|
+
data.tar.gz: b63dd1f3e0f93b1ef2677040695b75d9b4ed373cda2243a0e08f60a5f4e4f77187f918d97ee4a54ccfb20467d58980c016af67ceec8e07ad69e8ba69dce95fe6
|
data/bin/todo.rb
CHANGED
@@ -306,7 +306,12 @@ class Todo
|
|
306
306
|
patterns ||= []
|
307
307
|
patterns += [':active'] if (patterns & [':active', ':done', ':blocked', ':started', ':new', ':all']).empty?
|
308
308
|
items = filter_tasks(tasks, patterns).sort_by do |num, task|
|
309
|
-
[
|
309
|
+
[
|
310
|
+
task[:priority] && task[:state] != 'done' ? 0 : 1,
|
311
|
+
ORDER[task[:state] || 'default'],
|
312
|
+
task[:state] != 'done' ? task[:due] || 'n/a' : task[:modified],
|
313
|
+
num
|
314
|
+
]
|
310
315
|
end
|
311
316
|
items.each do |num, task|
|
312
317
|
state = task[:state] || 'default'
|