cucumber-in-the-yard 1.0 → 1.1

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,9 @@
1
- === 0.5.0 / 2010-10-02
1
+ === 1.1 / 2010-10-10
2
2
 
3
- * Initial Release
3
+ * FIX: Feature template had references to old methods for description (when it was an array)
4
+ * FIX: Empty feature files caused the documentation to fail; ignoring emptying feature files
5
+ * FIX: Tags, Step definitions, and other CodeObjects that were not present caused rendering to fail; Checking for nil
6
+
7
+ === 1.0 / 2010-10-10
8
+
9
+ * Initial Release
data/Manifest CHANGED
@@ -1,5 +1,5 @@
1
1
  History.txt
2
- README.txt
2
+ README.md
3
3
  Rakefile
4
4
  example/example.feature
5
5
  example/example.step.rb
data/README.md ADDED
@@ -0,0 +1,122 @@
1
+ Cucumber-In-The-YARD (CITY): A Requirements Documentation Tool
2
+ ====================================
3
+
4
+ Synopsis
5
+ --------
6
+
7
+ Cucumber-In-The-Yard is a YARD extension that processes Cucumber Features, Scenarios, Steps,
8
+ Step Definitions, Transforms, and Tags and provides a documentation interface that allows you
9
+ easily view and investigate the test suite. This tools hopes to bridge the gap of being able
10
+ to provide your feature descriptions to your Product Owners and Stakeholders.
11
+
12
+
13
+ Installation
14
+ ------------
15
+
16
+ Cucumber-In-The-Yard (CITY) requires the following gems installed:
17
+
18
+ Gherkin - http://cukes.info
19
+ Cucumber - http://cukes.info
20
+ YARD - http://yardoc.org
21
+
22
+ To install CITY use the following command:
23
+
24
+ $ gem install cucumber-in-the-yard
25
+
26
+ (Add `sudo` if you're installing under a POSIX system as root)
27
+
28
+ Alternatively, if you've checked the source out directly, you can call
29
+ `rake install` from the root project directory.
30
+
31
+
32
+ Usage
33
+ -----
34
+
35
+ **1. Rake Task**
36
+
37
+ You can do this by adding the following to your `Rakefile`:
38
+
39
+ require "yard"
40
+ require "city"
41
+
42
+ YARD::Rake::CitydocTask.new do |t|
43
+ t.files = ['features/**/*.feature', 'features/**/*.rb', OTHER_PATHS] # optional
44
+ t.options = ['--any', '--extra', '--opts'] # optional
45
+ end
46
+
47
+ both the `files` and `options` settings are optional. `files` will default to
48
+ `lib/**/*.rb` and `options` will represents any options you might want
49
+ to add. Again, a full list of options is available by typing `yardoc --help`
50
+ in a shell. You can also override the options at the Rake command-line with the
51
+ OPTS environment variable:
52
+
53
+
54
+ Details
55
+ --------
56
+
57
+ There are two things that I enjoy: a test framework written in my own Domain Specific Language (DSL)
58
+ that is easily understood by all those on a project and the ability for all participants to easily read,
59
+ search, and view the tests.
60
+
61
+ Cucumber is an amazing tool that allowed me to define exercisable requirements. My biggest obstacle was
62
+ bringing these requirements to my team, the product owner, and other stakeholders.
63
+
64
+ Initially I tried to expose more of the functionality by providing freshly authored requirements through
65
+ email, attachments to JIRA tickets, or linked in wiki documents. None of these methods were very sustainable
66
+ or successful. First, I was continually pushing out the documents to those interested. Second, the documents were displayed to the user in text without the syntax highlighting that was exceedingly helpful for quickly understanding the requirements.
67
+
68
+ I also found it hard to share the test framework that I had put together with another developer that joined
69
+ the team. It was difficult to direct them around the features, tags, step definitions, and transforms.
70
+ It was when I started to convey to them the conventions that I had established that I wished I had a tool
71
+ that would allow me to provide documentation like one would find generated by a great tool like YARD.
72
+
73
+ So I set out to integrate Cucumber objects like features, backgrounds, scenarios, tags, steps, step
74
+ definitions, and transforms into a YARD template. From my quick survey of the landscape I can see that the
75
+ my needs are different than a lot of others that use Cucumber. The entire project that spawned this effort
76
+ was solely to exercise the functionality of a different, large project and so there is a huge dependence on
77
+ having the requirements documented. This is in contrast to other projects that are using this on a small
78
+ scale to test the functionality of small software component. Though, ultimately, I realized that the
79
+ functionality may provide a valuable tool for many as I feel it helps more solidly bridge the reporting of
80
+ the documentation by putting a coat of paint on it.
81
+
82
+
83
+ == FEATURES/PROBLEMS:
84
+
85
+ **1. Searchable Features, Scenarios, Steps, and Tags**: Similar to how YARD provides the ability to search through classes and methods, CITY provides the ability to search through all of the requirements documentation quickly and easily through the browser. This makes it easy to provide reports for product owners and other stakeholders.
86
+
87
+ **2. Tags**: Tag view will show all features and scenarios that employ the tag.
88
+
89
+ **3. Steps map to Step Definitions**: Steps provide links to their step definitions so developers and maintainers of the requirements suite can quickly find their way around the project. As well, step definitions report all their implemented step definitions to provide a quick way of understanding the impact of augmenting a step definition as well as providing examples.
90
+
91
+ == SYNOPSIS:
92
+
93
+ == REQUIREMENTS:
94
+
95
+ == INSTALL:
96
+
97
+ == DEVELOPERS:
98
+
99
+ == LICENSE:
100
+
101
+ (The MIT License)
102
+
103
+ Copyright (c) 2010 FIX
104
+
105
+ Permission is hereby granted, free of charge, to any person obtaining
106
+ a copy of this software and associated documentation files (the
107
+ 'Software'), to deal in the Software without restriction, including
108
+ without limitation the rights to use, copy, modify, merge, publish,
109
+ distribute, sublicense, and/or sell copies of the Software, and to
110
+ permit persons to whom the Software is furnished to do so, subject to
111
+ the following conditions:
112
+
113
+ The above copyright notice and this permission notice shall be
114
+ included in all copies or substantial portions of the Software.
115
+
116
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
117
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
118
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
119
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
120
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
121
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
122
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile CHANGED
@@ -1,20 +1,15 @@
1
1
  require 'rake'
2
2
  require 'echoe'
3
- require 'yard'
4
- require 'rspec/core/rake_task'
5
3
 
6
- task :default => :yard
4
+ task :default => :gendoc
7
5
 
8
6
  task :gendoc do
9
- `yardoc -e lib/city.rb -p lib/yard/templates 'example/**/*.rb' 'example/**/*.feature' --quiet --verbose`
7
+ #`yardoc -e lib/city.rb -p lib/yard/templates 'example/**/*.rb' 'example/**/*.feature' --debug`
8
+ `yardoc -e lib/city.rb -p lib/yard/templates 'common/**/*.rb' 'browser/**/*.rb' 'jmx/**/*.rb' --no-output --debug`
9
+ `yardoc -e lib/city.rb -p lib/yard/templates 'common/**/*.rb' 'browser/**/*.rb' 'jmx/**/*.rb' 'definitions/**/*.rb' 'features/**/*.feature' --debug`
10
10
  end
11
11
 
12
- yard_task = YARD::Rake::YardocTask.new
13
- yard_task.files = FileList['example/**/*.feature','example/**/*.rb']
14
- yard_task.options = %w{ -e lib/city.rb -p lib/yard/templates 'example/**/*.rb' 'examples/**/*.feature' --debug }
15
-
16
-
17
- Echoe.new('cucumber-in-the-yard', '1.0') do |g|
12
+ Echoe.new('cucumber-in-the-yard', '1.1') do |g|
18
13
  g.author = "Frank;lin Webber"
19
14
  g.email = "franklin.webber@gmail.com"
20
15
  g.url = "http://github.com/burtlo/Cucumber-In-The-Yard"
@@ -2,11 +2,10 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{cucumber-in-the-yard}
5
- s.version = "1.0"
5
+ s.version = "1.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Frank;lin Webber"]
9
- s.cert_chain = ["/Users/frank/gem-public_cert.pem"]
10
9
  s.date = %q{2010-10-10}
11
10
  s.description = %q{
12
11
  Cucumber-In-The-Yard is a YARD extension that processes Cucumber Features, Scenarios, Steps,
@@ -14,14 +13,13 @@ Gem::Specification.new do |s|
14
13
  easily view and investigate the test suite. This tools hopes to bridge the gap of being able
15
14
  to provide your feature descriptions to your Product Owners and Stakeholders. }
16
15
  s.email = %q{franklin.webber@gmail.com}
17
- s.extra_rdoc_files = ["README.txt", "lib/city.rb", "lib/cucumber/city_builder.rb", "lib/yard/code_objects/cucumber_location_helper.rb", "lib/yard/code_objects/feature.rb", "lib/yard/code_objects/scenario.rb", "lib/yard/code_objects/step.rb", "lib/yard/code_objects/tags.rb", "lib/yard/extensions.rb", "lib/yard/handlers/base.rb", "lib/yard/handlers/feature_handler.rb", "lib/yard/parser/feature.rb", "lib/yard/rb_extensions.rb", "lib/yard/rake/city_task.rb", "lib/yard/templates/default/feature/html/feature.erb", "lib/yard/templates/default/feature/setup.rb", "lib/yard/templates/default/fulldoc/html/css/common.css", "lib/yard/templates/default/fulldoc/html/full_list.erb", "lib/yard/templates/default/fulldoc/html/full_list_features.erb", "lib/yard/templates/default/fulldoc/html/full_list_scenarios.erb", "lib/yard/templates/default/fulldoc/html/full_list_stepdefinitions.erb", "lib/yard/templates/default/fulldoc/html/full_list_steps.erb", "lib/yard/templates/default/fulldoc/html/full_list_tagusages.erb", "lib/yard/templates/default/fulldoc/html/index.erb", "lib/yard/templates/default/fulldoc/html/js/cucumber.js", "lib/yard/templates/default/fulldoc/html/setup.rb", "lib/yard/templates/default/layout/html/headers.erb", "lib/yard/templates/default/layout/html/search.erb", "lib/yard/templates/default/module/html/step_transforms.erb", "lib/yard/templates/default/module/setup.rb", "lib/yard/templates/default/scenario/html/scenario.erb", "lib/yard/templates/default/scenario/setup.rb", "lib/yard/templates/default/steptransformers/html/stepdefinition.erb", "lib/yard/templates/default/steptransformers/setup.rb", "lib/yard/templates/default/tagusage/html/tagusage.erb", "lib/yard/templates/default/tagusage/setup.rb"]
18
- s.files = ["History.txt", "README.txt", "Rakefile", "example/example.feature", "example/example.step.rb", "example/example.third.feature", "example/second_example.feature", "lib/city.rb", "lib/cucumber/city_builder.rb", "lib/yard/code_objects/cucumber_location_helper.rb", "lib/yard/code_objects/feature.rb", "lib/yard/code_objects/scenario.rb", "lib/yard/code_objects/step.rb", "lib/yard/code_objects/tags.rb", "lib/yard/extensions.rb", "lib/yard/handlers/base.rb", "lib/yard/handlers/feature_handler.rb", "lib/yard/parser/feature.rb", "lib/yard/rb_extensions.rb", "lib/yard/rake/city_task.rb", "lib/yard/templates/default/feature/html/feature.erb", "lib/yard/templates/default/feature/setup.rb", "lib/yard/templates/default/fulldoc/html/css/common.css", "lib/yard/templates/default/fulldoc/html/full_list.erb", "lib/yard/templates/default/fulldoc/html/full_list_features.erb", "lib/yard/templates/default/fulldoc/html/full_list_scenarios.erb", "lib/yard/templates/default/fulldoc/html/full_list_stepdefinitions.erb", "lib/yard/templates/default/fulldoc/html/full_list_steps.erb", "lib/yard/templates/default/fulldoc/html/full_list_tagusages.erb", "lib/yard/templates/default/fulldoc/html/index.erb", "lib/yard/templates/default/fulldoc/html/js/cucumber.js", "lib/yard/templates/default/fulldoc/html/setup.rb", "lib/yard/templates/default/layout/html/headers.erb", "lib/yard/templates/default/layout/html/search.erb", "lib/yard/templates/default/module/html/step_transforms.erb", "lib/yard/templates/default/module/setup.rb", "lib/yard/templates/default/scenario/html/scenario.erb", "lib/yard/templates/default/scenario/setup.rb", "lib/yard/templates/default/steptransformers/html/stepdefinition.erb", "lib/yard/templates/default/steptransformers/setup.rb", "lib/yard/templates/default/tagusage/html/tagusage.erb", "lib/yard/templates/default/tagusage/setup.rb", "spec/city/feature_parser_spec_examples.rb", "spec/city/gherkin_loader_spec.rb", "spec/city/test.feature", "spec/city/yard_handlers_cucumber_spec.rb", "spec/city/yard_namespace_object_spec.rb", "spec/city/yard_parser_cucumber_spec.rb", "spec/city/yard_rb_extensions_spec.rb", "spec/spec_helper.rb", "Manifest", "cucumber-in-the-yard.gemspec"]
16
+ s.extra_rdoc_files = ["README.md", "lib/city.rb", "lib/cucumber/city_builder.rb", "lib/yard/code_objects/cucumber_location_helper.rb", "lib/yard/code_objects/feature.rb", "lib/yard/code_objects/scenario.rb", "lib/yard/code_objects/step.rb", "lib/yard/code_objects/tags.rb", "lib/yard/extensions.rb", "lib/yard/handlers/base.rb", "lib/yard/handlers/feature_handler.rb", "lib/yard/parser/feature.rb", "lib/yard/rb_extensions.rb", "lib/yard/rake/city_task.rb", "lib/yard/templates/default/feature/html/feature.erb", "lib/yard/templates/default/feature/setup.rb", "lib/yard/templates/default/fulldoc/html/css/common.css", "lib/yard/templates/default/fulldoc/html/full_list.erb", "lib/yard/templates/default/fulldoc/html/full_list_features.erb", "lib/yard/templates/default/fulldoc/html/full_list_scenarios.erb", "lib/yard/templates/default/fulldoc/html/full_list_stepdefinitions.erb", "lib/yard/templates/default/fulldoc/html/full_list_steps.erb", "lib/yard/templates/default/fulldoc/html/full_list_tagusages.erb", "lib/yard/templates/default/fulldoc/html/index.erb", "lib/yard/templates/default/fulldoc/html/js/cucumber.js", "lib/yard/templates/default/fulldoc/html/setup.rb", "lib/yard/templates/default/layout/html/headers.erb", "lib/yard/templates/default/layout/html/search.erb", "lib/yard/templates/default/module/html/step_transforms.erb", "lib/yard/templates/default/module/setup.rb", "lib/yard/templates/default/scenario/html/scenario.erb", "lib/yard/templates/default/scenario/setup.rb", "lib/yard/templates/default/steptransformers/html/stepdefinition.erb", "lib/yard/templates/default/steptransformers/setup.rb", "lib/yard/templates/default/tagusage/html/tagusage.erb", "lib/yard/templates/default/tagusage/setup.rb"]
17
+ s.files = ["History.txt", "README.md", "Rakefile", "example/example.feature", "example/example.step.rb", "example/example.third.feature", "example/second_example.feature", "lib/city.rb", "lib/cucumber/city_builder.rb", "lib/yard/code_objects/cucumber_location_helper.rb", "lib/yard/code_objects/feature.rb", "lib/yard/code_objects/scenario.rb", "lib/yard/code_objects/step.rb", "lib/yard/code_objects/tags.rb", "lib/yard/extensions.rb", "lib/yard/handlers/base.rb", "lib/yard/handlers/feature_handler.rb", "lib/yard/parser/feature.rb", "lib/yard/rb_extensions.rb", "lib/yard/rake/city_task.rb", "lib/yard/templates/default/feature/html/feature.erb", "lib/yard/templates/default/feature/setup.rb", "lib/yard/templates/default/fulldoc/html/css/common.css", "lib/yard/templates/default/fulldoc/html/full_list.erb", "lib/yard/templates/default/fulldoc/html/full_list_features.erb", "lib/yard/templates/default/fulldoc/html/full_list_scenarios.erb", "lib/yard/templates/default/fulldoc/html/full_list_stepdefinitions.erb", "lib/yard/templates/default/fulldoc/html/full_list_steps.erb", "lib/yard/templates/default/fulldoc/html/full_list_tagusages.erb", "lib/yard/templates/default/fulldoc/html/index.erb", "lib/yard/templates/default/fulldoc/html/js/cucumber.js", "lib/yard/templates/default/fulldoc/html/setup.rb", "lib/yard/templates/default/layout/html/headers.erb", "lib/yard/templates/default/layout/html/search.erb", "lib/yard/templates/default/module/html/step_transforms.erb", "lib/yard/templates/default/module/setup.rb", "lib/yard/templates/default/scenario/html/scenario.erb", "lib/yard/templates/default/scenario/setup.rb", "lib/yard/templates/default/steptransformers/html/stepdefinition.erb", "lib/yard/templates/default/steptransformers/setup.rb", "lib/yard/templates/default/tagusage/html/tagusage.erb", "lib/yard/templates/default/tagusage/setup.rb", "spec/city/feature_parser_spec_examples.rb", "spec/city/gherkin_loader_spec.rb", "spec/city/test.feature", "spec/city/yard_handlers_cucumber_spec.rb", "spec/city/yard_namespace_object_spec.rb", "spec/city/yard_parser_cucumber_spec.rb", "spec/city/yard_rb_extensions_spec.rb", "spec/spec_helper.rb", "Manifest", "cucumber-in-the-yard.gemspec"]
19
18
  s.homepage = %q{http://github.com/burtlo/Cucumber-In-The-Yard}
20
- s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Cucumber-in-the-yard", "--main", "README.txt"]
19
+ s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Cucumber-in-the-yard", "--main", "README.md"]
21
20
  s.require_paths = ["lib"]
22
21
  s.rubyforge_project = %q{cucumber-in-the-yard}
23
22
  s.rubygems_version = %q{1.3.6}
24
- s.signing_key = %q{/Users/frank/gem-private_key.pem}
25
23
  s.summary = %q{Cucumber-In-The-Yard is a YARD extension that processes Cucumber Features, Scenarios, Steps, Step Definitions, Transforms, and Tags and provides a documentation interface that allows you easily view and investigate the test suite. This tools hopes to bridge the gap of being able to provide your feature descriptions to your Product Owners and Stakeholders.}
26
24
 
27
25
  if s.respond_to? :specification_version then
@@ -21,7 +21,7 @@ module Cucumber
21
21
  f.keyword = feature.keyword
22
22
  f.value = feature.name
23
23
  f.tags = []
24
-
24
+
25
25
  feature.tags.map{|tag| tag.name}.each_with_index do |tag,index|
26
26
  f.tags << YARD::CodeObjects::Cucumber::Tag.new(:root,"#{f.name}_feature_tag_#{index}") do |t|
27
27
  t.value = tag
@@ -29,8 +29,7 @@ module Cucumber
29
29
  t.feature = f
30
30
  end
31
31
  end
32
-
33
- end
32
+ end
34
33
 
35
34
  end
36
35
 
@@ -7,7 +7,8 @@ module YARD
7
7
  include Parser::Cucumber
8
8
  def handles?(node)
9
9
  handlers.any? do |a_handler|
10
- log.debug "YARD::Handlers::Cucumber::Base#handles?"
10
+ #log.debug "YARD::Handlers::Cucumber::Base#handles?(#{node.class})"
11
+ node.class == a_handler
11
12
  end
12
13
  end
13
14
  include Parser::Cucumber
@@ -7,12 +7,16 @@ module YARD
7
7
  handles CodeObjects::Cucumber::Feature
8
8
 
9
9
  def process
10
-
11
- # For the background and the scenario, find the steps that have definitions
12
- process_scenario(statement.background) if statement.background
13
10
 
14
- statement.scenarios.each do |scenario|
15
- process_scenario(scenario)
11
+ if statement
12
+ # For the background and the scenario, find the steps that have definitions
13
+ process_scenario(statement.background) if statement.background
14
+
15
+ statement.scenarios.each do |scenario|
16
+ process_scenario(scenario)
17
+ end
18
+ else
19
+ log.warn "Empty feature file. A feature failed to process correctly or contains no feature"
16
20
  end
17
21
 
18
22
  rescue YARD::Handlers::NamespaceMissingError
@@ -22,11 +26,16 @@ module YARD
22
26
  def process_scenario(scenario)
23
27
  scenario.steps.each do |step|
24
28
  owner.step_definitions.each do |stepdef|
25
- if %r{#{stepdef.compare_value}}.match(step.value)
26
- step.definition = stepdef
27
- stepdef.steps << step
28
- log.info "STEP #{step} has found its definition #{stepdef}"
29
- break
29
+
30
+ if stepdef.compare_value =~ /.+\#\{[^\}]+\}.+/
31
+ #log.debug "Step definition has packed constant #{stepdef.compare_value}"
32
+ else
33
+ if %r{#{stepdef.compare_value}}.match(step.value)
34
+ step.definition = stepdef
35
+ stepdef.steps << step
36
+ log.debug "STEP #{step} has found its definition #{stepdef}"
37
+ break
38
+ end
30
39
  end
31
40
  end
32
41
  end
@@ -97,7 +97,7 @@ class StepDefinitionHandler < YARD::Handlers::Ruby::Legacy::Base
97
97
  stepdef_instance.constants = stepdef_instance._value_constants.each do |stepdef_constant|
98
98
  owner.constants.each do |constant|
99
99
  if stepdef_constant.to_sym == constant.name
100
- log.info "Replacing #{constant.name} with its value in the step definition #{stepdef_instance.value}"
100
+ #log.debug "Replacing #{constant.name} with its value in the step definition #{stepdef_instance.value}"
101
101
  stepdef_instance.constants[constant.name] = unpack_constants(constant.value)
102
102
  end
103
103
  end
@@ -39,7 +39,7 @@
39
39
  </div>
40
40
  <% unless @feature.background.description.empty? %>
41
41
  <div class="description">
42
- <%= h(@feature.background.description.join("\n<br/>")) %>
42
+ <%= h(@feature.background.description) %>
43
43
  </div>
44
44
  <% end %>
45
45
 
@@ -83,16 +83,16 @@
83
83
 
84
84
  <thead>
85
85
  <tr>
86
- <% step.table.each_with_index do |column,column_index| %>
87
- <th class="<%= (column_index + 1) % 2 == 0 ? 'even' : 'odd' %>"><%= h(column.to_s.strip) %></td>
86
+ <% step.table.first.each_with_index do |column,column_index| %>
87
+ <th class="<%= (column_index + 1) % 2 == 0 ? 'even' : 'odd' %>"><%= h(column.strip) %></td>
88
88
  <% end %>
89
89
  </tr>
90
90
  </thead>
91
91
 
92
92
  <% step.table[1..-1].each do |row| %>
93
93
  <tr>
94
- <% row.split("|").each_with_index do |column,column_index| %>
95
- <td class="<%= (column_index + 1) % 2 == 0 ? 'even' : 'odd' %>"><%= h(column.to_s.strip) %></td>
94
+ <% row.each_with_index do |column,column_index| %>
95
+ <td class="<%= (column_index + 1) % 2 == 0 ? 'even' : 'odd' %>"><%= h(column.strip) %></td>
96
96
  <% end %>
97
97
  </tr>
98
98
  <% end %>
@@ -146,7 +146,7 @@
146
146
  </div>
147
147
  <% unless scenario.description.empty? %>
148
148
  <div class="description">
149
- <%= h(scenario.description.join("\n<br/>")) %>
149
+ <%= h(scenario.description) %>
150
150
  </div>
151
151
  <% end %>
152
152
 
@@ -4,41 +4,46 @@ def init
4
4
  super
5
5
  asset("js/cucumber.js",file("js/cucumber.js",true))
6
6
 
7
- # Because I don't parse correctly I have to find all my scenarios, steps, and tags
8
- @scenarios = []
9
- @tags = []
10
7
  @features = Registry.all(:feature)
8
+
9
+ if @features
11
10
 
12
- @step_definitions = Registry.all(:stepdefinition)
13
- @steps = Registry.all(:step)
14
-
15
- create_full_list(@step_definitions,"Step Definition")
16
- create_full_list(@steps)
11
+ @scenarios = []
12
+ @tags = []
17
13
 
18
- @features.each do |feature|
19
- serialize_object(feature)
14
+ @features.each do |feature|
15
+ serialize_object(feature)
20
16
 
21
- feature.tags.each { |tag| @tags << tag }
17
+ feature.tags.each { |tag| @tags << tag }
22
18
 
23
- feature.scenarios.each do |scenario|
24
- @scenarios << scenario
25
- scenario.tags.each { |tag| @tags << tag }
19
+ feature.scenarios.each do |scenario|
20
+ @scenarios << scenario
21
+ scenario.tags.each { |tag| @tags << tag }
22
+ end
26
23
  end
27
- end
28
24
 
29
- @tags = find_unique_tags(@tags)
30
- @tags.each { |tag,tag_objects| serialize_object(tag_objects) }
31
- @tagusage = @tags.values.sort {|x,y| y.total_scenario_count <=> x.total_scenario_count }
25
+ @tags = find_unique_tags(@tags)
26
+ @tags.each { |tag,tag_objects| serialize_object(tag_objects) }
27
+ @tagusage = @tags.values.sort {|x,y| y.total_scenario_count <=> x.total_scenario_count }
28
+
29
+ create_full_list(@tagusage,"Tag Usage") if @tagusage
30
+ create_full_list(@features) if @features
31
+ create_full_list(@scenarios) if @scenarios
32
32
 
33
- create_full_list(@tagusage,"Tag Usage")
34
- create_full_list(@features)
35
- create_full_list(@scenarios)
33
+ @steps = Registry.all(:step)
34
+ create_full_list(@steps) if @steps
36
35
 
37
- @step_transformers = YARD::CodeObjects::StepTransformersObject.new(:root,"steptransformers")
36
+ end
37
+
38
+ @step_definitions = Registry.all(:stepdefinition)
38
39
 
39
- @step_definitions.each {|stepdef| @step_transformers << stepdef }
40
+ if @step_definitions
41
+ create_full_list(@step_definitions,"Step Definition")
42
+ @step_transformers = YARD::CodeObjects::StepTransformersObject.new(:root,"steptransformers")
43
+ @step_definitions.each {|stepdef| @step_transformers << stepdef }
44
+ serialize_object(@step_transformers)
45
+ end
40
46
 
41
- serialize_object(@step_transformers)
42
47
 
43
48
  end
44
49
 
metadata CHANGED
@@ -4,35 +4,14 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 1
7
- - 0
8
- version: "1.0"
7
+ - 1
8
+ version: "1.1"
9
9
  platform: ruby
10
10
  authors:
11
11
  - Frank;lin Webber
12
12
  autorequire:
13
13
  bindir: bin
14
- cert_chain:
15
- - |
16
- -----BEGIN CERTIFICATE-----
17
- MIIDQDCCAiigAwIBAgIBADANBgkqhkiG9w0BAQUFADBGMRgwFgYDVQQDDA9mcmFu
18
- a2xpbi53ZWJiZXIxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixk
19
- ARkWA2NvbTAeFw0xMDEwMTAwNDExMzVaFw0xMTEwMTAwNDExMzVaMEYxGDAWBgNV
20
- BAMMD2ZyYW5rbGluLndlYmJlcjEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYK
21
- CZImiZPyLGQBGRYDY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
22
- 0uEjgaFJSz31BQVPYDCVtlkvflrsUwc/VsOfE1lCTE7++VZwfvSQCkWdczKO/Ok2
23
- 7h09uQO3AnFMdyDh1T07RMwk2U1xcYb9KSr9z6ZnDQlTLg3Ljlce+No2Qb7t2nQz
24
- wdv+LXfhdId3JMloSlpYCO5vd/tEhV0qyLatk/5NAPOehP6x8iqZitlHH+lFqhj1
25
- EvXSoBm0ekx+fcink7msJH5EwjiAcfdDZVRll/jxsA6d61TTeUY9KcEcacqJttz9
26
- melNtmkHNNrv8AGzfsfuIJEPuF2xGB0KZ/6CozbNhsDrdvRN7Cn7XPVipzWH2XWQ
27
- ngGzbNk0i1Ii5YzCMb5lSwIDAQABozkwNzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIE
28
- sDAdBgNVHQ4EFgQU2SvRv1wBnCTILwuBOwDlle4FCqowDQYJKoZIhvcNAQEFBQAD
29
- ggEBAINsBeBrNP7/ikSK41bB+asX5hTdrSY+s+in8V1TqsMx2+M0kmvtV/54voUE
30
- fi0+s9+wtAVd+r2XrTMsO4ikITBxfBUogRymSGFdgrPKBzt3uXdM/AorZ0ATQK9o
31
- YZg+z2fHYj74/LCaQxtJzLF7Lgs4Uh3JgUi/sNSNWHKRc1DOw7LWucNddzlh3ZVw
32
- ZxaKx+DyQobEIDV5IN0MwZ2hKPVzRQ2sk2UtVVK4rEkVTXMi/TNVi1Xpq4T+l2as
33
- HHgJUhNHjUvlDSi4ABZ5ewPwCc3UoEtfFZniQccW99dvvU/urb3h/GJh8zTf9Iwr
34
- d6KyMCmR4iX+Fd1FaQefYefo5uI=
35
- -----END CERTIFICATE-----
14
+ cert_chain: []
36
15
 
37
16
  date: 2010-10-10 00:00:00 -07:00
38
17
  default_executable:
@@ -72,7 +51,7 @@ executables: []
72
51
  extensions: []
73
52
 
74
53
  extra_rdoc_files:
75
- - README.txt
54
+ - README.md
76
55
  - lib/city.rb
77
56
  - lib/cucumber/city_builder.rb
78
57
  - lib/yard/code_objects/cucumber_location_helper.rb
@@ -110,7 +89,7 @@ extra_rdoc_files:
110
89
  - lib/yard/templates/default/tagusage/setup.rb
111
90
  files:
112
91
  - History.txt
113
- - README.txt
92
+ - README.md
114
93
  - Rakefile
115
94
  - example/example.feature
116
95
  - example/example.step.rb
@@ -172,7 +151,7 @@ rdoc_options:
172
151
  - --title
173
152
  - Cucumber-in-the-yard
174
153
  - --main
175
- - README.txt
154
+ - README.md
176
155
  require_paths:
177
156
  - lib
178
157
  required_ruby_version: !ruby/object:Gem::Requirement
data/README.txt DELETED
@@ -1,55 +0,0 @@
1
- = CITY Cucumber-In-The-YARD (CITY): A Requirements Documentation Tool
2
-
3
- == DESCRIPTION:
4
-
5
- There are two things that I enjoy: a test framework written in my own Domain Specific Language (DSL) that is easily understood by all those on a project and the ability for all participants to easily read, search, and view the tests.
6
-
7
- Cucumber is an amazing tool that allowed me to define exercisable requirements. My biggest obstacle was bringing these requirements to my team, the product owner, and other stakeholders.
8
-
9
- Initially I tried to expose more of the functionality by providing freshly authored requirements through email, attachments to JIRA tickets, or linked in wiki documents. None of these methods were very sustainable or successful. First, I was continually pushing out the documents to those interested. Second, the documents were displayed to the user in text without the syntax highlighting that was exceedingly helpful for quickly understanding the requirements.
10
-
11
- I also found it hard to share the test framework that I had put together with another developer that joined the team. It was difficult to direct them around the features, tags, step definitions, and transforms. It was when I started to convey to them the conventions that I had established that I wished I had a tool that would allow me to provide documentation like one would find generated by a great tool like YARD.
12
-
13
- So I set out to integrate Cucumber objects like features, backgrounds, scenarios, tags, steps, step definitions, and transforms into a YARD template. From my quick survey of the landscape I can see that the my needs are different than a lot of others that use Cucumber. The entire project that spawned this effort was solely to exercise the functionality of a different, large project and so there is a huge dependence on having the requirements documented. This is in contrast to other projects that are using this on a small scale to test the functionality of small software component. Though, ultimately, I realized that the functionality may provide a valuable tool for many as I feel it helps more solidly bridge the reporting of the documentation by putting a coat of paint on it.
14
-
15
-
16
- == FEATURES/PROBLEMS:
17
-
18
- **1. Searchable Features, Scenarios, Steps, and Tags**: Similar to how YARD provides the ability to search through classes and methods, CITY provides the ability to search through all of the requirements documentation quickly and easily through the browser. This makes it easy to provide reports for product owners and other stakeholders.
19
-
20
- **2. Tags**: Tag view will show all features and scenarios that employ the tag.
21
-
22
- **3. Steps map to Step Definitions**: Steps provide links to their step definitions so developers and maintainers of the requirements suite can quickly find their way around the project. As well, step definitions report all their implemented step definitions to provide a quick way of understanding the impact of augmenting a step definition as well as providing examples.
23
-
24
- == SYNOPSIS:
25
-
26
- == REQUIREMENTS:
27
-
28
- == INSTALL:
29
-
30
- == DEVELOPERS:
31
-
32
- == LICENSE:
33
-
34
- (The MIT License)
35
-
36
- Copyright (c) 2010 FIX
37
-
38
- Permission is hereby granted, free of charge, to any person obtaining
39
- a copy of this software and associated documentation files (the
40
- 'Software'), to deal in the Software without restriction, including
41
- without limitation the rights to use, copy, modify, merge, publish,
42
- distribute, sublicense, and/or sell copies of the Software, and to
43
- permit persons to whom the Software is furnished to do so, subject to
44
- the following conditions:
45
-
46
- The above copyright notice and this permission notice shall be
47
- included in all copies or substantial portions of the Software.
48
-
49
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
50
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
51
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
52
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
53
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
54
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
55
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data.tar.gz.sig DELETED
Binary file
metadata.gz.sig DELETED
Binary file