cucumber-in-the-yard 1.7.1 → 1.7.2

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
+ === 1.7.2 / 2010-11-30
2
+
3
+ * Step Definition and Transform page enhancements
4
+ * Step Regex links to Rubular
5
+ * FIX Steps with HTML encoded characters will display correctly
6
+
1
7
  === 1.7.1 / 2010-11-28
2
8
 
3
9
  * Feature file with layout enhancements
data/README.md CHANGED
@@ -20,21 +20,22 @@ a new developer; quality assurance engineer; or product owner/stakeholder.
20
20
 
21
21
  The implemented example has been deployed at [http://recursivegames.com/cukes/](http://recursivegames.com/cukes/).
22
22
 
23
- **1. Formatted Features** [example](http://recursivegames.com/cukes/requirements/example/scenario.html)
23
+ **1. View Features and Scenarios** [example](http://recursivegames.com/cukes/requirements/)
24
24
 
25
- **2. Search through features, scenarios, and tags** [example](http://recursivegames.com/cukes/feature_list.html) & [example](http://recursivegames.com/cukes/tag_list.html)
25
+ **2. Search through [features, scenarios](http://recursivegames.com/cukes/feature_list.html), and [tags](http://recursivegames.com/cukes/tag_list.html)**
26
26
 
27
27
  **3. Dynamic Tag Unions and Intersections** [example](http://recursivegames.com/cukes/requirements/tags.html)
28
28
 
29
- **4. View features and scenarios by tag** [example](http://recursivegames.com/cukes/requirements/tags/bvt.html)
29
+ **4. View all features and scenarios by tag** [example](http://recursivegames.com/cukes/requirements/tags/message.html)
30
30
 
31
- **5. Steps link to their step definitions** [example](http://recursivegames.com/cukes/requirements/example/scenario.html)
31
+ **5. View Step Definitions and Transforms** [example](http://recursivegames.com/cukes/requirements/step_transformers.html)
32
32
 
33
- **6. Step definitions show implemented steps** [example](http://recursivegames.com/cukes/requirements/step_transformers.html#definition_13-stepdefinition)
33
+ **6. All steps [matched](http://recursivegames.com/cukes/requirements/step_transformers.html#definition_5-stepdefinition) to step definitions**
34
34
 
35
- **7. Step definitions show the step transforms used** [example](http://recursivegames.com/cukes/requirements/step_transformers.html#transform_8-steptransform)
35
+ **7. [Steps](http://recursivegames.com/cukes/requirements/step_transformers.html#transform_3-steptransform) that have transforms applied to them**
36
+
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.**
36
38
 
37
- **8. Undefined steps are listed** [example](http://recursivegames.com/cukes/requirements/step_transformers.html#undefined_steps)
38
39
 
39
40
  Installation
40
41
  ------------
@@ -121,15 +122,15 @@ The table step transform matching would be nice to show which tables are affecte
121
122
  Document the additional before, after, and around hooks that Cucumber uses. Specifically display the before, after, and around
122
123
  hooks that are tied to tags (unions and intersections) on the tag pages.
123
124
 
124
- **3. Layout refinements of the step definition / step tranform page**
125
+ **3. Layout refinements of the step definition / step transform page**
125
126
 
126
127
  More work could be done to make this page more searchable, sortable, and usable.
127
128
 
128
- **4. Visualization of /Scenario Tag unions and intersections**
129
+ **4. Visualization of Tag unions and intersections**
129
130
 
130
131
  Continue to expand the tag union/intersection tool. Visualization of this execution with some graphing library for some extra points.
131
132
 
132
- **5. Requirements Only Docuementation**
133
+ **5. Requirements Only Documentation**
133
134
 
134
135
  'fulldoc' is the default documentation generated but I have this thought that a requirements-only document
135
136
  may be useful. Essentially the first draft would be the current documentation minus the class and method
@@ -52,3 +52,6 @@ Feature: Scenario
52
52
  And this third step
53
53
  # Comments after the last step, where do they go?
54
54
 
55
+ Scenario: Step ending with a match with double-quotes
56
+ When searching the log for the exact match of the message "Entering application."
57
+ When the step definition has HTML escaped characters like: "<>&"
@@ -81,6 +81,20 @@ Then /I expect the (duck|bird) to (\w+)/ do |animal,verb|
81
81
  pending
82
82
  end
83
83
 
84
+ #
85
+ # This double-quoted step definition caused some problems when being rendered
86
+ #
87
+ When /^searching the log for the exact match of the message "([^"]+)"$/ do |message|
88
+ pending message
89
+ end
90
+
91
+ #
92
+ #
93
+ #
94
+ When /^the step definition has HTML escaped characters like: "([^"]+)"$/ do |characters|
95
+ pending characters
96
+ end
97
+
84
98
 
85
99
  #
86
100
  # Some details about the helper method that might be picked up in the documentation.
data/lib/city.rb CHANGED
@@ -3,7 +3,7 @@ require 'gherkin/parser/parser'
3
3
  require 'gherkin/formatter/tag_count_formatter'
4
4
 
5
5
  module CucumberInTheYARD
6
- VERSION = '1.7.1' unless defined?(CucumberInTheYARD::VERSION)
6
+ VERSION = '1.7.2' unless defined?(CucumberInTheYARD::VERSION)
7
7
  end
8
8
 
9
9
  require File.dirname(__FILE__) + "/yard/code_objects/cucumber/base.rb"
@@ -9,8 +9,8 @@
9
9
  <span class="pre"><%= @feature.keyword %>:</span>
10
10
  <span class="name"><%= @feature.value %></span>
11
11
 
12
- <div id="view">[More Detail]</div>
13
- <div id="expand">[Collapse All]</div>
12
+ <div id="view" class="control">[More Detail]</div>
13
+ <div id="expand" class="control">[Collapse All]</div>
14
14
  </div>
15
15
 
16
16
  <div class="meta">
@@ -1,7 +1,7 @@
1
- <div class="scenario">
1
+ <div class="scenario <%= @id %>">
2
2
  <a name="<%= @id %>" />
3
3
  <div class="title">
4
- <a class="toggle">&nbsp;-&nbsp;</a>
4
+ <a class="toggle"> - </a>
5
5
  <span class="pre"><%= @scenario.keyword %>:</span>
6
6
  <span class="name"><%= h @scenario.value %></span>
7
7
  </div>
@@ -34,8 +34,7 @@ end
34
34
 
35
35
 
36
36
  def highlight_matches(step)
37
-
38
- value = h(step.value)
37
+ value = step.value.dup
39
38
 
40
39
  if step.definition
41
40
  matches = step.value.match(step.definition.regex)
@@ -43,7 +42,7 @@ def highlight_matches(step)
43
42
  if matches
44
43
  matches[1..-1].reverse.each_with_index do |match,index|
45
44
  next if match == nil
46
- value[matches.begin((matches.size - 1) - index)..(matches.end((matches.size - 1) - index) - 1)] = "<span class='match'>#{match}</span>"
45
+ value[matches.begin((matches.size - 1) - index)..(matches.end((matches.size - 1) - index) - 1)] = "<span class='match'>#{h(match)}</span>"
47
46
  end
48
47
  end
49
48
  end
@@ -5,8 +5,9 @@
5
5
  .title { padding: 10px; font-size: 24px; }
6
6
 
7
7
  #view, #expand { float: right; font-size: 13px; color: gray; vertical-align: bottom; }
8
+ .control { float: right; font-size: 13px; color: gray; vertical-align: bottom; font-family: monospace; font-size: 14px; cursor: pointer; }
8
9
 
9
- .feature > .title, .tag > .title, .requirements > .title { margin: 20px 20px 10px 20px; padding-left: 0px; border-bottom: 1px solid #E3E3E3; }
10
+ .title { margin: 20px 20px 10px 20px; padding-left: 0px; border-bottom: 1px solid #E3E3E3; }
10
11
  .meta .file { float: right; margin-top: 5px; margin-right: 20px; }
11
12
  .title .pre { color: #696969; }
12
13
  .title .name { font-weight: bold; color: #3F3F3F; }
@@ -30,7 +31,7 @@
30
31
  .selected { background-color: #FFCC80; }
31
32
 
32
33
 
33
- #background, #features, #scenarios { margin-top: 10px; margin-left: 20px; }
34
+ #features, #scenarios { margin-top: 10px; margin-left: 20px; }
34
35
 
35
36
 
36
37
  #directory { margin-top: 20px; margin-left: 20px; }
@@ -38,17 +39,20 @@
38
39
  .scenario { margin-top: 40px; margin-left: 20px; }
39
40
  .requirements * .scenario { margin-top: 0px; margin-left: 0px; }
40
41
 
41
- .scenario .title, #background .title {
42
- font-size: 16px;
43
- padding-left: 0px;
44
- margin: 0px 20px 0px 10px;
45
- border-bottom: 1px solid #E3E3E3;
42
+ .scenario .title, .transformer .title {
43
+ font-size: 1.1em; font-weight: normal; font-family: Monaco, Consolas, Courier, monospace;
44
+ padding: 6px 10px; margin-top: 18px;
45
+ background: #e5e8ff; border: 1px solid #d8d8e5; -moz-border-radius: 3px; -webkit-border-radius: 3px;
46
46
  }
47
+ .scenario .title { border: none; }
48
+ .background .title { background: #cbddeb; }
47
49
 
48
50
  #directory .title, #features .title, #scenarios .title { padding-left: 0px; margin-left: 10px; border-bottom: 1px solid #E3E3E3; }
49
51
  #directory .title .name, #features .title .name, #scenarios .title .name { font-weight: normal; }
50
52
 
51
- #background .title .pre { color: #346F97; }
53
+ .scenario .title .pre { color: #00AAD2; }
54
+ .background .title .pre { color: #346F97; }
55
+
52
56
  .requirements .tags { margin-left: 50px; margin-right: 30px; }
53
57
  .scenario .tags { float: right; margin-right: 20px; margin-top: 5px; }
54
58
 
@@ -60,12 +64,12 @@
60
64
  * ul small { color: #666; font-size: 0.7em; }
61
65
 
62
66
 
63
- .scenario .steps, #background .steps {
67
+ .scenario .steps {
64
68
  margin: 0px 20px 0px 30px;
65
69
  font-size: 12px;
66
70
  }
67
71
 
68
- .scenario .step, #background .step, .steps .none {
72
+ .scenario .step, .steps .none {
69
73
  margin-top: 4px;
70
74
  padding: 4px;
71
75
  font-size: 14px;
@@ -73,12 +77,7 @@
73
77
  }
74
78
  .steps .none { color: #5D5C5B; }
75
79
 
76
-
77
- #background .title .name {}
78
-
79
- .scenario .title .name {}
80
-
81
- #background .description, .scenario .description {
80
+ .scenario .description {
82
81
  padding: 10px;
83
82
  color: #444444;
84
83
  margin-right: 20px;
@@ -88,10 +87,9 @@
88
87
  .comments { margin-left: 25px; color: gray; padding: 5px; font-size: 13px; }
89
88
  .scenario .steps .comments { margin-left: 0px; }
90
89
 
91
- .scenario .title .pre { color: #00AAD2; }
92
90
 
93
91
  .step .predicate { color: #5D5C5B; }
94
- /*.step .undefined { border-bottom: 1px dashed #E99494; }*/
92
+
95
93
  .step .defined {}
96
94
  .step .definition { float: right; color: #343332; }
97
95
  .step .details .pre {}
@@ -123,7 +121,7 @@
123
121
  .multiline table thead tr th, .outline table thead tr th {
124
122
  text-align: left;
125
123
  padding: 4px;
126
- background-color: #A8C0A8;
124
+ background-color: #C4E0C7;
127
125
  }
128
126
  .multiline table tr td, .outline table tr td {
129
127
  min-width: 100px;
@@ -141,20 +139,16 @@
141
139
  .tag .scenario .meta { margin-top: 0px; }
142
140
  /* Overrides for scenarios in the tag view */
143
141
 
144
- .stepdef * .docstring { margin-left: 20px; margin-top: 10px; padding: 5px 5px 5px 10px; }
145
142
 
146
- .stepdef .title {
147
- font-size: 14px;
148
- margin-top: 30px;
149
- border-bottom: 1px solid #E3E3E3;
150
- }
151
143
 
152
- .stepdef .steps, .stepdef .method_details_list {
153
- margin: 10px 0px 0px 30px;
154
- }
155
- .stepdef .steps .step {
156
- padding: 4px;
144
+ .transformer * .docstring { margin-left: 20px; margin-top: 10px; padding: 5px 5px 5px 10px; }
145
+ .transformer .steps, .method_details_list, .steps, .method_details_list {
146
+ margin: 10px 20px 0px 30px;
157
147
  }
148
+ .transformer .steps .step { padding: 4px; }
149
+
150
+
151
+
158
152
  #tags * li { padding: 5px; padding-left: 12px; margin: 0 0 0 10px; font-size: 1.1em; list-style: none; }
159
153
 
160
154
  #tag_search { margin: 10px 0px 10px 0px; width: 100%; min-width: 200px; height: 20px; }
@@ -12,84 +12,111 @@ $(cucumberSearchFrameLinks);
12
12
 
13
13
  $(function() {
14
14
 
15
- //
15
+ //
16
16
  // Feature Page - Scenarios
17
17
  //
18
- $('.scenario div.title').click(function(eventObject) {
18
+ $('.scenario div.title').click(function(eventObject) {
19
19
  if (typeof eventObject.currentTarget !== "undefined") {
20
20
  toggleScenario( $($(eventObject.currentTarget).parent()) );
21
21
  }
22
22
  });
23
23
 
24
- //
25
- // Developer View
24
+ //
25
+ // Developer View
26
26
  // Click + Developer View = toggle the expansion of all tags, location, and comments
27
27
  //
28
- $('#view').click(function(eventObject) {
28
+ $('#view').click(function(eventObject) {
29
29
 
30
- if (typeof eventObject.currentTarget !== "undefined") {
31
- var view = eventObject.currentTarget;
30
+ if (typeof eventObject.currentTarget !== "undefined") {
31
+ var view = eventObject.currentTarget;
32
32
 
33
- if (view.innerHTML === '[More Detail]') {
34
- $('.developer').show(500);
35
- view.innerHTML = '[Less Detail]';
36
- } else {
37
- $('.developer').hide(500);
38
- // Already hidden elements with .developer sub-elements were not getting message
39
- $('.developer').each(function() { $(this).css('display','none'); });
40
- view.innerHTML = '[More Detail]';
41
- }
42
- }
33
+ if (view.innerHTML === '[More Detail]') {
34
+ $('.developer').show(500);
35
+ view.innerHTML = '[Less Detail]';
36
+ } else {
37
+ $('.developer').hide(500);
38
+ // Already hidden elements with .developer sub-elements were not getting message
39
+ $('.developer').each(function() {
40
+ $(this).css('display','none');
41
+ });
42
+ view.innerHTML = '[More Detail]';
43
+ }
44
+ }
43
45
  });
44
46
 
45
- //
46
- // Expand/Collapse All
47
- //
47
+ //
48
+ // Expand/Collapse All
49
+ //
48
50
  $('#expand').click(function(eventObject) {
49
51
 
50
- if (typeof eventObject.currentTarget !== "undefined") {
52
+ if (typeof eventObject.currentTarget !== "undefined") {
51
53
  if (eventObject.currentTarget.innerHTML === '[Expand All]') {
52
54
  eventObject.currentTarget.innerHTML = '[Collapse All]';
53
55
  $('div.scenario > div.details:hidden').each(function() {
54
- toggleScenario( $($(this).parent()) );
56
+ toggleScenario( $($(this).parent()) );
55
57
  });
56
58
  } else {
57
59
  eventObject.currentTarget.innerHTML = '[Expand All]';
58
60
  $('div.scenario > div.details:visible').each(function() {
59
- toggleScenario( $($(this).parent()) );
60
- });
61
+ toggleScenario( $($(this).parent()) );
62
+ });
63
+ }
64
+ }
65
+ });
66
+
67
+ //
68
+ // Expand/Collapse All
69
+ //
70
+ $('#stepdefinition,#steptransform').click(function(eventObject) {
71
+
72
+ if (typeof eventObject.currentTarget !== "undefined") {
73
+ if (eventObject.currentTarget.innerHTML === '[Expand All]') {
74
+ eventObject.currentTarget.innerHTML = '[Collapse All]';
75
+ $('div.' + eventObject.currentTarget.id + ' > div.details:hidden').each(function() {
76
+ $(this).show(200);
77
+ });
78
+ } else {
79
+ eventObject.currentTarget.innerHTML = '[Expand All]';
80
+ $('div.' + eventObject.currentTarget.id + ' > div.details:visible').each(function() {
81
+ $(this).hide(200);
82
+ });
61
83
  }
62
84
  }
63
85
  });
64
86
 
65
- //
66
- // Scenario Outlines - Toggle Examples
67
- //
68
- $('.outline table tr').click(function(eventObject) {
87
+
88
+ //
89
+ // Scenario Outlines - Toggle Examples
90
+ //
91
+ $('.outline table tr').click(function(eventObject) {
69
92
 
70
- if (typeof eventObject.currentTarget !== "undefined") {
71
- var exampleRow = $(eventObject.currentTarget);
72
- var exampleClass = eventObject.currentTarget.className.match(/example\d+/)[0];
73
- var example = exampleRow.closest('div.details').find('.' + exampleClass);
93
+ if (typeof eventObject.currentTarget !== "undefined") {
94
+ var exampleRow = $(eventObject.currentTarget);
95
+ var exampleClass = eventObject.currentTarget.className.match(/example\d+/)[0];
96
+ var example = exampleRow.closest('div.details').find('.' + exampleClass);
74
97
 
75
- var currentExample = null;
98
+ var currentExample = null;
76
99
 
77
- $('.outline table tr').each(function() { $(this).removeClass('selected'); });
100
+ $('.outline table tr').each(function() {
101
+ $(this).removeClass('selected');
102
+ });
78
103
 
79
- if ( example[0].style.display == 'none' ) {
80
- currentExample = example[0];
81
- exampleRow.addClass('selected');
82
- } else {
83
- currentExample = exampleRow.closest('div.details').find('.steps')[0];
84
- }
85
-
86
- // hide everything
87
- exampleRow.closest('div.details').find('.steps').each(function() { $(this).hide(); });
104
+ if ( example[0].style.display == 'none' ) {
105
+ currentExample = example[0];
106
+ exampleRow.addClass('selected');
107
+ } else {
108
+ currentExample = exampleRow.closest('div.details').find('.steps')[0];
109
+ }
110
+
111
+ // hide everything
112
+ exampleRow.closest('div.details').find('.steps').each(function() {
113
+ $(this).hide();
114
+ });
88
115
 
89
- // show the selected
90
- $(currentExample).show();
91
- }
92
- });
116
+ // show the selected
117
+ $(currentExample).show();
118
+ }
119
+ });
93
120
 
94
121
 
95
122
  });
@@ -97,18 +124,26 @@ $(function() {
97
124
 
98
125
  function toggleScenario(scenario) {
99
126
 
100
- var state = scenario.find(".attributes input[name='collapsed']")[0];
127
+ var state = scenario.find(".attributes input[name='collapsed']")[0];
101
128
 
102
- if (state.value === 'true') {
103
- scenario.find("div.details").each(function() { $(this).show(500); });
104
- state.value = "false";
105
- scenario.find('a.toggle').each(function() { this.innerHTML = ' - '; });
129
+ if (state.value === 'true') {
130
+ scenario.find("div.details").each(function() {
131
+ $(this).show(500);
132
+ });
133
+ state.value = "false";
134
+ scenario.find('a.toggle').each(function() {
135
+ this.innerHTML = ' - ';
136
+ });
106
137
 
107
- } else {
108
- scenario.find("div.details").each(function() { $(this).hide(500); });
109
- state.value = "true";
110
- scenario.find('a.toggle').each(function() { this.innerHTML = ' + '; });
111
- }
138
+ } else {
139
+ scenario.find("div.details").each(function() {
140
+ $(this).hide(500);
141
+ });
142
+ state.value = "true";
143
+ scenario.find('a.toggle').each(function() {
144
+ this.innerHTML = ' + ';
145
+ });
146
+ }
112
147
  }
113
148
 
114
149
 
@@ -50,5 +50,5 @@ def steps
50
50
  end
51
51
 
52
52
  def tags
53
- @tags ||= Registry.all(:tag)
53
+ @tags ||= Registry.all(:tag).sort {|a,b| a.value.to_s <=> b.value.to_s }
54
54
  end
@@ -1,7 +1,9 @@
1
- <div style="margin: 10px;">&nbsp;</div>
2
-
3
1
  <div class="title">
4
- <div class="name"><%= @item_title %></div>
2
+ <div class="name"><%= @item_title %></div>
3
+
4
+ <% if @item_type %>
5
+ <div class="control" id="<%= @item_type.gsub(/\s/,'') %>">[Collapse All]</div>
6
+ <div style="clear: right;"></div>
7
+ <% end %>
5
8
  </div>
6
9
 
7
- <div style="margin: 10px;">&nbsp;</div>
@@ -1,46 +1,61 @@
1
1
  <% @items.each do |item| %>
2
2
 
3
- <div class="stepdef">
4
- <a name="<%= anchor_for item %>"></a>
5
- <div class="title">
6
- <span class="pre"><%= item.keyword %></span>
7
- <span class="name"><%= item.value %></span>
8
- <div style="float: right;"><%= h( item.location ) %></div>
9
- </div>
10
- <div>
11
- <%= T('docstring').run(options.dup.merge({:object => item})) %>
3
+ <div class="transformer <%= @item_type.gsub(/\s/,'') %>">
4
+ <a name="<%= anchor_for item %>"></a>
5
+ <div class="title">
6
+ <span class="pre"><%= h item.keyword %></span>
7
+ <span class="name"><%= h item.value %></span>
8
+ <a style="float: right;" href="http://rubular.com/?regex=<%= urlencode item.value %>" target="_blank">Rubular</a>
9
+ <div style="clear: both;"></div>
10
+ </div>
11
+
12
+ <div class="details">
13
+
14
+ <div class="meta" style="clear: right;">
15
+ <div class="file"><%= h item.location %></div>
16
+ </div>
17
+
18
+ <!-- Comments -->
19
+ <div>
20
+ <%= T('docstring').run(options.dup.merge({:object => item})) %>
21
+ </div>
22
+
23
+ <!-- Source Code -->
24
+ <div class="method_details_list">
25
+ <table class="source_code">
26
+ <tr>
27
+ <td>
28
+ <pre class="lines"><%= "" %><%= h format_lines(item) %></pre>
29
+ </td>
30
+ <td>
31
+ <pre class="code"><%= "" %><%= html_syntax_highlight item.source %></pre>
32
+ </td>
33
+ </tr>
34
+ </table>
35
+ </div>
36
+
37
+ <!-- Matching Step Instances -->
38
+ <div class="steps">
39
+ <% if item.steps && !item.steps.empty? %>
40
+ <% item.steps.each_with_index do |step,step_index| %>
41
+ <div class="step <%= (step_index + 1) % 2 == 0 ? 'even' : 'odd' %>">
42
+ <span class="predicate">
43
+ <%= h step.keyword %>
44
+ </span>
45
+ <span class="defined">
46
+ <%= link_transformed_step(step) %>
47
+ </span>
48
+ <a class="definition" href="<%= url_for step.scenario.feature %>"><%= h step.location %></a>
49
+ <div style="clear: both;"></div>
50
+ </div>
51
+ <% end %>
52
+ <% else %>
53
+ <div class="undefined">No steps were found to match this <%= @item_type %>.</div>
54
+ <% end%>
55
+ </div>
56
+
57
+ </div>
58
+
12
59
  </div>
13
- <div class="method_details_list">
14
- <table class="source_code">
15
- <tr>
16
- <td>
17
- <pre class="lines"><%= "" %><%= h format_lines(item) %></pre>
18
- </td>
19
- <td>
20
- <pre class="code"><%= "" %><%= html_syntax_highlight item.source %></pre>
21
- </td>
22
- </tr>
23
- </table>
24
- </div>
25
-
26
- <div class="steps">
27
- <% if item.steps && !item.steps.empty? %>
28
- <% item.steps.each_with_index do |step,step_index| %>
29
- <div class="step <%= (step_index + 1) % 2 == 0 ? 'even' : 'odd' %>">
30
- <span class="predicate">
31
- <%= step.keyword %>
32
- </span>
33
- <span class="defined">
34
- <%= link_transformed_step(step) %>
35
- </span>
36
- <div class="definition"><a href="<%= url_for step.scenario.feature %>"><%= h(step.location) %></a></div>
37
- </div>
38
- <% end %>
39
- <% else %>
40
- <span class="undefined">No steps were found to match this <%= @item_type %>.</span>
41
- <% end%>
42
- </div>
43
-
44
- </div>
45
60
 
46
61
  <% end %>
@@ -1,4 +1,4 @@
1
- <div class="stepdef">
1
+ <div class="transformer">
2
2
  <div class="steps">
3
3
  <% if @undefined_steps && !@undefined_steps.empty? %>
4
4
  <% @undefined_steps.each_with_index do |step,step_index| %>
@@ -7,14 +7,13 @@
7
7
  <span class="undefined">
8
8
  <%= h step.value %>
9
9
  </span>
10
- <div class="definition">
11
- <a href="<%= url_for step.scenario.feature %>"><%= h(step.location) %></a>
12
- </div>
10
+ <a class="definition" href="<%= url_for step.scenario.feature %>"><%= h(step.location) %></a>
11
+ <div style="clear: both;"></div>
13
12
  </div>
14
13
  <% end %>
15
14
  <% else %>
16
15
  <div class="steps">
17
- <span class="undefined">No undefined steps</span>
16
+ <div class="undefined">No undefined steps</div>
18
17
  </div>
19
18
  <% end%>
20
19
  </div>
@@ -1,6 +1,6 @@
1
1
  def init
2
2
  super
3
- sections.push :steptransformers, [:stepdefinitions, :steptransforms], :undefined_steps
3
+ sections.push :stepdefinitions, :steptransforms, :undefined_steps
4
4
  end
5
5
 
6
6
 
@@ -20,14 +20,14 @@ end
20
20
 
21
21
  def undefined_steps
22
22
  @item_title = "Undefined Steps"
23
- @item_type = "undefined steps"
23
+ @item_type = nil
24
24
  @undefined_steps ||= Registry.all(:step).reject {|s| s.definition || s.scenario.outline? }
25
25
  erb(:header) + erb(:undefined_steps)
26
26
  end
27
27
 
28
28
 
29
29
  def link_transformed_step(step)
30
- value = step.value
30
+ value = step.value.dup
31
31
 
32
32
  if step.definition
33
33
  matches = step.value.match(step.definition.regex)
@@ -37,7 +37,7 @@ def link_transformed_step(step)
37
37
  next if match == nil
38
38
  transform = step.transforms.find {|transform| transform.regex.match(match) }
39
39
 
40
- value[matches.begin((matches.size - 1) - index)..(matches.end((matches.size - 1) - index) - 1)] = transform ? "<a href='#{url_for(transform)}'>#{match}</a>" : "<span class='match'>#{match}</span>"
40
+ value[matches.begin((matches.size - 1) - index)..(matches.end((matches.size - 1) - index) - 1)] = transform ? "<a href='#{url_for(transform)}'>#{h(match)}</a>" : "<span class='match'>#{match}</span>"
41
41
  end
42
42
  end
43
43
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cucumber-in-the-yard
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 15
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 7
9
- - 1
10
- version: 1.7.1
9
+ - 2
10
+ version: 1.7.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Franklin Webber
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-28 00:00:00 -08:00
18
+ date: 2010-11-30 00:00:00 -08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -126,7 +126,6 @@ files:
126
126
  - lib/templates/default/scenario/html/scenario.erb
127
127
  - lib/templates/default/scenario/setup.rb
128
128
  - lib/templates/default/steptransformers/html/header.erb
129
- - lib/templates/default/steptransformers/html/steptransformers.erb
130
129
  - lib/templates/default/steptransformers/html/transformers.erb
131
130
  - lib/templates/default/steptransformers/html/undefined_steps.erb
132
131
  - lib/templates/default/steptransformers/setup.rb
@@ -163,14 +162,13 @@ post_install_message: |+
163
162
 
164
163
  (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)
165
164
 
166
- Thank you for installing Cucumber-In-The-YARD 1.7.1 / 2010-11-28.
165
+ Thank you for installing Cucumber-In-The-YARD 1.7.2 / 2010-11-30.
167
166
 
168
167
  Changes:
169
168
 
170
- * Feature file with layout enhancements
171
- * Scenarios are now linked/linkable
172
- * FIX Scenario Outline error on CentOS, Ruby 1.8.7
173
- * FIX Requiring Cucumber before Gherkin so that correct gherkin is loaded
169
+ * Step Definition and Transform page enhancements
170
+ * Step Regex links to Rubular
171
+ * FIX Steps with HTML encoded characters will display correctly
174
172
 
175
173
 
176
174
  (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)
@@ -1 +0,0 @@
1
- <%= yieldall %>