Created
November 9, 2008 08:52
-
-
Save chrislloyd/23225 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'colored' | |
require 'view_helper' | |
module Styles | |
def release(id, name, number, desc) | |
print_indent | |
number = number ? "(#{number})" : '(?)' | |
println __, id.yellow, __, name.bold, __, number, __, desc.grey | |
end | |
def issue(id,name) | |
print_indent | |
id = "%4s"%id | |
println __, id.yellow, __, name | |
end | |
end | |
Viewer.send(:include, Styles) | |
##### | |
indent do |i| | |
i.release('vynh','Beta 1','0.9','Pretty much feature complete. Lacking integration testing.') | |
i.issue('p34d','Push should act as an autosave.') | |
i.issue('6vrd','focus unassigned command') | |
i.issue('n45r','indendentation does not work properly when focused') | |
i.issue('y25q','scenario: single issue, no children') | |
end | |
indent(1) do |i| | |
i.release('vynh','Auto Git','0.8.4','Have all syncing and git commands done automatically.') | |
i.issue('p4d','Push should act as an autosave.') | |
i.issue('6','focus unassigned command') | |
i.issue('5r','indendentation does not work properly when focused') | |
i.issue('25q','scenario: single issue, no children') | |
end | |
indent(1) do |i| | |
i.release('vynh','Auto Git','0.8.3','Have all syncing and git commands done automatically.') | |
i.issue('p34d','Push should act as an autosave.') | |
i.issue('6d','focus unassigned command') | |
i.issue('n5r','indendentation does not work properly when focused') | |
i.issue('y25q','scenario: single issue, no children') | |
end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class String; def grey; "\e[90m#{self}\e[0m"; end; end | |
def println(*args); print *args; puts; end | |
def __(size=1); ' '*(2*size); end | |
def indent(size=0) | |
yield Viewer.new(size) | |
puts | |
end | |
class Viewer | |
def initialize(indent=0) | |
@indent = indent | |
end | |
def print_indent; print __(@indent); end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment