cards 0.6 → 0.7

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.
data/CHANGES.txt CHANGED
@@ -1,5 +1,10 @@
1
1
  = Change Log
2
2
 
3
+ == Version 0.7
4
+
5
+ * fixing the dot writer
6
+ * adding examples of csv -> dot and numbers -> omnigraffle
7
+
3
8
  == Version 0.6
4
9
 
5
10
  * moved main code to win/ subdirectory and moved mac branch to be main branch
data/Manifest.txt CHANGED
@@ -2,6 +2,17 @@ CHANGES.txt
2
2
  Manifest.txt
3
3
  README.txt
4
4
  Rakefile
5
+ examples/csv to dot/Stories.csv
6
+ examples/csv to dot/Stories.dot
7
+ examples/csv to dot/generate_card_walls
8
+ examples/numbers to omnigraffle/Voting Example.numbers/Contents/PkgInfo
9
+ examples/numbers to omnigraffle/Voting Example.numbers/QuickLook/Thumbnail.jpg
10
+ examples/numbers to omnigraffle/Voting Example.numbers/document-thumbnail.tiff
11
+ examples/numbers to omnigraffle/Voting Example.numbers/index.xml.gz
12
+ examples/numbers to omnigraffle/Voting Example/Cards-Goals.csv
13
+ examples/numbers to omnigraffle/Voting Example/Cards-Stories.csv
14
+ examples/numbers to omnigraffle/Voting Example/Cards-Workflow.csv
15
+ examples/numbers to omnigraffle/generate_card_walls
5
16
  lib/cards.rb
6
17
  lib/cards/builder.rb
7
18
  lib/cards/card.rb
@@ -0,0 +1,16 @@
1
+ Role,Task,Story,Note,Estimate
2
+ Voter,Vote on question,Ability to see question,,1
3
+ ,,Ability to see choices,,1
4
+ ,,Ability to choose,This is the server trip,2
5
+ ,Navigate questions,Ability to continue to next / prev,,1
6
+ ,,Ability to see list of questions,This includes ability to jump to that question,4
7
+ ,Submit,Ability to return to new screen,,1
8
+ Admin,Create questions,Ability to enter question,,4
9
+ ,,Ability to reorder question,,4
10
+ ,,Ability to enter multiple choice question,,1
11
+ ,,Ability to enter text question,,1
12
+ ,,Ability to enter long text question,,1
13
+ ,,Ability to enter list question,,2
14
+ ,Compile votes,Ability to see results in spreadsheet,,4
15
+ ,,Ability to see summary of results,This includes percentage of each question answering which answer,2
16
+ ,Announce winners,,,
@@ -0,0 +1,63 @@
1
+ digraph G {
2
+ graph [nodesep=.1, ranksep=.1, ordering=out];
3
+ node [shape=box, color=black, style=filled, width=2, height=1.2, fixedsize=true, labeljust="l"];
4
+ edge [style=invis, weight=1];
5
+ card_0_0 [label="Voter",fillcolor=lightblue];
6
+ card_0_1 [label="Vote on question",fillcolor=pink];
7
+ card_0_2 [label="Ability to see\nquestion 1",fillcolor=lightyellow];
8
+ card_0_3 [label="Ability to see\nchoices 1",fillcolor=lightyellow];
9
+ card_0_4 [label="Ability to choose\nThis is the server\ntrip 2",fillcolor=lightyellow];
10
+ card_1_1 [label="Navigate questions",fillcolor=pink];
11
+ card_1_2 [label="Ability to continue\nto next / prev 1",fillcolor=lightyellow];
12
+ card_1_3 [label="Ability to see list\nof questions This\nincludes ability to\njump to that\nquestion 4",fillcolor=lightyellow];
13
+ card_2_1 [label="Submit",fillcolor=pink];
14
+ card_2_2 [label="Ability to return to\nnew screen 1",fillcolor=lightyellow];
15
+ card_3_0 [label="Admin",fillcolor=lightblue];
16
+ card_3_1 [label="Create questions",fillcolor=pink];
17
+ card_3_2 [label="Ability to enter\nquestion 4",fillcolor=lightyellow];
18
+ card_3_3 [label="Ability to reorder\nquestion 4",fillcolor=lightyellow];
19
+ card_3_4 [label="Ability to enter\nmultiple choice\nquestion 1",fillcolor=lightyellow];
20
+ card_3_5 [label="Ability to enter\ntext question 1",fillcolor=lightyellow];
21
+ card_4_2 [label="Ability to enter\nlong text question\n1",fillcolor=lightyellow];
22
+ card_4_3 [label="Ability to enter\nlist question 2",fillcolor=lightyellow];
23
+ card_5_1 [label="Compile votes",fillcolor=pink];
24
+ card_5_2 [label="Ability to see\nresults in\nspreadsheet 4",fillcolor=lightyellow];
25
+ card_5_3 [label="Ability to see\nsummary of results\nThis includes\npercentage of each\nquestion answering\nwhich answer 2",fillcolor=lightyellow];
26
+ card_6_1 [label="Announce winners",fillcolor=pink];
27
+ gap_1_0 [style=invis];
28
+ gap_2_0 [style=invis];
29
+ gap_4_0 [style=invis];
30
+ gap_4_1 [style=invis];
31
+ gap_5_0 [style=invis];
32
+ gap_6_0 [style=invis];
33
+ {rank=same; card_0_0; gap_1_0; gap_2_0; card_3_0; gap_4_0; gap_5_0; gap_6_0};
34
+ {rank=same; card_0_1; card_1_1; card_2_1; card_3_1; gap_4_1; card_5_1; card_6_1};
35
+ {rank=same; card_0_2; card_1_2; card_2_2; card_3_2; card_4_2; card_5_2};
36
+ card_0_0 -> gap_1_0;
37
+ gap_1_0 -> gap_2_0;
38
+ gap_2_0 -> card_3_0;
39
+ card_3_0 -> gap_4_0;
40
+ gap_4_0 -> gap_5_0;
41
+ gap_5_0 -> gap_6_0;
42
+ card_0_0 -> card_0_1;
43
+ card_0_1 -> card_0_2;
44
+ card_0_2 -> card_0_3;
45
+ card_0_3 -> card_0_4;
46
+ gap_1_0 -> card_1_1;
47
+ card_1_1 -> card_1_2;
48
+ card_1_2 -> card_1_3;
49
+ gap_2_0 -> card_2_1;
50
+ card_2_1 -> card_2_2;
51
+ card_3_0 -> card_3_1;
52
+ card_3_1 -> card_3_2;
53
+ card_3_2 -> card_3_3;
54
+ card_3_3 -> card_3_4;
55
+ card_3_4 -> card_3_5;
56
+ gap_4_0 -> gap_4_1;
57
+ gap_4_1 -> card_4_2;
58
+ card_4_2 -> card_4_3;
59
+ gap_5_0 -> card_5_1;
60
+ card_5_1 -> card_5_2;
61
+ card_5_2 -> card_5_3;
62
+ gap_6_0 -> card_6_1;
63
+ }
@@ -0,0 +1,25 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rubygems'
4
+ require 'cards'
5
+
6
+ include Cards
7
+
8
+ def csv_file(name)
9
+ CsvParser.new(File.dirname(__FILE__) + "/#{name}.csv")
10
+ end
11
+
12
+ CardWall.writer = DotWriter
13
+
14
+ CardWall.from csv_file("Stories") do
15
+ row :role
16
+ row :task
17
+ column :story, :wrap_at => 4 do |card, row|
18
+ card.name << "\n\n#{row[:note]}" unless row[:note].blank?
19
+ card.name << "\n\n#{row[:estimate]}" unless row[:estimate].blank?
20
+ end
21
+ end
22
+ puts "generated Stories.dot"
23
+
24
+ # uncomment this line if you want to see the generated file
25
+ # `open "#{File.dirname(__FILE__)}/Stories.dot"`
@@ -0,0 +1,7 @@
1
+ Goal,Note
2
+ Speed,
3
+ Efficiency,For voter & admin
4
+ Usability,
5
+ Security,
6
+ Traceability,
7
+ Durability,We probably need to store results in a separate location
@@ -0,0 +1,16 @@
1
+ Role,Task,Story,Note,Estimate
2
+ Voter,Vote on question,Ability to see question,,1
3
+ ,,Ability to see choices,,1
4
+ ,,Ability to choose,This is the server trip,2
5
+ ,Navigate questions,Ability to continue to next / prev,,1
6
+ ,,Ability to see list of questions,This includes ability to jump to that question,4
7
+ ,Submit,Ability to return to new screen,,1
8
+ Admin,Create questions,Ability to enter question,,4
9
+ ,,Ability to reorder question,,4
10
+ ,,Ability to enter multiple choice question,,1
11
+ ,,Ability to enter text question,,1
12
+ ,,Ability to enter long text question,,1
13
+ ,,Ability to enter list question,,2
14
+ ,Compile votes,Ability to see results in spreadsheet,,4
15
+ ,,Ability to see summary of results,This includes percentage of each question answering which answer,2
16
+ ,Announce winners,,,
@@ -0,0 +1,7 @@
1
+ Role,Task
2
+ Voter,Vote on question
3
+ ,Navigate questions
4
+ ,Submit
5
+ Admin,Create questions
6
+ ,Compile votes
7
+ ,Announce winners
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env ruby
2
+ # this doesn't actually read the numbers document, you must export csv from numbers as we've done here,
3
+ # the csv can then be parsed and turned into omnigraffle
4
+
5
+ require 'rubygems'
6
+ require 'cards'
7
+ include Cards
8
+
9
+ def csv_file(name)
10
+ CsvParser.new(File.dirname(__FILE__) + "/Voting Example/Cards-#{name}.csv")
11
+ end
12
+
13
+ CardWall.colors[:goal] = :green
14
+ CardWall.writer = GraffleWriter
15
+
16
+ CardWall.from csv_file("Goals") do
17
+ column :goal
18
+ end
19
+
20
+ CardWall.from csv_file("Workflow") do
21
+ row :role
22
+ column :task, :wrap_at => 5
23
+ end
24
+
25
+ CardWall.from csv_file("Stories") do
26
+ row :role
27
+ row :task
28
+ column :story, :wrap_at => 4 do |card, row|
29
+ card.name = " #{row[:estimate]}\n\n#{card.name}" unless row[:estimate].blank?
30
+ card.name << "\n\n#{row[:note]}" unless row[:note].blank?
31
+ end
32
+ end
@@ -66,6 +66,7 @@ module Cards
66
66
  def show(output)
67
67
  @root.layout
68
68
  @root.visit {|card| output.create_card(card.name, card.color, card.cell) unless card == @root}
69
+ output.done
69
70
  end
70
71
 
71
72
  class DefinitionContext
@@ -1,7 +1,7 @@
1
1
  module Cards
2
2
  class DotWriter
3
- def initialize(file)
4
- @file = file
3
+ def initialize(file_name)
4
+ @file = File.open(file_name + ".dot", "w")
5
5
  @node_color = {:green => "darkseagreen1", :blue => "lightblue", :red => "pink", :yellow => "lightyellow"}
6
6
  @nodes = []
7
7
 
@@ -24,6 +24,7 @@ module Cards
24
24
  create_ranks
25
25
  create_edges
26
26
  puts "}"
27
+ @file.close
27
28
  end
28
29
 
29
30
  private
@@ -11,6 +11,9 @@ module Cards
11
11
  def create_card(name, color, cell)
12
12
  (@rows[cell[1]] ||= [])[cell[0]] = name
13
13
  end
14
+
15
+ def done
16
+ end
14
17
 
15
18
  def to_s
16
19
  @rows.map{|row| row.map{|val| val ? val : " " }.join }.join("\n")
data/lib/cards.rb CHANGED
@@ -13,5 +13,5 @@ require 'cards/master_story_list'
13
13
  require 'cards/tracker_csv'
14
14
 
15
15
  module Cards
16
- VERSION = "0.6"
16
+ VERSION = "0.7"
17
17
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cards
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.6"
4
+ version: "0.7"
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Stell-Smith
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-06-05 00:00:00 -07:00
12
+ date: 2008-06-06 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -36,6 +36,17 @@ files:
36
36
  - Manifest.txt
37
37
  - README.txt
38
38
  - Rakefile
39
+ - examples/csv to dot/Stories.csv
40
+ - examples/csv to dot/Stories.dot
41
+ - examples/csv to dot/generate_card_walls
42
+ - examples/numbers to omnigraffle/Voting Example.numbers/Contents/PkgInfo
43
+ - examples/numbers to omnigraffle/Voting Example.numbers/QuickLook/Thumbnail.jpg
44
+ - examples/numbers to omnigraffle/Voting Example.numbers/document-thumbnail.tiff
45
+ - examples/numbers to omnigraffle/Voting Example.numbers/index.xml.gz
46
+ - examples/numbers to omnigraffle/Voting Example/Cards-Goals.csv
47
+ - examples/numbers to omnigraffle/Voting Example/Cards-Stories.csv
48
+ - examples/numbers to omnigraffle/Voting Example/Cards-Workflow.csv
49
+ - examples/numbers to omnigraffle/generate_card_walls
39
50
  - lib/cards.rb
40
51
  - lib/cards/builder.rb
41
52
  - lib/cards/card.rb