cucumber-in-the-yard 1.7.7 → 1.7.8

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.
Files changed (34) hide show
  1. data/History.txt +9 -0
  2. data/README.md +1 -1
  3. data/example/README.md +8 -0
  4. data/example/child_feature/README.md +21 -19
  5. data/example/scenario.feature +3 -3
  6. data/lib/city.rb +1 -1
  7. data/lib/templates/default/feature/html/feature.erb +1 -1
  8. data/lib/templates/default/feature/html/scenario.erb +6 -4
  9. data/lib/templates/default/feature/{setup.rb → html/setup.rb} +0 -0
  10. data/lib/templates/default/featuredirectory/html/alpha_table.erb +26 -0
  11. data/lib/templates/default/featuredirectory/html/directory.erb +20 -69
  12. data/lib/templates/default/featuredirectory/html/setup.rb +18 -21
  13. data/lib/templates/default/featuretags/html/setup.rb +1 -1
  14. data/lib/templates/default/fulldoc/html/css/common.css +8 -3
  15. data/lib/templates/default/fulldoc/html/full_list_features.erb +1 -1
  16. data/lib/templates/default/fulldoc/html/js/cucumber.js +17 -1
  17. data/lib/templates/default/fulldoc/html/setup.rb +10 -0
  18. data/lib/templates/default/requirements/html/alpha_table.erb +26 -0
  19. data/lib/templates/default/requirements/html/requirements.erb +50 -0
  20. data/lib/templates/default/requirements/html/setup.rb +28 -34
  21. data/lib/templates/default/steptransformers/html/header.erb +4 -1
  22. data/lib/templates/default/steptransformers/html/index.erb +10 -0
  23. data/lib/templates/default/steptransformers/{setup.rb → html/setup.rb} +30 -8
  24. data/lib/templates/default/steptransformers/html/transformers.erb +14 -7
  25. data/lib/templates/default/steptransformers/html/{undefined_steps.erb → undefinedsteps.erb} +1 -1
  26. data/lib/templates/default/tag/html/alpha_table.erb +26 -0
  27. data/lib/templates/default/tag/html/setup.rb +27 -0
  28. data/lib/templates/default/tag/html/tag.erb +32 -16
  29. data/lib/yard/code_objects/cucumber/namespace_object.rb +11 -0
  30. metadata +16 -30
  31. data/lib/templates/default/requirements/html/namespace.erb +0 -90
  32. data/lib/templates/default/tag/html/feature.erb +0 -29
  33. data/lib/templates/default/tag/html/scenario.erb +0 -33
  34. data/lib/templates/default/tag/setup.rb +0 -20
@@ -1,3 +1,12 @@
1
+ === 1.7.8 / 2011-01-06
2
+
3
+ * 'All Features' lands you on the root features directory; 'Requirements'
4
+ is still accessible through the breadcrumbs.
5
+ * Feature directory pages will display all the features in all subdirectories
6
+ * Better sorting for features, tags, and step transformers.
7
+
8
+ - FIX Feature-Scenario links and Cursors
9
+
1
10
  === 1.7.7 / 2011-01-06
2
11
 
3
12
  * Feature Directories now support a README.md file that can be used to provide
data/README.md CHANGED
@@ -36,7 +36,7 @@ The implemented example has been deployed at [http://recursivegames.com/cukes/](
36
36
 
37
37
  **8. [Undefined steps](http://recursivegames.com/cukes/requirements/step_transformers.html#undefined_steps) and even [Rubular](http://rubular.com/) links of your step definitions.**
38
38
 
39
- **9. Feature directories with a README.md will be parsed into the description** [example](http://recursivegames.com/cukes/requirements/example/child_feature.html)
39
+ **9. Feature directories with a README.md will be parsed into the description** [example](http://recursivegames.com/cukes/requirements/features.html)
40
40
 
41
41
  Installation
42
42
  ------------
@@ -0,0 +1,8 @@
1
+ This collection of features are really just to test some of the varied cases
2
+ that CITY may come in contact with while parsing a series of features. All
3
+ of the features, tags, and directories displayed here are contained in this
4
+ directory and all subdirectories.
5
+
6
+ * First, the features which are broken down alphabetically and displayed
7
+ * Second, the tags, used by all the features and scenarios
8
+ * Third, the subdirectories, contained in this directory and in the subdirectories.
@@ -1,19 +1,21 @@
1
- Feature Directory README
2
- ========================
3
-
4
- Synopsis
5
- --------
6
-
7
- This collection of features are contained in this folder. The description README
8
- allows a user to place a description for entire directory of the features and appears
9
- in the output to assist with understanding about the collection of features.
10
-
11
- Resources
12
- ---------
13
-
14
- Links to particular resources like the links to the stories, tasks, or other areas
15
- can also be represented.
16
-
17
- The implemented example has been deployed at [http://recursivegames.com/cukes/](http://recursivegames.com/cukes/).
18
-
19
- **1. An Item** [example](http://recursivegames.com/cukes/requirements/)
1
+ Child Features
2
+ ==============
3
+
4
+ Synopsis
5
+ --------
6
+
7
+ This collection of features are contained in this folder. The description README
8
+ allows a user to place a description for entire directory of the features and appears
9
+ in the output to assist with understanding about the collection of features.
10
+
11
+ Resources
12
+ ---------
13
+
14
+ Links to particular resources like the links to the stories, tasks, or other areas
15
+ can also be represented.
16
+
17
+ The implemented example has been deployed at [http://recursivegames.com/cukes/](http://recursivegames.com/cukes/).
18
+
19
+ **1. An Item** [example](http://recursivegames.com/cukes/requirements/)
20
+
21
+
@@ -7,10 +7,10 @@ Feature: Displaying Scenarios
7
7
  Background:
8
8
  Given this background step
9
9
 
10
- @first
10
+ @first @bvt
11
11
  Scenario: No Step Scenario
12
12
 
13
- @second
13
+ @second @bvt
14
14
  Scenario: Scenario With Steps
15
15
  Given this first step
16
16
  When this second step
@@ -41,7 +41,7 @@ Feature: Displaying Scenarios
41
41
  Oh what a bother!
42
42
  That this text has to take up two lines
43
43
  This line should be indented 2 spaces
44
- This line should be idented 4 spaces
44
+ This line should be indented 4 spaces
45
45
  """
46
46
 
47
47
  # Comments before the scenario
@@ -4,7 +4,7 @@ require 'gherkin/formatter/tag_count_formatter'
4
4
 
5
5
 
6
6
  module CucumberInTheYARD
7
- VERSION = '1.7.7' unless defined?(CucumberInTheYARD::VERSION)
7
+ VERSION = '1.7.8' unless defined?(CucumberInTheYARD::VERSION)
8
8
  end
9
9
 
10
10
  require File.dirname(__FILE__) + "/yard/code_objects/cucumber/base.rb"
@@ -1,7 +1,7 @@
1
1
  <script type="text/javascript" charset="utf-8">
2
2
  $(function() {
3
3
  $(".developer").hide();
4
- $(".scenario").css('cursor','pointer');
4
+ $(".scenario .title").css('cursor','pointer');
5
5
  });
6
6
  </script>
7
7
 
@@ -1,10 +1,12 @@
1
1
  <div class="scenario <%= @id %>">
2
2
  <a name="<%= @id %>" />
3
3
  <div class="title">
4
- <a class="toggle"> - </a>
5
- <span class="pre"><%= @scenario.keyword %>:</span>
6
- <span class="name"><%= h @scenario.value %></span>
7
- <a class="link" style="float:right; clear:right;" href="<% url_for(@scenario.feature,"scenario#{@id}") %>">link</a>
4
+ <div style="float: left;">
5
+ <a class="toggle"> - </a>
6
+ <span class="pre"><%= @scenario.keyword %>:</span>
7
+ <span class="name"><%= h @scenario.value %></span>
8
+ </div>
9
+ <a class="link" style="float:right; clear:right;" href="<%= url_for(@scenario.feature, @id) %>">link</a>
8
10
  </div>
9
11
 
10
12
  <% if @scenario.description.length > 0 %>
@@ -0,0 +1,26 @@
1
+ <% if @elements && !@elements.empty? %>
2
+ <% i = (@elements.length % 2 == 0 ? 1 : 0) %>
3
+ <table style="margin-left: 10px; width: 100%;">
4
+ <tr>
5
+ <td valign='top' width="50%">
6
+ <% @elements.each do |letter, objects| %>
7
+ <% if (i += 1) > (@elements.length / 2 + 1) %>
8
+ </td><td valign='top' width="50%">
9
+ <% i = 0 %>
10
+ <% end %>
11
+ <ul id="alpha_<%= letter %>" class="alpha">
12
+ <li class="letter"><%= letter %></li>
13
+ <ul>
14
+ <% objects.each do |obj| %>
15
+ <li>
16
+ <%= linkify obj, obj.value %>
17
+ <small>(<%= obj.file %>)</small>
18
+ </li>
19
+ <% end %>
20
+ </ul>
21
+ </ul>
22
+ <% end %>
23
+ </td>
24
+ </tr>
25
+ </table>
26
+ <% end %>
@@ -1,81 +1,32 @@
1
1
  <% if @directory %>
2
- <div class="requirements">
3
- <div class="title">
4
- <span class="pre">Directory:</span>
5
- <span class="name"><%= h @directory.name.to_s.capitalize %></span>
6
- </div>
7
- <div class="meta">
8
- <div class="file"><%= h(@directory.file) %></div>
9
- </div>
10
- <div class="summary">
11
- <span class="name">Features:</span><span class="value"><%= features.size %></span>
12
- <span class="name">Scenarios:</span><span class="value"><%= scenarios.size %></span>
13
- </div>
14
- <div class="tags"><span class="name">Tags:</span>
15
- <%= tags.collect {|tag| linkify(tag,tag.value) }.join(",\n") %>
16
- </div>
17
- </div>
18
2
 
3
+ <div class="requirements">
4
+ <div class="title">
5
+ <span class="pre">Directory:</span>
6
+ <span class="name"><%= h @directory.name.to_s.capitalize %></span>
7
+ </div>
8
+
19
9
  <div class="readme">
20
10
  <%= markdown @directory.description %>
21
11
  </div>
22
12
 
23
- <div>
24
- <% if @objects_by_letter && !@objects_by_letter.empty? %>
25
- <div id="features">
26
- <div class="title"><span class="name">Features</span></div>
27
- </div>
28
- <% i = 0 %>
29
- <table>
30
- <tr>
31
- <td valign='top' width="33%">
32
- <% @objects_by_letter.sort_by {|l,o| l.to_s }.each do |letter, objects| %>
33
- <% if (i += 1) % 8 == 0 %>
34
- </td><td valign='top' width="33%">
35
- <% i = 0 %>
36
- <% end %>
37
- <ul id="alpha_<%= letter %>" class="alpha">
38
- <li class="letter"><%= letter %></li>
39
- <ul>
40
- <% objects.each do |obj| %>
41
- <li>
42
- <%= linkify obj, obj.value %>
43
- <% if !obj.namespace.root? %>
44
- <small>(<%= obj.namespace.file %>)</small>
45
- <% end %>
46
- </li>
47
- <% end %>
48
- </ul>
49
- </ul>
50
- <% end %>
51
- </td>
52
- </tr>
53
- </table>
54
- <% end %>
13
+ <% if features && !features.empty? %>
14
+ <%= alpha_table(features) %>
55
15
  <% end %>
56
16
 
57
- <% if @directories_by_letter && !@directories_by_letter.empty? %>
58
- <div id="directory">
59
- <div class="title"><span class="name">Subdirectories</span></div>
60
- </div>
61
- <% i = 0 %>
62
- <table>
63
- <tr>
64
- <td valign='top' width="33%">
65
- <% @directories_by_letter.each do |directory| %>
66
- <% if (i += 1) % 8 == 0 %>
67
- </td><td valign='top' width="33%">
68
- <% i = 0 %>
69
- <% end %>
70
- <ul>
71
- <%= linkify directory, directory.name %>
72
- </ul>
73
- <% end %>
74
- </td>
75
- </tr>
76
- </table>
17
+ <div id="directory">
18
+ <div class="title"><span class="name">Tags</span></div>
19
+ </div>
20
+ <div class="tags">
21
+ <%= tags.collect {|tag| linkify(tag,tag.value) }.join(",\n") %>
22
+ </div>
77
23
 
24
+ <% if directories && !directories.empty? %>
25
+ <div id="directory">
26
+ <div class="title"><span class="name">Subdirectories</span></div>
27
+ </div>
28
+ <%= alpha_table(directories) %>
78
29
  <% end %>
79
-
80
30
  </div>
81
31
 
32
+ <% end %>
@@ -8,37 +8,34 @@ def markdown(text)
8
8
  htmlify(text,:markdown) rescue h(text)
9
9
  end
10
10
 
11
- def directory
12
- @objects_by_letter = all_types_by_letter(YARD::CodeObjects::Cucumber::Feature)
13
- @directories_by_letter = @directory.children.find_all {|child| child.is_a?(YARD::CodeObjects::Cucumber::FeatureDirectory) }.sort_by {|dir| dir.name.to_s }
14
- erb(:directory)
11
+ def htmlify_with_newlines(text)
12
+ text.split("\n").collect {|c| h(c).gsub(/\s/,'&nbsp;') }.join("<br/>")
15
13
  end
16
14
 
17
- def all_types_by_letter(type)
18
- hash = {}
19
- objects = @directory.children.find_all {|child| child.is_a?(type) }
20
- objects = run_verifier(objects)
21
- objects.each {|o| (hash[o.value.to_s[0,1].upcase] ||= []) << o }
22
- hash.values.each {|v| v.sort! {|a,b| b.value.to_s <=> a.value.to_s } }
23
- hash
15
+ def directories
16
+ @directories ||= @directory.subdirectories
24
17
  end
25
18
 
26
19
  def features
27
- @directory.children.find_all{|child| child.is_a?(YARD::CodeObjects::Cucumber::Feature)}
20
+ @features ||= @directory.features + directories.collect {|d| d.features }.flatten
28
21
  end
29
22
 
30
23
  def scenarios
31
- features.collect {|feature| feature.scenarios }.flatten
32
- end
33
-
34
- def steps
35
- scenarios.collect {|scenario| scenario.steps }.flatten
24
+ @scenarios ||= features.collect {|feature| feature.scenarios }.flatten
36
25
  end
37
26
 
38
27
  def tags
39
- (features.collect{|feature| feature.tags } + scenarios.collect {|scenario| scenario.tags }).flatten.uniq
28
+ @tags ||= (features.collect{|feature| feature.tags } + scenarios.collect {|scenario| scenario.tags }).flatten.uniq.sort_by {|l,o| l.value.to_s }
40
29
  end
41
30
 
42
- def htmlify_with_newlines(text)
43
- text.split("\n").collect {|c| h(c).gsub(/\s/,'&nbsp;') }.join("<br/>")
44
- end
31
+ def alpha_table(objects)
32
+ @elements = Hash.new
33
+
34
+ objects = run_verifier(objects)
35
+ objects.each {|o| (@elements[o.value.to_s[0,1].upcase] ||= []) << o }
36
+ @elements.values.each {|v| v.sort! {|a,b| b.value.to_s <=> a.value.to_s } }
37
+ @elements = @elements.sort_by {|l,o| l.to_s }
38
+
39
+ @elements.each {|letter,objects| objects.sort! {|a,b| b.value.to_s <=> a.value.to_s }}
40
+ erb(:alpha_table)
41
+ end
@@ -17,7 +17,7 @@ def all_tags_by_letter
17
17
  end
18
18
 
19
19
  def tags
20
- @tags ||= Registry.all(:tag)
20
+ @tags ||= Registry.all(:tag).sort_by {|l,o| l.value.to_s }
21
21
  end
22
22
 
23
23
  def features
@@ -7,6 +7,7 @@
7
7
  .control { float: right; font-size: 13px; color: #05A; vertical-align: bottom; font-family: monospace; font-size: 14px; cursor: pointer; }
8
8
 
9
9
  .title { margin: 20px 20px 10px 20px; padding-left: 0px; border-bottom: 1px solid #E3E3E3; }
10
+ .scenario .title { height: 20px; }
10
11
  .noborder { border: none; }
11
12
  #header * .title { padding: 10px; margin: 0px; border: none; }
12
13
 
@@ -20,7 +21,9 @@
20
21
 
21
22
  .suggestion { color: #ff686e; }
22
23
 
23
- .readme { margin: 0px 10px 0px 30px; padding: 0px; }
24
+ .readme { margin: 0px 20px 0px 30px; padding: 0px; }
25
+ .readme h1:first-child { border-top: none; }
26
+
24
27
 
25
28
  .feature .description, .requirements .summary {
26
29
  margin: 10px 20px 0px 30px;
@@ -63,7 +66,7 @@
63
66
  .scenario .title .pre { color: #00AAD2; }
64
67
  .background .title .pre { color: #346F97; }
65
68
 
66
- .requirements .tags { margin-left: 50px; margin-right: 30px; }
69
+ .requirements .tags, .requirements .steptransformers { margin-left: 50px; margin-right: 30px; }
67
70
  .scenario .tags { float: right; margin-right: 20px; margin-top: 5px; }
68
71
 
69
72
 
@@ -153,9 +156,11 @@ div.undefined { padding: 6px; }
153
156
  /* Step Transformer Page */
154
157
  .transformer { margin-top: 20px; }
155
158
  .transformer * .docstring { margin-left: 20px; margin-top: 10px; padding: 5px 5px 5px 10px; }
156
- .transformer .steps, .method_details_list, .steps, .method_details_list { margin: 10px 20px 0px 30px; }
159
+ .transformer .steps, .method_details_list, .steps, .method_details_list, .showSteps { margin: 10px 20px 0px 30px; }
157
160
  .transformer .steps .step { padding: 6px; font-size: 14px; }
158
161
 
162
+ .showSteps { font-size: 0.9em; }
163
+ .showSteps a:link, .showSteps a:visited { text-decoration: none; color: #666; }
159
164
 
160
165
  /* Tag Search Page */
161
166
  #tags * li { padding: 5px; padding-left: 12px; margin: 0 0 0 10px; font-size: 1.1em; list-style: none; }
@@ -1,6 +1,6 @@
1
1
  <% n = 1 %>
2
2
  <li class="r<%= n %>">
3
- <%= linkify YARD::CodeObjects::Cucumber::CUCUMBER_NAMESPACE, "All Features" %>
3
+ <%= all_features_link %>
4
4
  </li>
5
5
  <% n = n == 2 ? 1 : 2 %>
6
6
  <% @items.each do |feature| %>
@@ -295,4 +295,20 @@ function generateCssSelectorFromTags(tagGroups) {
295
295
 
296
296
 
297
297
  return tagSelectors;
298
- }
298
+ }
299
+
300
+
301
+ function createStepDefinitionLinks() {
302
+ // $('.step_instances_list').
303
+ // before("<span class='showSteps'>[<a href='#' class='toggleSteps'>View steps</a>]</span>");
304
+ $('.toggleSteps').toggle(function() {
305
+ $(this).parent().next().slideUp(100);
306
+ $(this).text("View " + $(this).attr('alt'));
307
+ },
308
+ function() {
309
+ $(this).parent().next().slideDown(100);
310
+ $(this).text("Hide " + $(this).attr('alt'));
311
+ });
312
+ }
313
+
314
+ $(createStepDefinitionLinks);
@@ -59,4 +59,14 @@ def serialize_feature_directories(namespaces)
59
59
  end
60
60
  serialize_feature_directories(namespace.children.find_all {|child| child.is_a?(YARD::CodeObjects::Cucumber::FeatureDirectory)})
61
61
  end
62
+ end
63
+
64
+ def all_features_link
65
+ root_feature_directories = YARD::CodeObjects::Cucumber::CUCUMBER_NAMESPACE.children.find_all {|child| child.is_a?(YARD::CodeObjects::Cucumber::FeatureDirectory)}
66
+
67
+ if root_feature_directories.length > 1
68
+ linkify YARD::CodeObjects::Cucumber::CUCUMBER_NAMESPACE, "All Features"
69
+ else
70
+ linkify root_feature_directories.first, "All Features"
71
+ end
62
72
  end
@@ -0,0 +1,26 @@
1
+ <% if @elements && !@elements.empty? %>
2
+ <% i = (@elements.length % 2 == 0 ? 1 : 0) %>
3
+ <table style="margin-left: 10px; width: 100%;">
4
+ <tr>
5
+ <td valign='top' width="50%">
6
+ <% @elements.each do |letter, objects| %>
7
+ <% if (i += 1) > (@elements.length / 2 + 1) %>
8
+ </td><td valign='top' width="50%">
9
+ <% i = 0 %>
10
+ <% end %>
11
+ <ul id="alpha_<%= letter %>" class="alpha">
12
+ <li class="letter"><%= letter %></li>
13
+ <ul>
14
+ <% objects.each do |obj| %>
15
+ <li>
16
+ <%= linkify obj, obj.value %>
17
+ <small>(<%= obj.file %>)</small>
18
+ </li>
19
+ <% end %>
20
+ </ul>
21
+ </ul>
22
+ <% end %>
23
+ </td>
24
+ </tr>
25
+ </table>
26
+ <% end %>
@@ -0,0 +1,50 @@
1
+ <% if @namespace %>
2
+ <div id="cukes_logo">&nbsp;</div>
3
+ <div id="cukes_links">
4
+ <a href="http://cukes.info/">Cucumber</a> |
5
+ <a href="http://github.com/aslakhellesoy/cucumber/wiki/Gherkin">Gherkin</a> |
6
+ <a href="http://yardoc.org/">YARD</a> |
7
+ <a href="http://github.com/burtlo/Cucumber-In-The-Yard">Cucumber-In-The-YARD</a>
8
+ </div>
9
+
10
+ <div class="requirements">
11
+
12
+ <% if features && !features.empty? %>
13
+ <%= alpha_table(features) %>
14
+ <% else %>
15
+ <!-- No Features Defined -->
16
+ <div class="none">No Features Defined</div>
17
+ <% end %>
18
+
19
+ <div id="directory" style="margin-left: 40px;">
20
+ <div class="title"><span class="name">Tags</span></div>
21
+ </div>
22
+ <div class="tags">
23
+ <%= tags.collect {|tag| linkify(tag,tag.value) }.join(",\n") %>
24
+ </div>
25
+
26
+ <% if feature_subdirectories && !feature_subdirectories.empty? %>
27
+ <div id="directory" style="margin-left: 40px;">
28
+ <div class="title"><span class="name">Subdirectories</span></div>
29
+ </div>
30
+ <%= alpha_table(feature_subdirectories) %>
31
+ <% else %>
32
+ <!-- No Feature Directories -->
33
+ <% end %>
34
+
35
+ <div id="directory" style="margin-left: 40px;">
36
+ <div class="title"><span class="name">Step Definitions &amp; Transforms</span></div>
37
+ </div>
38
+ <div class="steptransformers">
39
+ <%= step_definitions.length %>
40
+ <a href="<%= url_for step_transformers, "step_definitions" %>">Step Definitions</a>
41
+ <%= transformers.length %>
42
+ <a href="<%= url_for step_transformers, "step_transforms" %>">Transforms</a>
43
+ and <%= undefined_steps.length %>
44
+ <a href="<%= url_for step_transformers, "undefined_steps" %>">Undefined Steps</a>
45
+ </div>
46
+
47
+ </div>
48
+ <% end %>
49
+
50
+
@@ -1,57 +1,51 @@
1
1
  def init
2
2
  super
3
- sections.push :namespace
3
+ sections.push :requirements
4
4
  @namespace = object
5
5
 
6
6
  end
7
7
 
8
- def namespace
9
- erb(:namespace)
8
+ def features
9
+ @features ||= Registry.all(:feature)
10
10
  end
11
11
 
12
- def all_features_by_letter
13
- hash = {}
14
- objects = features
15
- objects = run_verifier(objects)
16
- objects.each {|o| (hash[o.value.to_s[0,1].upcase] ||= []) << o }
17
- hash.values.each {|v| v.sort! {|a,b| b.value.to_s <=> a.value.to_s } }
18
- hash
12
+ def tags
13
+ @tags ||= Registry.all(:tag).sort_by {|l,o| l.value.to_s }
19
14
  end
20
15
 
21
- def all_scenarios_by_letter
22
- hash = {}
23
- objects = scenarios
24
- objects = run_verifier(objects)
25
- objects.each {|o| (hash[o.value.to_s[0,1].upcase] ||= []) << o }
26
- hash.values.each {|v| v.sort! {|a,b| b.value.to_s <=> a.value.to_s } }
27
- hash
16
+ def feature_directories
17
+ @feature_directories ||= YARD::CodeObjects::Cucumber::CUCUMBER_NAMESPACE.children.find_all {|child| child.is_a?(YARD::CodeObjects::Cucumber::FeatureDirectory)}
28
18
  end
29
19
 
30
- def all_directories_by_letter
31
- hash = {}
32
- objects = feature_directories
33
- objects = run_verifier(objects)
34
- objects.each {|o| (hash[o.value.to_s[0,1].upcase] ||= []) << o }
35
- hash.values.each {|v| v.sort! {|a,b| b.value.to_s <=> a.value.to_s } }
36
- hash
20
+ def feature_subdirectories
21
+ @feature_subdirectories ||= Registry.all(:featuredirectory) - feature_directories
37
22
  end
38
23
 
39
- def feature_directories
40
- @feature_directories ||= Registry.all(:featuredirectory)
24
+ def step_transformers
25
+ YARD::CodeObjects::Cucumber::CUCUMBER_STEPTRANSFORM_NAMESPACE
41
26
  end
42
27
 
43
- def features
44
- @features ||= Registry.all(:feature)
28
+ def step_definitions
29
+ @step_definitions ||= YARD::Registry.all(:stepdefinition)
45
30
  end
46
31
 
47
- def scenarios
48
- @scenarios ||= Registry.all(:scenario).reject {|s| s.background? }
32
+ def transformers
33
+ @transformers ||= YARD::Registry.all(:steptransform)
49
34
  end
50
35
 
51
- def steps
52
- @steps ||= Registry.all(:step)
36
+ def undefined_steps
37
+ @undefined_steps ||= Registry.all(:step).reject {|s| s.definition || s.scenario.outline? }
53
38
  end
54
39
 
55
- def tags
56
- @tags ||= Registry.all(:tag).sort {|a,b| a.value.to_s <=> b.value.to_s }
40
+
41
+ def alpha_table(objects)
42
+ @elements = Hash.new
43
+
44
+ objects = run_verifier(objects)
45
+ objects.each {|o| (@elements[o.value.to_s[0,1].upcase] ||= []) << o }
46
+ @elements.values.each {|v| v.sort! {|a,b| b.value.to_s <=> a.value.to_s } }
47
+ @elements = @elements.sort_by {|l,o| l.to_s }
48
+
49
+ @elements.each {|letter,objects| objects.sort! {|a,b| b.value.to_s <=> a.value.to_s }}
50
+ erb(:alpha_table)
57
51
  end
@@ -1,9 +1,12 @@
1
1
  <div class="title">
2
2
  <% if @item_type %>
3
- <a class="control" href="#" id="<%= @item_type.gsub(/\s/,'') %>">[Collapse All]</a>
3
+ <a class="control" id="<%= @item_type.gsub(/\s/,'') %>">[Collapse All]</a>
4
4
  <div style="clear: right;"></div>
5
5
  <% end %>
6
6
 
7
+ <% if @item_anchor_name %>
8
+ <a name="<%= @item_anchor_name %>">
9
+ <% end %>
7
10
  <div class="name"><%= @item_title %></div>
8
11
  </div>
9
12
 
@@ -0,0 +1,10 @@
1
+ <div class="requirements">
2
+ <div class="title">Step Definitions &amp; Transforms</div>
3
+
4
+ <div class="summary">
5
+ <div><%= step_definitions.length %><a href="#step_definitions">Step Definitions</a></div>
6
+ <div><%= step_transforms.length %><a href="#step_transforms">Step Transforms</a></div>
7
+ <div><%= undefined_steps.length %><a href="#undefined_steps">Undefined Steps</a></div>
8
+ </div>
9
+
10
+ </div>
@@ -1,27 +1,48 @@
1
1
  def init
2
2
  super
3
- sections.push :stepdefinitions, :steptransforms, :undefined_steps
3
+ sections.push :index, :stepdefinitions, :steptransforms, :undefinedsteps
4
+ end
5
+
6
+ def step_definitions
7
+ @step_definitions ||= begin
8
+ YARD::Registry.all(:stepdefinition).sort_by {|definition| definition.steps.length * -1 }
9
+ end
10
+ end
11
+
12
+ def step_transforms
13
+ @step_transforms ||= begin
14
+ YARD::Registry.all(:steptransform).sort_by {|definition| definition.steps.length * -1 }
15
+ end
16
+ end
17
+
18
+ def undefined_steps
19
+ @undefined_steps ||= begin
20
+ unique_steps(Registry.all(:step).reject {|s| s.definition || s.scenario.outline? }).sort_by{|steps| steps.last.length * -1 }
21
+ end
4
22
  end
5
23
 
6
24
  def stepdefinitions
7
- @item_title = "Step Definitions"
25
+ @item_title = "Step Definitions"
26
+ @item_anchor_name = "step_definitions"
8
27
  @item_type = "step definition"
9
- @items = YARD::Registry.all(:stepdefinition)
28
+ @items = step_definitions
10
29
  erb(:header) + erb(:transformers)
11
30
  end
12
31
 
13
32
  def steptransforms
14
33
  @item_title = "Step Transforms"
34
+ @item_anchor_name = "step_transforms"
15
35
  @item_type = "step transform"
16
- @items = YARD::Registry.all(:steptransform)
36
+ @items = step_transforms
17
37
  erb(:header) + erb(:transformers)
18
38
  end
19
39
 
20
- def undefined_steps
21
- @item_title = "Undefined Steps"
40
+ def undefinedsteps
41
+ @item_title = "Undefined Steps"
42
+ @item_anchor_name = "undefined_steps"
22
43
  @item_type = nil
23
- @undefined_steps ||= Registry.all(:step).reject {|s| s.definition || s.scenario.outline? }
24
- erb(:header) + erb(:undefined_steps)
44
+ @items = undefined_steps
45
+ erb(:header) + erb(:undefinedsteps)
25
46
  end
26
47
 
27
48
 
@@ -31,6 +52,7 @@ def unique_steps(steps)
31
52
  uniq_steps
32
53
  end
33
54
 
55
+
34
56
  def link_constants(definition)
35
57
  value = definition.literal_value.dup
36
58
 
@@ -10,15 +10,17 @@
10
10
  </div>
11
11
 
12
12
  <div class="details">
13
+
14
+ <div class="meta" style="clear: right;">
15
+ <div class="file"><%= h item.location %></div>
16
+ </div>
13
17
 
18
+
14
19
  <!-- Comments -->
15
20
  <div>
16
21
  <%= T('docstring').run(options.dup.merge({:object => item})) %>
17
22
  </div>
18
-
19
- <div class="meta" style="clear: right;">
20
- <div class="file"><%= h item.location %></div>
21
- </div>
23
+
22
24
 
23
25
  <!-- Source Code -->
24
26
  <div class="method_details_list">
@@ -35,7 +37,11 @@
35
37
  </div>
36
38
 
37
39
  <!-- Matching Step Instances -->
38
-
40
+ <% if item.steps.length > 0 %>
41
+ <div class='showSteps'>
42
+ [<a href='#' class='toggleSteps' alt="<%= item.steps.length %> steps">Hide <%= item.steps.length %> steps</a>]
43
+ </div>
44
+ <% end %>
39
45
  <div class="steps">
40
46
  <% if item.steps && !item.steps.empty? %>
41
47
  <% unique_steps(item.steps).each_with_index do |uniq_step,step_index| %>
@@ -49,7 +55,7 @@
49
55
  </span>
50
56
  </div>
51
57
  <% uniq_step.last.each do |step| %>
52
- <a class="definition" style="clear: right;" href="<%= url_for step.scenario.feature %>"><%= h step.location %></a>
58
+ <a class="definition" style="clear: right;" href="<%= url_for step.scenario.feature %>"><%= h step.location %></a>
53
59
  <% end %>
54
60
  <div style="clear: both;"></div>
55
61
  </div>
@@ -58,8 +64,9 @@
58
64
  <div class="undefined">No steps were found to match this <%= @item_type %>.</div>
59
65
  <% end%>
60
66
  </div>
67
+
61
68
  </div>
62
-
69
+
63
70
  <div style="margin: 30px 20px; border-top: 1px dotted #AAA;"></div>
64
71
 
65
72
  </div>
@@ -1,7 +1,7 @@
1
1
  <div class="transformer">
2
2
  <div class="steps">
3
3
  <% if @undefined_steps && !@undefined_steps.empty? %>
4
- <% unique_steps(@undefined_steps).each_with_index do |uniq_step,step_index| %>
4
+ <% @undefined_steps.each_with_index do |uniq_step,step_index| %>
5
5
  <div class="step <%= (step_index + 1) % 2 == 0 ? 'even' : 'odd' %>">
6
6
  <div>
7
7
  <span class="predicate"><%= uniq_step.last.first.keyword %></span>
@@ -0,0 +1,26 @@
1
+ <% if @elements && !@elements.empty? %>
2
+ <% i = (@elements.length % 2 == 0 ? 1 : 0) %>
3
+ <table style="margin-left: 10px; width: 100%;">
4
+ <tr>
5
+ <td valign='top' width="50%">
6
+ <% @elements.each do |letter, objects| %>
7
+ <% if (i += 1) > (@elements.length / 2 + 1) %>
8
+ </td><td valign='top' width="50%">
9
+ <% i = 0 %>
10
+ <% end %>
11
+ <ul id="alpha_<%= letter %>" class="alpha">
12
+ <li class="letter"><%= letter %></li>
13
+ <ul>
14
+ <% objects.each do |obj| %>
15
+ <li>
16
+ <%= linkify obj, obj.value %>
17
+ <small>(<%= obj.file %>)</small>
18
+ </li>
19
+ <% end %>
20
+ </ul>
21
+ </ul>
22
+ <% end %>
23
+ </td>
24
+ </tr>
25
+ </table>
26
+ <% end %>
@@ -0,0 +1,27 @@
1
+ def init
2
+ super
3
+ @tag = object
4
+
5
+ sections.push :tag
6
+ end
7
+
8
+ def features
9
+ @tag.features
10
+ end
11
+
12
+ def scenarios
13
+ @tag.scenarios
14
+ end
15
+
16
+
17
+ def alpha_table(objects)
18
+ @elements = Hash.new
19
+
20
+ objects = run_verifier(objects)
21
+ objects.each {|o| (@elements[o.value.to_s[0,1].upcase] ||= []) << o }
22
+ @elements.values.each {|v| v.sort! {|a,b| b.value.to_s <=> a.value.to_s } }
23
+ @elements = @elements.sort_by {|l,o| l.to_s }
24
+
25
+ @elements.each {|letter,objects| objects.sort! {|a,b| b.value.to_s <=> a.value.to_s }}
26
+ erb(:alpha_table)
27
+ end
@@ -1,19 +1,35 @@
1
1
  <div class="tag">
2
- <div class="title">
3
- <span class="pre">Tag:</span>
4
- <span class="name"><%= @tag.value %></span>
5
-
6
- </div>
7
-
8
- <div class="meta">
9
- <div class="file">Usage:
10
- <%= @tag.features.size > 0 ? "#{@tag.features.size} feature#{@tag.features.size > 1 ? 's' : ''} (with #{@tag.indirect_scenarios.size} scenario#{@tag.indirect_scenarios.size > 1 ? 's' : ''})" : "" %>
11
- <%= " and " if @tag.features.size > 0 && @tag.scenarios.size > 0 %>
12
- <%= @tag.scenarios.size > 0 ? "#{@tag.scenarios.size} scenario#{@tag.scenarios.size > 1 ? 's' : ''}" : "" %>
13
- </div>
14
- </div>
15
-
16
- <div style="margin-top: 20px;">&nbsp;</div>
17
- <%= yieldall :object => @tag %>
2
+ <div class="title">
3
+ <span class="pre">Tag:</span>
4
+ <span class="name"><%= @tag.value %></span>
5
+
6
+ </div>
7
+
8
+ <div class="meta">
9
+ <div class="file">
10
+ <%= @tag.features.size > 0 ? "#{@tag.features.size} feature#{@tag.features.size > 1 ? 's' : ''} (with #{@tag.indirect_scenarios.size} scenario#{@tag.indirect_scenarios.size > 1 ? 's' : ''})" : "" %>
11
+ <%= " and " if @tag.features.size > 0 && @tag.scenarios.size > 0 %>
12
+ <%= @tag.scenarios.size > 0 ? "#{@tag.scenarios.size} scenario#{@tag.scenarios.size > 1 ? 's' : ''}" : "" %>
13
+ </div>
14
+ </div>
15
+
16
+ <div style="margin-top: 20px;">&nbsp;</div>
17
+
18
+ <% if features && !features.empty? %>
19
+ <div id="features" style="margin-left: 40px;">
20
+ <div class="title"><span class="name">Features</span></div>
21
+ </div>
22
+ <%= alpha_table(features) %>
23
+
24
+ <% end %>
25
+
26
+ <% if scenarios && !scenarios.empty? %>
27
+ <div id="features" style="margin-left: 40px;">
28
+ <div class="title"><span class="name">Scenarios</span></div>
29
+ </div>
30
+ <%= alpha_table(scenarios) %>
31
+
32
+ <% end %>
33
+
18
34
 
19
35
  </div>
@@ -24,6 +24,17 @@ module YARD::CodeObjects::Cucumber
24
24
  end
25
25
 
26
26
  def value ; name ; end
27
+
28
+ def features
29
+ children.find_all {|d| d.is_a?(Feature) }
30
+ end
31
+
32
+ def subdirectories
33
+ subdirectories = children.find_all {|d| d.is_a?(FeatureDirectory) }
34
+ subdirectories + subdirectories.collect {|s| s.subdirectories }.flatten
35
+ end
36
+
37
+
27
38
  end
28
39
 
29
40
  CUCUMBER_NAMESPACE = Requirements.new(:root, "requirements")
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cucumber-in-the-yard
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
5
4
  prerelease: false
6
5
  segments:
7
6
  - 1
8
7
  - 7
9
- - 7
10
- version: 1.7.7
8
+ - 8
9
+ version: 1.7.8
11
10
  platform: ruby
12
11
  authors:
13
12
  - Franklin Webber
@@ -15,7 +14,7 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2011-01-06 00:00:00 -08:00
17
+ date: 2011-01-30 00:00:00 -08:00
19
18
  default_executable:
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
@@ -26,7 +25,6 @@ dependencies:
26
25
  requirements:
27
26
  - - ">="
28
27
  - !ruby/object:Gem::Version
29
- hash: 21
30
28
  segments:
31
29
  - 2
32
30
  - 2
@@ -42,7 +40,6 @@ dependencies:
42
40
  requirements:
43
41
  - - ">="
44
42
  - !ruby/object:Gem::Version
45
- hash: 9
46
43
  segments:
47
44
  - 0
48
45
  - 7
@@ -58,7 +55,6 @@ dependencies:
58
55
  requirements:
59
56
  - - ">="
60
57
  - !ruby/object:Gem::Version
61
- hash: 1
62
58
  segments:
63
59
  - 0
64
60
  - 6
@@ -81,6 +77,7 @@ files:
81
77
  - README.md
82
78
  - Rakefile
83
79
  - city.gemspec
80
+ - example/README.md
84
81
  - example/child_feature/README.md
85
82
  - example/child_feature/child.feature
86
83
  - example/child_feature/grandchild_feature/grandchild.feature
@@ -106,9 +103,10 @@ files:
106
103
  - lib/templates/default/feature/html/outline.erb
107
104
  - lib/templates/default/feature/html/pystring.erb
108
105
  - lib/templates/default/feature/html/scenario.erb
106
+ - lib/templates/default/feature/html/setup.rb
109
107
  - lib/templates/default/feature/html/steps.erb
110
108
  - lib/templates/default/feature/html/table.erb
111
- - lib/templates/default/feature/setup.rb
109
+ - lib/templates/default/featuredirectory/html/alpha_table.erb
112
110
  - lib/templates/default/featuredirectory/html/directory.erb
113
111
  - lib/templates/default/featuredirectory/html/setup.rb
114
112
  - lib/templates/default/featuretags/html/namespace.erb
@@ -124,16 +122,17 @@ files:
124
122
  - lib/templates/default/fulldoc/html/setup.rb
125
123
  - lib/templates/default/layout/html/headers.erb
126
124
  - lib/templates/default/layout/html/search.erb
127
- - lib/templates/default/requirements/html/namespace.erb
125
+ - lib/templates/default/requirements/html/alpha_table.erb
126
+ - lib/templates/default/requirements/html/requirements.erb
128
127
  - lib/templates/default/requirements/html/setup.rb
129
128
  - lib/templates/default/steptransformers/html/header.erb
129
+ - lib/templates/default/steptransformers/html/index.erb
130
+ - lib/templates/default/steptransformers/html/setup.rb
130
131
  - lib/templates/default/steptransformers/html/transformers.erb
131
- - lib/templates/default/steptransformers/html/undefined_steps.erb
132
- - lib/templates/default/steptransformers/setup.rb
133
- - lib/templates/default/tag/html/feature.erb
134
- - lib/templates/default/tag/html/scenario.erb
132
+ - lib/templates/default/steptransformers/html/undefinedsteps.erb
133
+ - lib/templates/default/tag/html/alpha_table.erb
134
+ - lib/templates/default/tag/html/setup.rb
135
135
  - lib/templates/default/tag/html/tag.erb
136
- - lib/templates/default/tag/setup.rb
137
136
  - lib/yard/code_objects/cucumber/base.rb
138
137
  - lib/yard/code_objects/cucumber/feature.rb
139
138
  - lib/yard/code_objects/cucumber/namespace_object.rb
@@ -161,20 +160,9 @@ has_rdoc: true
161
160
  homepage: http://github.com/burtlo/Cucumber-In-The-Yard
162
161
  licenses: []
163
162
 
164
- post_install_message: |+
165
-
166
- (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)
167
-
168
- Thank you for installing Cucumber-In-The-YARD 1.7.7 / 2011-01-06.
169
-
170
- Changes:
171
-
172
- * Feature Directories now support a README.md file that can be used to provide
173
- information (with markdown support) about the directory of features.
174
-
175
-
176
- (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)
177
-
163
+ post_install_message: "\n\
164
+ (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)\n\n Thank you for installing Cucumber-In-The-YARD 1.7.8 / 2011-01-06.\n \n Changes:\n \n * 'All Features' lands you on the root features directory; 'Requirements'\n is still accessible through the breadcrumbs.\n * Feature directory pages will display all the features in all subdirectories \n * Better sorting for features, tags, and step transformers.\n \n - FIX Feature-Scenario links and Cursors\n \n\n\
165
+ (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)\n\n"
178
166
  rdoc_options:
179
167
  - --charset=UTF-8
180
168
  require_paths:
@@ -184,7 +172,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
184
172
  requirements:
185
173
  - - ">="
186
174
  - !ruby/object:Gem::Version
187
- hash: 3
188
175
  segments:
189
176
  - 0
190
177
  version: "0"
@@ -193,7 +180,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
193
180
  requirements:
194
181
  - - ">="
195
182
  - !ruby/object:Gem::Version
196
- hash: 3
197
183
  segments:
198
184
  - 0
199
185
  version: "0"
@@ -1,90 +0,0 @@
1
- <% if @namespace %>
2
- <div id="cukes_logo">&nbsp;</div>
3
- <div id="cukes_links">
4
- <a href="http://cukes.info/">Cucumber</a> |
5
- <a href="http://github.com/aslakhellesoy/cucumber/wiki/Gherkin">Gherkin</a> |
6
- <a href="http://yardoc.org/">YARD</a> |
7
- <a href="http://github.com/burtlo/Cucumber-In-The-Yard">Cucumber-In-The-YARD</a>
8
- </div>
9
-
10
- <div class="requirements">
11
-
12
- <div class="summary">
13
- <span class="name">Features:</span><span class="value"><%= features.size %></span>
14
- <span class="name">Scenarios:</span><span class="value"><%= scenarios.size %></span>
15
- <span class="name">Steps:</span><span class="value"><%= steps.size %></span>
16
- <span class="name">Tags:</span><span class="value"><%= tags.size %></span>
17
- </div>
18
- <div class="tags"><span class="name">Tags:</span>
19
- <%= tags.collect {|tag| linkify(tag,tag.value) }.join(",\n") %>
20
- </div>
21
-
22
- <% if features && !features.empty? %>
23
- <div id="features" style="margin-left: 40px;">
24
- <div class="title"><span class="name">Features</span></div>
25
- </div>
26
- <% i = 0 %>
27
- <table style="margin-left: 10px;">
28
- <tr>
29
- <td valign='top' width="50%">
30
- <% all_features_by_letter.sort_by {|l,o| l.to_s }.each do |letter, objects| %>
31
- <% if (i += 1) % 13 == 0 %>
32
- </td><td valign='top' width="50%">
33
- <% i = 0 %>
34
- <% end %>
35
- <ul id="alpha_<%= letter %>" class="alpha">
36
- <li class="letter"><%= letter %></li>
37
- <ul>
38
- <% objects.each do |obj| %>
39
- <li class="feature <%= obj.tags.map{|t| t.value }.join(" ") %>">
40
- <%= linkify obj, obj.value %>
41
- <small>(<%= obj.file %>)</small>
42
- </li>
43
- <% end %>
44
- </ul>
45
- </ul>
46
- <% end %>
47
- </td>
48
- </tr>
49
- </table>
50
- <% else %>
51
- <!-- No Features Defined -->
52
- <% end %>
53
-
54
-
55
- <% if feature_directories && !feature_directories.empty? %>
56
- <div id="directory" style="margin-left: 40px;">
57
- <div class="title"><span class="name">Subdirectories</span></div>
58
- </div>
59
- <% i = 0 %>
60
- <table style="margin-left: 10px;">
61
- <tr>
62
- <td valign='top' width="50%">
63
- <% all_directories_by_letter.sort_by {|l,o| l.to_s }.each do |letter, objects| %>
64
- <% if (i += 1) % 13 == 0 %>
65
- </td><td valign='top' width="50%">
66
- <% i = 0 %>
67
- <% end %>
68
- <ul id="alpha_<%= letter %>" class="alpha">
69
- <li class="letter"><%= letter %></li>
70
- <ul>
71
- <% objects.each do |obj| %>
72
- <li>
73
- <%= linkify obj, obj.value %>
74
- <small>(<%= obj.file %>)</small>
75
- </li>
76
- <% end %>
77
- </ul>
78
- </ul>
79
- <% end %>
80
- </td>
81
- </tr>
82
- </table>
83
- <% else %>
84
- <!-- No Feature Directories -->
85
- <% end %>
86
-
87
- </div>
88
- <% end %>
89
-
90
-
@@ -1,29 +0,0 @@
1
- <div id="features">
2
- <div class="title"><span class="name">Features</span></div>
3
- </div>
4
- <% i = 0 %>
5
- <table>
6
- <tr>
7
- <td valign='top' width="33%">
8
- <% all_features_by_letter.sort_by {|l,o| l.to_s }.each do |letter, objects| %>
9
- <% if (i += 1) % 8 == 0 %>
10
- </td><td valign='top' width="33%">
11
- <% i = 0 %>
12
- <% end %>
13
- <ul id="alpha_<%= letter %>" class="alpha">
14
- <li class="letter"><%= letter %></li>
15
- <ul>
16
- <% objects.each do |obj| %>
17
- <li>
18
- <%= linkify obj, obj.value %>
19
- <% if !obj.namespace.root? %>
20
- <small>(<%= obj.namespace.file %>)</small>
21
- <% end %>
22
- </li>
23
- <% end %>
24
- </ul>
25
- </ul>
26
- <% end %>
27
- </td>
28
- </tr>
29
- </table>
@@ -1,33 +0,0 @@
1
- <div id="features">
2
- <div class="title"><span class="name">Scenarios</span></div>
3
- </div>
4
- <% i = 0 %>
5
- <table>
6
- <tr>
7
- <td valign='top' width="33%">
8
- <% all_scenarios_by_letter.sort_by {|l,o| l.to_s }.each do |letter, objects| %>
9
- <% if (i += 1) % 8 == 0 %>
10
- </td><td valign='top' width="33%">
11
- <% i = 0 %>
12
- <% end %>
13
- <ul id="alpha_<%= letter %>" class="alpha">
14
- <li class="letter"><%= letter %></li>
15
- <ul>
16
- <% objects.each do |obj| %>
17
- <li>
18
- <span class='object_link'>
19
- <a href="<%= url_for(obj.feature,"scenario#{obj.feature.scenarios.index(obj) }") %>">
20
- <%= h obj.value %>
21
- </a>
22
- </span>
23
- <% if !obj.namespace.root? %>
24
- <small>(<%= obj.namespace.file %>)</small>
25
- <% end %>
26
- </li>
27
- <% end %>
28
- </ul>
29
- </ul>
30
- <% end %>
31
- </td>
32
- </tr>
33
- </table>
@@ -1,20 +0,0 @@
1
- def init
2
- super
3
- @tag = object
4
-
5
- sections.push :tag
6
- sections.push :feature unless @tag.features.empty?
7
- sections.push :scenario unless @tag.scenarios.empty?
8
- end
9
-
10
- def all_features_by_letter
11
- hash = {}
12
- @tag.features.each {|o| (hash[o.value.to_s[0,1].upcase] ||= []) << o }
13
- hash
14
- end
15
-
16
- def all_scenarios_by_letter
17
- hash = {}
18
- @tag.scenarios.each {|o| (hash[o.value.to_s[0,1].upcase] ||= []) << o }
19
- hash
20
- end