lib/trackler/track.rb in trackler-1.0.2.1 vs lib/trackler/track.rb in trackler-1.0.3.0
- old
+ new
@@ -31,10 +31,18 @@
def active?
!!config["active"]
end
+ def upcoming?
+ !active? && problems.length > 0
+ end
+
+ def planned?
+ !active? && problems.length.zero?
+ end
+
def implementations
@implementations ||= Implementations.new(id, repository, problems, root)
end
def checklist_issue
@@ -123,21 +131,21 @@
def config_filename
File.join(dir, "config.json")
end
def document_contents(topic)
- filename = document_fiename(topic)
+ filename = document_filename(topic)
case filename
when /\.md$/
File.read(filename)
when /\.org$/
Orgmode::Parser.new(File.read(filename)).to_markdown
else
''
end
end
- def document_fiename(topic)
+ def document_filename(topic)
path = File.join(dir, "docs", topic.upcase)
Dir.glob("%s.*" % path).sort.first
end
end
end