saga 0.5.1 → 0.5.2

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/.kick CHANGED
@@ -1,12 +1,6 @@
1
1
  recipe :ignore
2
2
  ignore(/(^tmp|\.DS_Store)$/)
3
3
 
4
- process do |files|
5
- if files.delete('stories.txt')
6
- system "./bin/saga planning stories.txt"
7
- end
8
- end
9
-
10
4
  recipe :ruby
11
5
  process do |files|
12
6
  Ruby.run_tests(files.take_and_map do |file|
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.1
1
+ 0.5.2
data/saga.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{saga}
8
- s.version = "0.5.1"
8
+ s.version = "0.5.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Manfred Stienstra"]
12
- s.date = %q{2010-06-21}
12
+ s.date = %q{2010-08-13}
13
13
  s.default_executable = %q{saga}
14
14
  s.description = %q{Saga is a tool to convert stories syntax to a nicely formatted document.}
15
15
  s.email = %q{manfred@fngtps.com}
@@ -48,6 +48,7 @@ Gem::Specification.new do |s|
48
48
  "test/saga_parser_spec.rb",
49
49
  "test/saga_planning_spec.rb",
50
50
  "test/saga_runner_spec.rb",
51
+ "test/saga_spec.rb",
51
52
  "test/saga_tokenizer_spec.rb",
52
53
  "test/spec_helper.rb"
53
54
  ]
@@ -62,6 +63,7 @@ Gem::Specification.new do |s|
62
63
  "test/saga_parser_spec.rb",
63
64
  "test/saga_planning_spec.rb",
64
65
  "test/saga_runner_spec.rb",
66
+ "test/saga_spec.rb",
65
67
  "test/saga_tokenizer_spec.rb",
66
68
  "test/spec_helper.rb"
67
69
  ]
@@ -25,7 +25,7 @@ module Helpers
25
25
 
26
26
  parts = [[story[:description], story_attributes.join(' ')].join(' - ')]
27
27
  parts << " #{story[:notes]}" if story[:notes]
28
- parts.join("\n\n")
28
+ parts.join("\n")
29
29
  end
30
30
 
31
31
  def format_definition(definition)
@@ -13,7 +13,7 @@ describe "Formatter" do
13
13
  ]
14
14
  @document.stories = [
15
15
  ['General', [
16
- {:description => 'As a consumer I would like to use TLS (SSL) so that my connection with the API is secure', :id => 4, :status => 'todo' }
16
+ {:description => 'As a consumer I would like to use TLS (SSL) so that my connection with the API is secure', :id => 4, :status => 'todo', :notes => 'Use a self-signed CA certificate to create the certificates.' }
17
17
  ]]
18
18
  ]
19
19
  end
data/test/saga_spec.rb ADDED
@@ -0,0 +1,35 @@
1
+ require File.expand_path('../spec_helper', __FILE__)
2
+
3
+ describe "Saga" do
4
+ before do
5
+ @document = Saga::Document.new
6
+ @document.title = 'Requirements API'
7
+ @document.authors = [
8
+ {:name => 'Thijs van der Vossen', :email => 'thijs@fngtps.com', :company => 'Fingertips', :website => 'http://www.fngtps.com'},
9
+ {:name => 'Manfred Stienstra', :email => 'manfred@fngtps.com', :company => 'Fingertips', :website => 'http://www.fngtps.com'}
10
+ ]
11
+ @document.introduction = [
12
+ 'A web service for interfacing with the service.', 'Exposes a public API to the application.'
13
+ ]
14
+ @document.stories = ActiveSupport::OrderedHash.new
15
+ [
16
+ ['General', [
17
+ {:description => 'As a consumer I would like to use TLS (SSL) so that my connection with the API is secure', :id => 4, :status => 'todo', :notes => 'Use a self-signed CA certificate to create the certificates.' }
18
+ ]]
19
+ ].each do |key, stories|
20
+ @document.stories[key] = stories
21
+ end
22
+ end
23
+
24
+ it "round-trips through the parser and formatter" do
25
+ document = @document
26
+ 2.times do
27
+ saga = Saga::Formatter.format(document, :template => 'saga')
28
+ document = Saga::Parser.parse(saga)
29
+ end
30
+
31
+ document.title.should == @document.title
32
+ document.authors.should == @document.authors
33
+ document.stories.should == @document.stories
34
+ end
35
+ 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: 9
4
+ hash: 15
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 1
10
- version: 0.5.1
9
+ - 2
10
+ version: 0.5.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Manfred Stienstra
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-06-21 00:00:00 +02:00
18
+ date: 2010-08-13 00:00:00 +02:00
19
19
  default_executable: saga
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -101,6 +101,7 @@ files:
101
101
  - test/saga_parser_spec.rb
102
102
  - test/saga_planning_spec.rb
103
103
  - test/saga_runner_spec.rb
104
+ - test/saga_spec.rb
104
105
  - test/saga_tokenizer_spec.rb
105
106
  - test/spec_helper.rb
106
107
  has_rdoc: true
@@ -143,5 +144,6 @@ test_files:
143
144
  - test/saga_parser_spec.rb
144
145
  - test/saga_planning_spec.rb
145
146
  - test/saga_runner_spec.rb
147
+ - test/saga_spec.rb
146
148
  - test/saga_tokenizer_spec.rb
147
149
  - test/spec_helper.rb