saga 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.kick +7 -0
- data/VERSION +1 -1
- data/design/requirements.html +83 -0
- data/design/requirements.txt +16 -0
- data/lib/saga/planning.rb +7 -11
- data/saga.gemspec +15 -21
- data/templates/default/document.erb +1 -1
- data/test/cases/document.txt +2 -0
- data/test/fixtures/document.erb +1 -1
- data/test/saga_formatter_spec.rb +7 -1
- data/test/saga_planning_spec.rb +15 -13
- metadata +7 -7
data/.kick
CHANGED
@@ -15,4 +15,11 @@ process do |files|
|
|
15
15
|
"test/saga_tokenizer_spec.rb"
|
16
16
|
end
|
17
17
|
end)
|
18
|
+
files.take_and_map do |file|
|
19
|
+
case file
|
20
|
+
when 'design/requirements.txt'
|
21
|
+
log `./bin/saga design/requirements.txt > design/requirements.html`
|
22
|
+
files.delete(file)
|
23
|
+
end
|
24
|
+
end
|
18
25
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.8.
|
1
|
+
0.8.1
|
@@ -0,0 +1,83 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
4
|
+
<head>
|
5
|
+
<title>Requirements Saga · Fingertips</title>
|
6
|
+
<link rel="stylesheet" type="text/css" media="all" href="http://resources.fngtps.com/2006/doc.css" />
|
7
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
8
|
+
<style type="text/css">
|
9
|
+
td.id { text-align: right !important; }
|
10
|
+
td.id a { color: #000; }
|
11
|
+
table.review { border-bottom: 1px solid #ccc; margin-top: -1em;}
|
12
|
+
table.review td { padding: .25em 0; vertical-align: top; text-align: left; min-width: 1em; }
|
13
|
+
table.review th { padding: .25em 0; vertical-align: top; text-align: right; }
|
14
|
+
table.review td.story { width: 100%; border-top: 1px solid #ccc; }
|
15
|
+
table.review td.meta { padding-left: 1em; border-top: 1px solid #ccc; text-align: right !important; white-space: nowrap; }
|
16
|
+
table.review td.notes { color: #666; padding: 0 0 .25em 0; font-style: italic; }
|
17
|
+
table.review .dropped { color: #666; text-decoration: line-through; }
|
18
|
+
table.review .done { color: #666; background-color: #f0f8ff; }
|
19
|
+
table.review tr.nested td.story { padding-left: 1em; }
|
20
|
+
</style>
|
21
|
+
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
|
22
|
+
</head>
|
23
|
+
<body id="doc" class="requirements">
|
24
|
+
|
25
|
+
<p id="logo"><img src="http://resources.fngtps.com/2006/print-logo.png" alt="Fingertips design & development" /> </p>
|
26
|
+
|
27
|
+
<h1>Requirements <br />Saga</h1>
|
28
|
+
|
29
|
+
<p class="author">Manfred Stienstra, <a href="mailto:manfred@fngtps.com">manfred@fngtps.com</a></p>
|
30
|
+
|
31
|
+
|
32
|
+
<h2>User stories</h2>
|
33
|
+
<table class="review">
|
34
|
+
<tr>
|
35
|
+
<th></th>
|
36
|
+
<th title="id">#</th>
|
37
|
+
<th title="Estimate">e</th>
|
38
|
+
<th title="Iteration">i</th>
|
39
|
+
<th title="Status">s</th>
|
40
|
+
</tr>
|
41
|
+
<tr class="done" id="story1">
|
42
|
+
<td class="story">As a writer I would like to write stories so developers can implement them.</td>
|
43
|
+
<td class="meta id">1</td>
|
44
|
+
<td class="meta estimate"></td>
|
45
|
+
<td class="meta iteration"></td>
|
46
|
+
<td class="meta status">done</td>
|
47
|
+
</tr>
|
48
|
+
<tr class="todo" id="story2">
|
49
|
+
<td class="story">As a writer I would like to add priorities to my stories so that I can show their importance.</td>
|
50
|
+
<td class="meta id">2</td>
|
51
|
+
<td class="meta estimate"></td>
|
52
|
+
<td class="meta iteration"></td>
|
53
|
+
<td class="meta status">todo</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="todo" id="story3">
|
56
|
+
<td class="story">As a writer I would like to order my stories so that I can easily find the story I need.</td>
|
57
|
+
<td class="meta id">3</td>
|
58
|
+
<td class="meta estimate"></td>
|
59
|
+
<td class="meta iteration"></td>
|
60
|
+
<td class="meta status">todo</td>
|
61
|
+
</tr>
|
62
|
+
<tr class="todo">
|
63
|
+
<td class="notes" colspan="5">Improve the HTML template to allow ordering by ID, estimate, iteration, status, and priority.</td>
|
64
|
+
</tr>
|
65
|
+
<tr class="todo" id="story4">
|
66
|
+
<td class="story">As a writer I would like to ignore certain themes during autofill and planning so that I can specify non-functional stories.</td>
|
67
|
+
<td class="meta id">4</td>
|
68
|
+
<td class="meta estimate"></td>
|
69
|
+
<td class="meta iteration"></td>
|
70
|
+
<td class="meta status">todo</td>
|
71
|
+
</tr>
|
72
|
+
<tr class="todo">
|
73
|
+
<td class="notes" colspan="5">saga -n 'Non-functional' -n 'Optional' autofill design/requirements.txt</td>
|
74
|
+
</tr>
|
75
|
+
</table>
|
76
|
+
|
77
|
+
<h2>Roles</h2>
|
78
|
+
<dl>
|
79
|
+
<dt>Writer</dt>
|
80
|
+
<dd>Someone who is responsible for writing down requirements in the form of stories</dd>
|
81
|
+
</dl>
|
82
|
+
</body>
|
83
|
+
</html>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
Requirements Saga
|
2
|
+
|
3
|
+
- Manfred Stienstra, manfred@fngtps.com
|
4
|
+
|
5
|
+
USER STORIES
|
6
|
+
|
7
|
+
As a writer I would like to write stories so developers can implement them. - #1 done
|
8
|
+
As a writer I would like to add priorities to my stories so that I can show their importance. - #2 todo
|
9
|
+
As a writer I would like to order my stories so that I can easily find the story I need. - #3 todo
|
10
|
+
Improve the HTML template to allow ordering by ID, estimate, iteration, status, and priority.
|
11
|
+
As a writer I would like to ignore certain themes during autofill and planning so that I can specify non-functional stories. - #4 todo
|
12
|
+
saga -n 'Non-functional' -n 'Optional' autofill design/requirements.txt
|
13
|
+
|
14
|
+
ROLES
|
15
|
+
|
16
|
+
Writer: Someone who is responsible for writing down requirements in the form of stories
|
data/lib/saga/planning.rb
CHANGED
@@ -7,7 +7,7 @@ module Saga
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def iterations
|
10
|
-
@document.
|
10
|
+
@document.stories_as_flat_list.inject({}) do |properties, story|
|
11
11
|
if story[:estimate]
|
12
12
|
iteration = story[:iteration] || -1
|
13
13
|
properties[iteration] ||= BLANK_ITERATION.dup
|
@@ -29,22 +29,18 @@ module Saga
|
|
29
29
|
|
30
30
|
def unestimated
|
31
31
|
unestimated = 0
|
32
|
-
@document.
|
33
|
-
|
34
|
-
unestimated += 1 unless story[:estimate]
|
35
|
-
end
|
32
|
+
@document.stories_as_flat_list.each do |story|
|
33
|
+
unestimated += 1 unless story[:estimate]
|
36
34
|
end
|
37
35
|
unestimated
|
38
36
|
end
|
39
37
|
|
40
38
|
def statusses
|
41
39
|
statusses = {}
|
42
|
-
@document.
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
statusses[story[:status]] += self.class.estimate_to_hours(story[:estimate])
|
47
|
-
end
|
40
|
+
@document.stories_as_flat_list.each do |story|
|
41
|
+
if story[:estimate] and story[:status]
|
42
|
+
statusses[story[:status]] ||= 0
|
43
|
+
statusses[story[:status]] += self.class.estimate_to_hours(story[:estimate])
|
48
44
|
end
|
49
45
|
end
|
50
46
|
statusses
|
data/saga.gemspec
CHANGED
@@ -4,15 +4,15 @@
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
|
-
s.name =
|
8
|
-
s.version = "0.
|
7
|
+
s.name = "saga"
|
8
|
+
s.version = "0.8.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = [
|
12
|
-
s.date =
|
13
|
-
s.description =
|
14
|
-
s.email =
|
15
|
-
s.executables = [
|
11
|
+
s.authors = ["Manfred Stienstra"]
|
12
|
+
s.date = "2012-06-18"
|
13
|
+
s.description = "Saga is a tool to convert stories syntax to a nicely formatted document."
|
14
|
+
s.email = "manfred@fngtps.com"
|
15
|
+
s.executables = ["saga"]
|
16
16
|
s.extra_rdoc_files = [
|
17
17
|
"LICENSE",
|
18
18
|
"README.rdoc"
|
@@ -24,6 +24,8 @@ Gem::Specification.new do |s|
|
|
24
24
|
"Rakefile",
|
25
25
|
"VERSION",
|
26
26
|
"bin/saga",
|
27
|
+
"design/requirements.html",
|
28
|
+
"design/requirements.txt",
|
27
29
|
"lib/saga.rb",
|
28
30
|
"lib/saga/document.rb",
|
29
31
|
"lib/saga/formatter.rb",
|
@@ -39,6 +41,8 @@ Gem::Specification.new do |s|
|
|
39
41
|
"templates/saga/helpers.rb",
|
40
42
|
"test/cases/author.txt",
|
41
43
|
"test/cases/definition.txt",
|
44
|
+
"test/cases/document.txt",
|
45
|
+
"test/cases/nested_stories.txt",
|
42
46
|
"test/cases/story.txt",
|
43
47
|
"test/cases/story_attributes.txt",
|
44
48
|
"test/fixtures/document.erb",
|
@@ -51,20 +55,10 @@ Gem::Specification.new do |s|
|
|
51
55
|
"test/saga_tokenizer_spec.rb",
|
52
56
|
"test/spec_helper.rb"
|
53
57
|
]
|
54
|
-
s.homepage =
|
55
|
-
s.require_paths = [
|
56
|
-
s.rubygems_version =
|
57
|
-
s.summary =
|
58
|
-
s.test_files = [
|
59
|
-
"test/saga_document_spec.rb",
|
60
|
-
"test/saga_formatter_spec.rb",
|
61
|
-
"test/saga_parser_spec.rb",
|
62
|
-
"test/saga_planning_spec.rb",
|
63
|
-
"test/saga_runner_spec.rb",
|
64
|
-
"test/saga_spec.rb",
|
65
|
-
"test/saga_tokenizer_spec.rb",
|
66
|
-
"test/spec_helper.rb"
|
67
|
-
]
|
58
|
+
s.homepage = "http://fingertips.github.com"
|
59
|
+
s.require_paths = ["lib"]
|
60
|
+
s.rubygems_version = "1.8.18"
|
61
|
+
s.summary = "Saga is a tool to convert stories syntax to a nicely formatted document."
|
68
62
|
|
69
63
|
if s.respond_to? :specification_version then
|
70
64
|
s.specification_version = 3
|
data/test/cases/document.txt
CHANGED
data/test/fixtures/document.erb
CHANGED
data/test/saga_formatter_spec.rb
CHANGED
@@ -9,7 +9,7 @@ describe "Formatter" do
|
|
9
9
|
{:name => 'Manfred Stienstra', :email => 'manfred@fngtps.com', :company => 'Fingertips', :website => 'http://www.fngtps.com'}
|
10
10
|
]
|
11
11
|
@document.introduction = [
|
12
|
-
'A web service for interfacing with the service.', 'Exposes a public API to the application.'
|
12
|
+
'A web service for interfacing with the service.', 'Exposes a public API to the application.', 'Uses <20> levels of redirection.'
|
13
13
|
]
|
14
14
|
@document.stories = [
|
15
15
|
['General', [
|
@@ -29,6 +29,12 @@ describe "Formatter" do
|
|
29
29
|
html.should.include('receive a certificate')
|
30
30
|
end
|
31
31
|
|
32
|
+
it "include the escaped introduction in the HTML output" do
|
33
|
+
html = Saga::Formatter.format(@document)
|
34
|
+
html.should.include('<p>Uses <20> levels of redirection.</p>')
|
35
|
+
html.should.include('receive a certificate')
|
36
|
+
end
|
37
|
+
|
32
38
|
it "formats a saga document to saga" do
|
33
39
|
saga = Saga::Formatter.saga_format(@document)
|
34
40
|
saga.should.include('Requirements Requirements API')
|
data/test/saga_planning_spec.rb
CHANGED
@@ -14,30 +14,30 @@ end
|
|
14
14
|
describe "A Planning for unestimated stories" do
|
15
15
|
before do
|
16
16
|
@document = Saga::Document.new
|
17
|
-
@document.stories[''] = [{}, {}, {}]
|
17
|
+
@document.stories[''] = [{}, {}, {:stories => [{}, {}]}]
|
18
18
|
@planning = Saga::Planning.new(@document)
|
19
19
|
end
|
20
20
|
|
21
21
|
it "shows a planning" do
|
22
|
-
@planning.to_s.should == "Unestimated :
|
22
|
+
@planning.to_s.should == "Unestimated : 5 stories"
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
-
describe "A Planning for estimated and
|
26
|
+
describe "A Planning for estimated and unestimated stories" do
|
27
27
|
before do
|
28
28
|
@document = Saga::Document.new
|
29
29
|
@document.stories[''] = [{}, {}, {}]
|
30
|
-
@document.stories['Member'] = [{:estimate => [
|
30
|
+
@document.stories['Member'] = [{}, {:estimate => [6, :hours], :stories => [{:estimate => [6, :hours]}]}, {}]
|
31
31
|
@planning = Saga::Planning.new(@document)
|
32
32
|
end
|
33
33
|
|
34
34
|
it "shows a planning" do
|
35
35
|
@planning.to_s.should ==
|
36
|
-
"Unplanned : 12 (
|
37
|
-
"
|
38
|
-
"Total : 12 (
|
36
|
+
"Unplanned : 12 (2 stories)\n"+
|
37
|
+
"------------------------------\n"+
|
38
|
+
"Total : 12 (2 stories)\n"+
|
39
39
|
"\n"+
|
40
|
-
"Unestimated :
|
40
|
+
"Unestimated : 5 stories"
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
@@ -59,19 +59,21 @@ end
|
|
59
59
|
describe "A complicated Planning" do
|
60
60
|
before do
|
61
61
|
@document = Saga::Document.new
|
62
|
-
@document.stories[''] = [{:estimate => [12, :hours], :iteration => 1}, {:estimate => [8, :hours]}]
|
63
|
-
@document.stories['Developer'] = [{:estimate => [1, :weeks], :iteration => 2}, {:estimate => [1, :hours], :iteration => 2}]
|
62
|
+
@document.stories[''] = [{:estimate => [12, :hours], :iteration => 1}, {:estimate => [8, :hours], :stories => [{}, {}]}]
|
63
|
+
@document.stories['Developer'] = [{:estimate => [1, :weeks], :iteration => 2,:stories => [{:estimate => [2, :hours], :iteration => 2}, {:estimate => [1, :hours]}]}, {:estimate => [1, :hours], :iteration => 2}]
|
64
64
|
@document.stories['Writer'] = [{:estimate => [5, :hours], :iteration => 1}, {:estimate => [2, :hours], :iteration => 3}]
|
65
65
|
@planning = Saga::Planning.new(@document)
|
66
66
|
end
|
67
67
|
|
68
68
|
it "shows a planning" do
|
69
69
|
@planning.to_s.should ==
|
70
|
-
"Unplanned :
|
70
|
+
"Unplanned : 9 (2 stories)\n"+
|
71
71
|
"Iteration 1 : 17 (2 stories)\n"+
|
72
|
-
"Iteration 2 :
|
72
|
+
"Iteration 2 : 43 (3 stories)\n"+
|
73
73
|
"Iteration 3 : 2 (1 story)\n"+
|
74
74
|
"------------------------------\n"+
|
75
|
-
"Total :
|
75
|
+
"Total : 71 (8 stories)\n"+
|
76
|
+
"\n"+
|
77
|
+
"Unestimated : 2 stories"
|
76
78
|
end
|
77
79
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: saga
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 61
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 8
|
9
|
-
-
|
10
|
-
version: 0.8.
|
9
|
+
- 1
|
10
|
+
version: 0.8.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Manfred Stienstra
|
@@ -15,8 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
19
|
-
default_executable: saga
|
18
|
+
date: 2012-06-18 00:00:00 Z
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
22
21
|
name: erubis
|
@@ -78,6 +77,8 @@ files:
|
|
78
77
|
- Rakefile
|
79
78
|
- VERSION
|
80
79
|
- bin/saga
|
80
|
+
- design/requirements.html
|
81
|
+
- design/requirements.txt
|
81
82
|
- lib/saga.rb
|
82
83
|
- lib/saga/document.rb
|
83
84
|
- lib/saga/formatter.rb
|
@@ -106,7 +107,6 @@ files:
|
|
106
107
|
- test/saga_spec.rb
|
107
108
|
- test/saga_tokenizer_spec.rb
|
108
109
|
- test/spec_helper.rb
|
109
|
-
has_rdoc: true
|
110
110
|
homepage: http://fingertips.github.com
|
111
111
|
licenses: []
|
112
112
|
|
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
136
136
|
requirements: []
|
137
137
|
|
138
138
|
rubyforge_project:
|
139
|
-
rubygems_version: 1.
|
139
|
+
rubygems_version: 1.8.18
|
140
140
|
signing_key:
|
141
141
|
specification_version: 3
|
142
142
|
summary: Saga is a tool to convert stories syntax to a nicely formatted document.
|