plansheet 0.12.3 → 0.13.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 72d3799f5166153c1775c768f0734cf0e390adfd80893ef1ae1aa710b7888b0b
4
- data.tar.gz: a18fd6eeb6a787438ddcdff1e6b0f25a17688f05a7bccff82495520517754b19
3
+ metadata.gz: 76e5120430c540166b342a58cf0a0c07dfaf773d0a46b1dcd05614be677fe1a6
4
+ data.tar.gz: 83eb24c7811f8e1e49d8f7f79a059c1451673907460203d95a5c28e98fbc74c2
5
5
  SHA512:
6
- metadata.gz: c97c83093f8e70948a96392b5d02329128c5f1031a0645b35b9c42bebeabb82192207c3ff71671081792ef3d61e9277c219984f0f558a7b54c1fac632fa68445
7
- data.tar.gz: 6723401a02c2086976e1002e4f8d08855f25726d1610fd9f4e593ae3ceac707c47bb6a1114ec1b40f707295c1c627fd5b72cce5ebe45f84b78b24d8304107bcf
6
+ metadata.gz: 71d3b9dad2c16601ef4472805c282cbfced288e0fc1cee42b0b2e6cb508c5aa255a688c3301fbdee38ae5188f36a2d65cbee2ebc9aa3290771a8f2a2f84854ac
7
+ data.tar.gz: bc7d994b5d320c0c9f7ed53ca625afb6f586f228a48f16e2e9f1b2f392cae4cb1e1cef45ddc305069fb06a59a8e1fa9cf2324c1dc4a322e411f801d5802c41fe
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- plansheet (0.12.3)
4
+ plansheet (0.13.2)
5
5
  dc-kwalify (~> 1.0)
6
6
 
7
7
  GEM
@@ -2,6 +2,7 @@
2
2
 
3
3
  require "yaml"
4
4
  require "date"
5
+ require "pathname"
5
6
 
6
7
  module Plansheet
7
8
  # Once there's some stability in plansheet and dc-kwalify, will pre-load this
@@ -16,6 +17,10 @@ module Plansheet
16
17
  desc: Project name
17
18
  type: str
18
19
  required: yes
20
+ "namespace":
21
+ desc: Namespace of a group of projects (for organizing)
22
+ type: str
23
+ required: yes
19
24
  "priority":
20
25
  desc: Project priority
21
26
  type: str
@@ -123,7 +128,16 @@ module Plansheet
123
128
  end
124
129
 
125
130
  validate_schema
126
- @projects = @raw.map { |proj| Project.new proj }
131
+ @raw ||= []
132
+ @projects = @raw.map do |proj|
133
+ proj["namespace"] = namespace
134
+ Project.new proj
135
+ end
136
+ end
137
+
138
+ def namespace
139
+ # TODO: yikes
140
+ ::Pathname.new(@path).basename.to_s.gsub(/\.yml$/, "")
127
141
  end
128
142
 
129
143
  def validate_schema
@@ -48,7 +48,8 @@ module Plansheet
48
48
  status
49
49
  ].map { |x| "compare_#{x}".to_sym }.freeze
50
50
  # NOTE: The order of these affects presentation!
51
- STRING_PROPERTIES = %w[priority status location notes time_estimate frequency lead_time].freeze
51
+ # namespace is derived from file name
52
+ STRING_PROPERTIES = %w[namespace priority status location notes time_estimate frequency lead_time].freeze
52
53
  DATE_PROPERTIES = %w[due defer completed_on created_on starts_on last_done last_reviewed].freeze
53
54
  ARRAY_PROPERTIES = %w[dependencies externals urls tasks done tags].freeze
54
55
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Plansheet
4
- VERSION = "0.12.3"
4
+ VERSION = "0.13.2"
5
5
  end
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.12.3
4
+ version: 0.13.2
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-06-06 00:00:00.000000000 Z
11
+ date: 2022-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dc-kwalify