plansheet 0.1.0 → 0.2.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/exe/plansheet +1 -1
- data/exe/plansheet-sorter +32 -0
- data/lib/plansheet/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ccfb13735d8626143db08903deac727870c66e6bd6fec21648fd70bf4050727
|
4
|
+
data.tar.gz: 847f0a0f78cdb0035ee03829f2761e3780fb6296738ac89bcca55635079b9e3a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34835dc03602c977afb76a4b5202f3ccf7322445086550d11d6506a4cce329f437d1f1a650b8500f46f6f81d72879f8a0ed506ed087411c68c1362b50523aeb8
|
7
|
+
data.tar.gz: ff0832cc110fa2f8ab2350867aa9c3642cc4eeb6ad9bea9cb620e69dceb4afe5f8e139d9c23f4d9bfd5270000ebc4f5885d1a6cce5ea5db2270edd3caf277428
|
data/Gemfile.lock
CHANGED
data/exe/plansheet
CHANGED
@@ -0,0 +1,32 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
# An ugly script to sort projects by status (and eventually priority)
|
5
|
+
|
6
|
+
require "yaml"
|
7
|
+
|
8
|
+
status_priority = {
|
9
|
+
"wip" => 1,
|
10
|
+
"ready" => 2,
|
11
|
+
"blocked" => 3,
|
12
|
+
"planning" => 4,
|
13
|
+
"idea" => 5,
|
14
|
+
"dropped" => 6,
|
15
|
+
"done" => 7
|
16
|
+
}
|
17
|
+
|
18
|
+
def project_priority(project)
|
19
|
+
if project["status"]
|
20
|
+
project["status"]
|
21
|
+
elsif project["tasks"]
|
22
|
+
"planning"
|
23
|
+
else
|
24
|
+
"idea"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
filename = ARGV.first
|
29
|
+
contents = YAML.load_file(filename)
|
30
|
+
sorted_hash = contents.sort_by { |project| status_priority[project_priority project] }
|
31
|
+
|
32
|
+
File.write(filename, YAML.dump(sorted_hash))
|
data/lib/plansheet/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: plansheet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Crosby
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-05-
|
11
|
+
date: 2022-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dc-kwalify
|
@@ -29,6 +29,7 @@ email:
|
|
29
29
|
- dave@dafyddcrosby.com
|
30
30
|
executables:
|
31
31
|
- plansheet
|
32
|
+
- plansheet-sorter
|
32
33
|
extensions: []
|
33
34
|
extra_rdoc_files: []
|
34
35
|
files:
|
@@ -40,6 +41,7 @@ files:
|
|
40
41
|
- README.md
|
41
42
|
- Rakefile
|
42
43
|
- exe/plansheet
|
44
|
+
- exe/plansheet-sorter
|
43
45
|
- lib/plansheet.rb
|
44
46
|
- lib/plansheet/version.rb
|
45
47
|
- project.schema.yaml
|