cucumber-in-the-yard 1.2 → 1.3

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,15 @@
1
+ === 1.3 / 2010-10-13
2
+
3
+ * (7rans requested) Step definitions to show their source code; required a better source definition to be stored during creation of the CodeObject
4
+ * Fixes to the Feature template which had some unclosed table header elements
5
+ * Scenario Outline helper methods added to Scenarios
6
+ * Scenario Outlines, Tables, and Multiline Strings had other minor CSS changes
7
+ * Step tables and Scenario Example tables are no longer locked to 150px; instead that is the minimum width
8
+ * Tables and Multiline Strings (PyStrings) are no longer displayed in the steps frame which was causing ugliness with the striping of the rows
9
+ * (lsegal strongly recommended) Removed the pervasive use of filename in the CodeObjects
10
+ * Cleaned up the fulldoc setup to remove the redundancy
11
+ * Updated all the templates to support the lack of filename
12
+
1
13
  === 1.2 / 2010-10-10
2
14
 
3
15
  * FIX: Empty Step Definitions caused failure during serialization
data/Manifest CHANGED
@@ -1,13 +1,15 @@
1
1
  History.txt
2
+ Manifest
2
3
  README.md
3
4
  Rakefile
5
+ example/empty.feature
4
6
  example/example.feature
5
7
  example/example.step.rb
6
8
  example/example.third.feature
7
9
  example/second_example.feature
8
10
  lib/city.rb
9
11
  lib/cucumber/city_builder.rb
10
- lib/yard/code_objects/cucumber_location_helper.rb
12
+ lib/yard/code_objects/base.rb
11
13
  lib/yard/code_objects/feature.rb
12
14
  lib/yard/code_objects/scenario.rb
13
15
  lib/yard/code_objects/step.rb
@@ -16,8 +18,8 @@ lib/yard/extensions.rb
16
18
  lib/yard/handlers/base.rb
17
19
  lib/yard/handlers/feature_handler.rb
18
20
  lib/yard/parser/feature.rb
19
- lib/yard/rb_extensions.rb
20
21
  lib/yard/rake/city_task.rb
22
+ lib/yard/rb_extensions.rb
21
23
  lib/yard/templates/default/feature/html/feature.erb
22
24
  lib/yard/templates/default/feature/setup.rb
23
25
  lib/yard/templates/default/fulldoc/html/css/common.css
@@ -48,4 +50,3 @@ spec/city/yard_namespace_object_spec.rb
48
50
  spec/city/yard_parser_cucumber_spec.rb
49
51
  spec/city/yard_rb_extensions_spec.rb
50
52
  spec/spec_helper.rb
51
- Manifest
data/Rakefile CHANGED
@@ -7,7 +7,7 @@ task :gendoc do
7
7
  `yardoc -e lib/city.rb -p lib/yard/templates 'example/**/*.rb' 'example/**/*.feature' --debug`
8
8
  end
9
9
 
10
- Echoe.new('cucumber-in-the-yard', '1.2') do |g|
10
+ Echoe.new('cucumber-in-the-yard', '1.3') do |g|
11
11
  g.author = "Frank;lin Webber"
12
12
  g.email = "franklin.webber@gmail.com"
13
13
  g.url = "http://github.com/burtlo/Cucumber-In-The-Yard"
@@ -2,19 +2,19 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{cucumber-in-the-yard}
5
- s.version = "1.2"
5
+ s.version = "1.3"
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.date = %q{2010-10-10}
9
+ s.date = %q{2010-10-13}
10
10
  s.description = %q{
11
11
  Cucumber-In-The-Yard is a YARD extension that processes Cucumber Features, Scenarios, Steps,
12
12
  Step Definitions, Transforms, and Tags and provides a documentation interface that allows you
13
13
  easily view and investigate the test suite. This tools hopes to bridge the gap of being able
14
14
  to provide your feature descriptions to your Product Owners and Stakeholders. }
15
15
  s.email = %q{franklin.webber@gmail.com}
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"]
16
+ s.extra_rdoc_files = ["README.md", "lib/city.rb", "lib/cucumber/city_builder.rb", "lib/yard/code_objects/base.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/rake/city_task.rb", "lib/yard/rb_extensions.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", "Manifest", "README.md", "Rakefile", "example/empty.feature", "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/base.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/rake/city_task.rb", "lib/yard/rb_extensions.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", "cucumber-in-the-yard.gemspec"]
18
18
  s.homepage = %q{http://github.com/burtlo/Cucumber-In-The-Yard}
19
19
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Cucumber-in-the-yard", "--main", "README.md"]
20
20
  s.require_paths = ["lib"]
@@ -0,0 +1,2 @@
1
+ # This is a feature that has not been written
2
+ # However, I don't want parser to fail when reaching this file
@@ -20,7 +20,7 @@ When /^a customer logs in as username '([^']+)' with password '([^']+)'$/ do |us
20
20
  pending "Customer logs in with #{username} and #{password}"
21
21
  end
22
22
 
23
- Then /^I expect them to have logged in successfully $/ do
23
+ Then /^I expect them to have logged in successfully$/ do
24
24
  pending "Validation that the customer has logged in successfully"
25
25
  end
26
26
 
@@ -36,6 +36,10 @@ And /^this third defined step definition$/ do
36
36
  pending
37
37
  end
38
38
 
39
+ And /^the customer has the following details:$/ do |table|
40
+ pending "Table of data #{table.hashes}"
41
+ end
42
+
39
43
  And /^edits their the biography to state:$/ do |bio|
40
44
  pending "text_field not present for bio #{bio} for this release"
41
45
  end
@@ -4,6 +4,9 @@ Feature: Customer Account
4
4
 
5
5
  Background:
6
6
  Given this third defined step definition
7
+ And the customer has the following details:
8
+ | Name | Email | Age |
9
+ | Roger | r@email.com | 22 |
7
10
 
8
11
  @bvt
9
12
  Scenario: Customer is able to change their password
@@ -17,7 +17,10 @@ Feature: Customer Logout Feature
17
17
  Given that a customer is a valid customer
18
18
  And the customer has the following details:
19
19
  | Name | Email | Age |
20
- | Frank | f@email.com | 22 |
20
+ | Roger | r@email.com | 22 |
21
+ And the customer has the following details:
22
+ | Name | Email | Age |
23
+ | Roger | r@email.com | 22 |
21
24
  When a customer logs in as username 'frank' with password 'default'
22
25
  And visits the customer update page
23
26
  Then I expect the customer is able able to post to their profile
data/lib/city.rb CHANGED
@@ -7,7 +7,7 @@ require File.dirname(__FILE__) + "/cucumber/city_builder.rb"
7
7
 
8
8
  require 'yard'
9
9
 
10
- require File.dirname(__FILE__) + "/yard/code_objects/cucumber_location_helper.rb"
10
+ require File.dirname(__FILE__) + "/yard/code_objects/base.rb"
11
11
  require File.dirname(__FILE__) + "/yard/code_objects/feature.rb"
12
12
  require File.dirname(__FILE__) + "/yard/code_objects/scenario.rb"
13
13
  require File.dirname(__FILE__) + "/yard/code_objects/step.rb"
@@ -14,7 +14,7 @@ module Cucumber
14
14
 
15
15
  def feature(feature)
16
16
  #log.debug "FEATURE: #{feature.name} #{feature.line} #{feature.keyword} #{feature.description}"
17
- @feature = YARD::CodeObjects::Cucumber::Feature.new(:root,@file.gsub('.','_')) do |f|
17
+ @feature = YARD::CodeObjects::Cucumber::Feature.new(:root,@file.gsub(/\/|\./,'_')) do |f|
18
18
  f.comments = feature.comments.map{|comment| comment.value}.join("\n")
19
19
  f.description = feature.description
20
20
  f.add_file(@file,feature.line)
@@ -0,0 +1,38 @@
1
+
2
+ module YARD::CodeObjects::Cucumber
3
+
4
+ module LocationHelper
5
+
6
+ def line_number
7
+ files.first.last
8
+ end
9
+
10
+ def file
11
+ files.first.first if files && !files.empty?
12
+ end
13
+
14
+ def location
15
+ "#{file}:#{line_number}"
16
+ end
17
+
18
+ end
19
+
20
+ class Base < YARD::CodeObjects::Base
21
+ include LocationHelper
22
+
23
+ # def sep ; '/' ; end
24
+
25
+ # def path
26
+ # if parent && !parent.root?
27
+ # [ "Cucumber$", name.to_s ].join(sep)
28
+ # else
29
+ # name.to_s
30
+ # end
31
+ # end
32
+
33
+ end
34
+
35
+
36
+
37
+ end
38
+
@@ -2,9 +2,8 @@
2
2
 
3
3
  module YARD::CodeObjects::Cucumber
4
4
 
5
- class Feature < YARD::CodeObjects::Base
6
- include CucumberLocationHelper
7
-
5
+ class Feature < Base
6
+
8
7
  attr_accessor :background, :comments, :description, :keyword, :scenarios, :tags, :value
9
8
 
10
9
  def initialize(namespace,name)
@@ -14,11 +13,6 @@ module YARD::CodeObjects::Cucumber
14
13
  @tags = []
15
14
  end
16
15
 
17
- #TODO: this is likely a bad hack because I couldn't understand path
18
- def filename
19
- "#{self.name.to_s.gsub(/\//,'_')}.html"
20
- end
21
-
22
16
  end
23
17
 
24
18
  end
@@ -2,9 +2,8 @@
2
2
 
3
3
  module YARD::CodeObjects::Cucumber
4
4
 
5
- class Scenario < YARD::CodeObjects::Base
6
- include CucumberLocationHelper
7
-
5
+ class Scenario < Base
6
+
8
7
  attr_accessor :value, :description, :steps, :tags, :feature, :examples
9
8
 
10
9
  def initialize(namespace,name)
@@ -14,12 +13,27 @@ module YARD::CodeObjects::Cucumber
14
13
  @tags = []
15
14
  @examples = []
16
15
  end
17
-
18
- #TODO: this is likely a bad hack because I couldn't understand path
19
- def filename
20
- "#{self.name.to_s.gsub(/\//,'_')}.html"
16
+
17
+ def background?
18
+ @keyword == "Background"
21
19
  end
22
-
20
+
21
+ def outline?
22
+ @examples && !examples.empty?
23
+ end
24
+
25
+ def example_keyword
26
+ @examples.first.first.to_s.strip
27
+ end
28
+
29
+ def example_headers
30
+ @examples.first.find {|example| example.is_a?(Array) }.first
31
+ end
32
+
33
+ def example_data
34
+ @examples.first.find {|example| example.is_a?(Array) }[1..-1]
35
+ end
36
+
23
37
  end
24
38
 
25
39
  end
@@ -2,9 +2,8 @@
2
2
 
3
3
  module YARD::CodeObjects::Cucumber
4
4
 
5
- class Step < YARD::CodeObjects::Base
6
- include CucumberLocationHelper
7
-
5
+ class Step < Base
6
+
8
7
  attr_accessor :definition, :keyword, :scenario, :table, :text, :value
9
8
 
10
9
  def initialize(namespace,name)
@@ -2,27 +2,19 @@
2
2
 
3
3
  module YARD::CodeObjects::Cucumber
4
4
 
5
- class Tag < YARD::CodeObjects::Base
6
- include CucumberLocationHelper
5
+ class Tag < Base
7
6
 
8
7
  attr_accessor :value, :feature, :scenario
9
-
10
- def filename
11
- "#{self.name.to_s.gsub(/\//,'_')}.html"
12
- end
13
-
8
+
14
9
  end
15
10
 
16
11
 
17
- class TagUsage < YARD::CodeObjects::Base
12
+ class TagUsage < Base
18
13
 
19
14
  attr_reader :value
20
15
 
21
16
  attr_accessor :tags
22
17
 
23
- def filename
24
- "#{self.name}.html"
25
- end
26
18
 
27
19
  def push(tag)
28
20
  @tags = [] unless @tags
@@ -11,7 +11,7 @@ module YARD
11
11
  if statement
12
12
  # For the background and the scenario, find the steps that have definitions
13
13
  process_scenario(statement.background) if statement.background
14
-
14
+
15
15
  statement.scenarios.each do |scenario|
16
16
  process_scenario(scenario)
17
17
  end
@@ -24,6 +24,7 @@ module YARD
24
24
 
25
25
 
26
26
  def process_scenario(scenario)
27
+
27
28
  scenario.steps.each do |step|
28
29
  owner.step_definitions.each do |stepdef|
29
30
 
@@ -6,6 +6,7 @@ module YARD::CodeObjects
6
6
  # StepDefinitions, as implemented in a ruby file
7
7
  #
8
8
  class StepDefinitionObject < Base
9
+ include Cucumber::LocationHelper
9
10
 
10
11
  attr_reader :keyword, :value, :compare_value, :source
11
12
  attr_accessor :constants, :steps
@@ -54,9 +55,6 @@ module YARD::CodeObjects
54
55
 
55
56
  alias_method :<< , :push
56
57
 
57
- def filename
58
- "#{name}.html"
59
- end
60
58
 
61
59
  end
62
60
 
@@ -65,6 +63,8 @@ module YARD::CodeObjects
65
63
  # Transforms
66
64
  #
67
65
  class StepTransformObject < Base
66
+ include Cucumber::LocationHelper
67
+
68
68
  attr_reader :value
69
69
 
70
70
  def value=(value)
@@ -90,7 +90,11 @@ class StepDefinitionHandler < YARD::Handlers::Ruby::Legacy::Base
90
90
  step_definition = statement.tokens.to_s[MATCH,3]
91
91
  @@unique_name = @@unique_name + 1
92
92
 
93
- stepdef_instance = StepDefinitionObject.new(namespace, "StepDefinition_#{@@unique_name}") {|o| o.source = statement.block.to_s ; o.value = step_definition ; o.keyword = keyword}
93
+ stepdef_instance = StepDefinitionObject.new(namespace, "StepDefinition_#{@@unique_name}") do |o|
94
+ o.source = "#{keyword} #{step_definition} do #{statement.block.to_s =~ /^\s*\|.+/ ? '' : "\n "}#{statement.block.to_s}\nend"
95
+ o.value = step_definition
96
+ o.keyword = keyword
97
+ end
94
98
 
95
99
  begin
96
100
  # Look for all constants within the step definitions
@@ -64,180 +64,182 @@
64
64
  <span class="defined">
65
65
  <a href="steptransformers.html#<%= step.definition.name %>"><%= h(step.value) %></a>
66
66
  <div class="details" style="display: none;">
67
- (<%= h("#{step.definition.files.first.first}:#{step.definition.files.first.last}") %>)
67
+ (<%= h( step.definition.location ) %>)
68
68
  </div>
69
69
  </span>
70
70
  <% else %>
71
71
  <span class="undefined"><%= h(step.value) %></span>
72
72
  <% end %>
73
73
 
74
- <% if step.has_text? %>
75
- <div class="text">
76
- <%= h(step.text) %>
77
- </div>
78
- <% end %>
74
+ </div>
79
75
 
80
- <% if step.has_table? %>
81
- <div class="multiline">
82
- <table style="">
83
-
84
- <thead>
85
- <tr>
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
- <% end %>
89
- </tr>
90
- </thead>
91
-
92
- <% step.table[1..-1].each do |row| %>
93
- <tr>
94
- <% row.each_with_index do |column,column_index| %>
95
- <td class="<%= (column_index + 1) % 2 == 0 ? 'even' : 'odd' %>"><%= h(column.strip) %></td>
96
- <% end %>
97
- </tr>
76
+ <% if step.has_table? %>
77
+ <div class="multiline">
78
+ <table style="">
79
+
80
+ <thead>
81
+ <tr>
82
+ <% step.table.first.each_with_index do |column,column_index| %>
83
+ <th class="<%= (column_index + 1) % 2 == 0 ? 'even' : 'odd' %>"><%= h(column.strip) %></th>
98
84
  <% end %>
99
- </table>
100
- </div>
85
+ </tr>
86
+ </thead>
101
87
 
88
+ <% step.table[1..-1].each_with_index do |row,row_index| %>
89
+ <tr class="<%= (row_index + 1) % 2 == 0 ? 'even' : 'odd' %>">
90
+ <% row.each_with_index do |column,column_index| %>
91
+ <td><%= h(column.strip) %></td>
92
+ <% end %>
93
+ </tr>
102
94
  <% end %>
103
-
104
- </div>
105
-
106
- <% end %>
107
- <% else %>
108
- <span>No Steps Defined</span>
109
- <% end %>
95
+ </table>
96
+ </div>
97
+ <% end %>
98
+
99
+ <% if step.has_text? %>
100
+ <div class="text">
101
+ <%= h(step.text) %>
110
102
  </div>
103
+ <% end %>
104
+
111
105
 
106
+ <% end %>
107
+ <% else %>
108
+ <span>No Steps Defined</span>
109
+ <% end %>
112
110
  </div>
113
- <% end %>
114
111
 
115
- <% if @feature.scenarios %>
116
- <% @feature.scenarios.each_with_index do |scenario,scenario_index| %>
112
+ </div>
113
+ <% end %>
117
114
 
118
- <script type="text/javascript" charset="utf-8">
119
- $(function() {
120
- $('#scenario<%=scenario_index%> .toggle').click(function() {
121
- $("#scenario<%=scenario_index%>Steps").toggle('blind');
115
+ <% if @feature.scenarios %>
116
+ <% @feature.scenarios.each_with_index do |scenario,scenario_index| %>
117
+
118
+ <script type="text/javascript" charset="utf-8">
119
+ $(function() {
120
+ $('#scenario<%=scenario_index%> .toggle').click(function() {
121
+ $("#scenario<%=scenario_index%>Steps").toggle('blind');
122
122
 
123
- var stateIndicator = $('#scenario<%=scenario_index%> a.toggle')[0]
123
+ var stateIndicator = $('#scenario<%=scenario_index%> a.toggle')[0]
124
124
 
125
- stateIndicator.innerHTML = (stateIndicator.innerHTML === '+' ? '-' : '+');
126
- return false;
127
- });
125
+ stateIndicator.innerHTML = (stateIndicator.innerHTML === '+' ? '-' : '+');
126
+ return false;
128
127
  });
129
- </script>
128
+ });
129
+ </script>
130
130
 
131
- <div <%= "id='scenario#{scenario_index}'" %> class="scenario">
132
- <div class="title">
133
- <a class="toggle">-</a>
134
- <span class="pre">Scenario<%= !scenario.examples.empty? ? " Outline" : "" %>:</span>
135
- <span class="name"><%= h(scenario.value) %></span>
136
- </div>
137
- <div class="meta">
138
- <div class="file">Line: <%= scenario.files.first.last %></div>
139
- <% unless scenario.tags.empty? %>
140
- <div class="tags">
141
- <% scenario.tags.each do |tag| %>
142
- <a href="tag_<%= tag.value %>.html"><%= tag.value %></a>
143
- <% end %>
144
- </div>
145
- <% end%>
146
- </div>
147
- <% unless scenario.description.empty? %>
148
- <div class="description">
149
- <%= h(scenario.description) %>
131
+ <div <%= "id='scenario#{scenario_index}'" %> class="scenario">
132
+ <div class="title">
133
+ <a class="toggle">-</a>
134
+ <span class="pre">Scenario<%= !scenario.examples.empty? ? " Outline" : "" %>:</span>
135
+ <span class="name"><%= h(scenario.value) %></span>
136
+ </div>
137
+ <div class="meta">
138
+ <div class="file">Line: <%= scenario.files.first.last %></div>
139
+ <% unless scenario.tags.empty? %>
140
+ <div class="tags">
141
+ <% scenario.tags.each do |tag| %>
142
+ <a href="tag_<%= tag.value %>.html"><%= tag.value %></a>
143
+ <% end %>
150
144
  </div>
151
- <% end %>
145
+ <% end%>
146
+ </div>
147
+ <% unless scenario.description.empty? %>
148
+ <div class="description">
149
+ <%= h(scenario.description) %>
150
+ </div>
151
+ <% end %>
152
152
 
153
- <div <%= "id='scenario#{scenario_index}Steps'" %> class="steps">
154
- <% if scenario.steps %>
155
- <% scenario.steps.each_with_index do |step,index| %>
156
- <div <%= "id='scenario#{scenario_index}Step#{index}'" %> class="step <%= (index + 1) % 2 == 0 ? 'even' : 'odd' %>">
157
- <span class="predicate"><%= step.keyword %></span>
158
-
159
- <% if step.definition %>
160
- <script type="text/javascript" charset="utf-8">
161
- $('<%= "#scenario#{scenario_index}Step#{index}" %>').hover(
162
- function () { $('<%= "#scenario#{scenario_index}Step#{index} div.details" %>').toggle('slide'); },
163
- function () { $('<%= "#scenario#{scenario_index}Step#{index} div.details" %>').toggle('slide'); }
164
- );
165
-
166
- $('<%= "#scenario#{scenario_index}Step#{index} div.details" %>').show();
167
-
168
- </script>
169
- <span class="defined">
170
- <a href="steptransformers.html#<%= step.definition.name %>"><%= h(step.value) %></a>
171
- <div class="details" style="display: none;">
172
- (<%= h("#{step.definition.files.first.first}:#{step.definition.files.first.last}") %>)
173
- </div>
174
- </span>
175
- <% else %>
176
- <span class="undefined"><%= h(step.value) %></span>
177
- <% end %>
178
-
179
- <% if step.has_text? %>
180
- <div class="text">
181
- <%= h(step.text) %>
153
+ <div <%= "id='scenario#{scenario_index}Steps'" %> class="steps">
154
+ <% if scenario.steps %>
155
+ <% scenario.steps.each_with_index do |step,index| %>
156
+ <div <%= "id='scenario#{scenario_index}Step#{index}'" %> class="step <%= (index + 1) % 2 == 0 ? 'even' : 'odd' %>">
157
+ <span class="predicate"><%= step.keyword %></span>
158
+
159
+ <% if step.definition %>
160
+ <script type="text/javascript" charset="utf-8">
161
+ $('<%= "#scenario#{scenario_index}Step#{index}" %>').hover(
162
+ function () { $('<%= "#scenario#{scenario_index}Step#{index} div.details" %>').toggle('slide'); },
163
+ function () { $('<%= "#scenario#{scenario_index}Step#{index} div.details" %>').toggle('slide'); }
164
+ );
165
+
166
+ $('<%= "#scenario#{scenario_index}Step#{index} div.details" %>').show();
167
+
168
+ </script>
169
+ <span class="defined">
170
+ <a href="steptransformers.html#<%= step.definition.name %>"><%= h(step.value) %></a>
171
+ <div class="details" style="display: none;">
172
+ (<%= h("#{step.definition.files.first.first}:#{step.definition.files.first.last}") %>)
182
173
  </div>
183
- <% end %>
174
+ </span>
175
+ <% else %>
176
+ <span class="undefined"><%= h(step.value) %></span>
177
+ <% end %>
184
178
 
185
- <% if step.has_table? %>
186
- <div class="multiline">
187
- <table style="">
188
-
189
- <thead>
190
- <tr>
191
- <% step.table.first.each_with_index do |column,column_index| %>
192
- <th class="<%= (column_index + 1) % 2 == 0 ? 'even' : 'odd' %>"><%= h(column.strip) %></td>
193
- <% end %>
194
- </tr>
195
- </thead>
196
-
197
- <% step.table[1..-1].each do |row| %>
198
- <tr>
199
- <% row.each_with_index do |column,column_index| %>
200
- <td class="<%= (column_index + 1) % 2 == 0 ? 'even' : 'odd' %>"><%= h(column.strip) %></td>
201
- <% end %>
202
- </tr>
203
- <% end %>
204
- </table>
205
- </div>
179
+ </div>
180
+
181
+ <% if step.has_table? %>
182
+ <div class="multiline">
183
+ <table style="">
206
184
 
185
+ <thead>
186
+ <tr>
187
+ <% step.table.first.each_with_index do |column,column_index| %>
188
+ <th class="<%= (column_index + 1) % 2 == 0 ? 'even' : 'odd' %>"><%= h(column.strip) %></th>
189
+ <% end %>
190
+ </tr>
191
+ </thead>
192
+
193
+ <% step.table[1..-1].each_with_index do |row,row_index| %>
194
+ <tr class="<%= (row_index + 1) % 2 == 0 ? 'even' : 'odd' %>">
195
+ <% row.each_with_index do |column,column_index| %>
196
+ <td><%= h(column.strip) %></td>
207
197
  <% end %>
198
+ </tr>
199
+ <% end %>
200
+ </table>
201
+ </div>
202
+ <% end %>
203
+
204
+ <% if step.has_text? %>
205
+ <div class="text">
206
+ <%= h(step.text) %>
207
+ </div>
208
+ <% end %>
209
+
208
210
 
209
211
 
210
- </div>
212
+ <% end %>
213
+ <% else %>
214
+ <span>No Steps Defined</span>
215
+ <% end %>
216
+ </div>
211
217
 
212
- <% end %>
213
- <% else %>
214
- <span>No Steps Defined</span>
215
- <% end %>
216
- </div>
217
-
218
- <% if scenario.examples && !scenario.examples.empty? %>
219
- <div class="outline">
220
- <table>
221
- <thead>
222
- <tr>
223
- <th class="odd" colspan="10"><%= h(scenario.examples.first.first.to_s.strip) %></td>
224
- </tr>
225
- </thead>
226
- <% scenario.examples.first.find {|example| example.is_a?(Array) }.each_with_index do |row,row_index| %>
227
- <tr>
228
- <% row.each do |column| %>
229
- <td class="<%= (row_index + 1) % 2 == 0 ? 'even' : 'odd' %>"><%= h(column.to_s.strip) %></td>
230
- <% end %>
231
- </tr>
218
+ <% if scenario.outline? %>
219
+ <div class="outline">
220
+ <div class="keyword"> <%= h(scenario.example_keyword) %> </div>
221
+ <table>
222
+ <thead>
223
+ <tr>
224
+ <% scenario.example_headers.each_with_index do |header,header_index| %>
225
+ <th><%= h(header) %></th>
232
226
  <% end %>
233
- </table>
234
- </div>
235
-
227
+ </tr>
228
+ </thead>
229
+ <% scenario.example_data.each_with_index do |row,row_index| %>
230
+ <tr class="<%= (row_index + 1) % 2 == 0 ? 'even' : 'odd' %>" >
231
+ <% row.each_with_index do |column,column_index| %>
232
+ <td><%= h(column.to_s.strip) %></td>
236
233
  <% end %>
237
-
238
- </div>
239
- <% end %>
234
+ </tr>
240
235
  <% end %>
236
+ </table>
237
+ </div>
238
+ <% end %>
241
239
 
242
- </div>
240
+ </div>
241
+ <% end %>
242
+ <% end %>
243
+
244
+ </div>
243
245
 
@@ -90,7 +90,7 @@
90
90
 
91
91
  .scenario .step, #background .step {
92
92
  margin-top: 4px;
93
- padding: 4px;
93
+ padding: 4px;
94
94
  font-size: 14px;
95
95
  font-weight: bold;
96
96
  }
@@ -135,8 +135,9 @@
135
135
 
136
136
  .text {
137
137
  padding: 20px;
138
- background-color: #F5F5F5;
139
- color: #343332;
138
+ background-color: #F8F8FF;
139
+ color: #444444;
140
+ border: 1px solid #DEDEDE;
140
141
  }
141
142
 
142
143
 
@@ -144,6 +145,12 @@
144
145
  margin-top: 20px;
145
146
  margin-left: 40px;
146
147
  }
148
+ .outline .keyword {
149
+ padding: 4px;
150
+ font-weight: bold;
151
+ font-size: 16px;
152
+ }
153
+
147
154
  .multiline table tr, .outline table tr {
148
155
  padding: 4px;
149
156
  }
@@ -153,8 +160,8 @@
153
160
  background-color: #A8C0A8;
154
161
  }
155
162
  .multiline table tr td, .outline table tr td {
156
- width: 150px;
157
- padding: 4px;
163
+ min-width: 100px;
164
+ padding: 4px 10px 4px 10px;
158
165
  }
159
166
 
160
167
 
@@ -174,7 +181,7 @@
174
181
  border-bottom: 1px solid #E3E3E3;
175
182
  }
176
183
 
177
- .stepdef .steps {
184
+ .stepdef .steps, .stepdef .source {
178
185
  margin: 10px 0px 0px 30px;
179
186
  }
180
187
  .stepdef .steps .step {
@@ -1,8 +1,8 @@
1
1
  <% n = 1 %>
2
- <% @features.each do |feature| %>
2
+ <% @items.each do |feature| %>
3
3
  <li class="r<%= n %>">
4
4
  <span class='object_link'>
5
- <a href="<%= feature.filename %>"><%= h(feature.value) %></a>
5
+ <a href="<%= "#{feature.name}.html" %>"><%= h(feature.value) %></a>
6
6
  </span>
7
7
  <span class="">(<%= h(feature.file) %>)<span>
8
8
  </li>
@@ -1,8 +1,8 @@
1
1
  <% n = 1 %>
2
- <% @scenarios.each do |scenario| %>
2
+ <% @items.each do |scenario| %>
3
3
  <li class="r<%= n %>">
4
4
  <span class='object_link'>
5
- <a href="<%= scenario.feature.filename %>"><%= h(scenario.value) %></a>
5
+ <a href="<%= "#{scenario.feature.name}.html" %>"><%= h(scenario.value) %></a>
6
6
  </span>
7
7
  <span class="">(<%= h(scenario.location) %>)<span>
8
8
  </li>
@@ -1,11 +1,11 @@
1
1
  <% n = 1 %>
2
- <% @step_definitions.each do |stepdef| %>
2
+ <% @items.each do |stepdef| %>
3
3
  <li class="r<%= n %>">
4
4
  <span class='object_link'>
5
5
  <span class="pre"><%= stepdef.keyword %></span>
6
6
  <a href="steptransformers.html#<%= stepdef.name %>"><span class="name"><%= h(stepdef.value) %></span></a>&nbsp;&nbsp;
7
7
  </span>
8
- <span class="">(<%= h("#{stepdef.files.first.first}:#{stepdef.files.first.last}") %>)<span>
8
+ <span class="">(<%= h(stepdef.location) %>)<span>
9
9
  </li>
10
10
  <% n = n == 2 ? 1 : 2 %>
11
11
  <% end %>
@@ -1,13 +1,13 @@
1
1
  <% n = 1 %>
2
- <% @steps.each do |step| %>
2
+ <% @items.each do |step| %>
3
3
  <li class="r<%= n %>">
4
4
  <span class='object_link'>
5
- <a href="<%= step.scenario.feature.filename %>">
5
+ <a href="<%= "#{step.scenario.feature.name}.html" %>">
6
6
  <span class="pre"><%= step.keyword %></span>
7
7
  <span class="name"><%= h(step.value) %></span>
8
8
  </a>
9
9
  </span>
10
- <span class="">(<%= h(step.files.first.first) %>)<span>
10
+ <span class="">(<%= h(step.file) %>)<span>
11
11
  </li>
12
12
  <% n = n == 2 ? 1 : 2 %>
13
13
  <% end %>
@@ -1,8 +1,8 @@
1
1
  <% n = 1 %>
2
- <% @tagusage.each do |usage| %>
2
+ <% @items.each do |usage| %>
3
3
  <li class="r<%= n %>">
4
4
  <span class='object_link'>
5
- <a href="<%= usage.filename %>"><%= h(usage.value) %></a>
5
+ <a href="<%= "#{usage.name}.html" %>"><%= h(usage.value) %></a>
6
6
  </span>
7
7
  <small><%= usage.total_scenario_count %></small>
8
8
  </li>
@@ -5,61 +5,43 @@ def init
5
5
  asset("js/cucumber.js",file("js/cucumber.js",true))
6
6
 
7
7
  @features = Registry.all(:feature)
8
-
9
- if @features
10
-
11
- @scenarios = []
12
- @tags = []
13
8
 
14
- @features.each do |feature|
15
- serialize_object(feature)
16
-
17
- feature.tags.each { |tag| @tags << tag }
18
-
19
- feature.scenarios.each do |scenario|
20
- @scenarios << scenario
21
- scenario.tags.each { |tag| @tags << tag }
22
- end
23
- end
9
+ if @features
10
+ @features.each {|feature| serialize(feature) }
11
+ generate_full_list(@features)
12
+ end
24
13
 
25
- @tags = find_unique_tags(@tags)
26
- @tags.each { |tag,tag_objects| serialize_object(tag_objects) }
14
+
15
+ @tags = find_unique_tags(@tags)
16
+
17
+ if @tags
18
+ @tags.each { |tag,tag_objects| serialize_tags(tag_objects) }
19
+
27
20
  @tagusage = @tags.values.sort {|x,y| y.total_scenario_count <=> x.total_scenario_count }
21
+ generate_full_list(@tagusage,"Tag Usage") if @tagusage
22
+ end
28
23
 
29
- create_full_list(@tagusage,"Tag Usage") if @tagusage
30
- create_full_list(@features) if @features
31
- create_full_list(@scenarios) if @scenarios
24
+ @scenarios = Registry.all(:scenario).find_all {|scenario| !scenario.background? }
25
+ generate_full_list(@scenarios) if @scenarios
32
26
 
33
- @steps = Registry.all(:step)
34
- create_full_list(@steps) if @steps
35
-
36
- end
27
+ @steps = Registry.all(:step)
28
+ generate_full_list(@steps) if @steps
37
29
 
38
30
  @step_definitions = Registry.all(:stepdefinition)
39
-
31
+
40
32
  if @step_definitions
41
- create_full_list(@step_definitions,"Step Definition")
33
+ generate_full_list(@step_definitions,"Step Definition")
42
34
  @step_transformers = YARD::CodeObjects::StepTransformersObject.new(:root,"steptransformers")
43
35
  @step_definitions.each {|stepdef| @step_transformers << stepdef }
44
- serialize_object(@step_transformers)
36
+ serialize(@step_transformers)
45
37
  end
46
38
 
47
-
48
- end
49
39
 
50
- def asset(path, content)
51
- options[:serializer].serialize(path, content) if options[:serializer]
52
40
  end
53
41
 
54
- def serialize_object(object)
55
- options[:object] = object
56
- Templates::Engine.with_serializer(object.filename, options[:serializer]) do
57
- T('layout').run(options)
58
- end
59
- end
60
-
61
- def create_full_list(objects,friendly_name=nil)
42
+ def generate_full_list(objects,friendly_name=nil)
62
43
  if !objects.empty?
44
+ @items = objects
63
45
  @list_type = "#{objects.first.type.to_s}s"
64
46
  @list_title = "#{friendly_name || objects.first.type.to_s.capitalize} List"
65
47
  asset("#{objects.first.type}_list.html",erb(:full_list))
@@ -68,12 +50,21 @@ def create_full_list(objects,friendly_name=nil)
68
50
  end
69
51
  end
70
52
 
53
+ def serialize_tags(tags)
54
+ options[:object] = tags
55
+ Templates::Engine.with_serializer("#{tags.name}.html", options[:serializer]) do
56
+ T('layout').run(options)
57
+ end
58
+ end
59
+
71
60
  def find_unique_tags(tags)
72
61
 
73
62
  tags_hash = {}
74
63
 
75
- tags.each do |tag|
76
- tags_hash[tag.value] = YARD::CodeObjects::Cucumber::TagUsage.new(:root,"tag_#{tag.value}"){|t| t.value = tag.value } unless tags_hash[tag.value]
64
+ Registry.all(:tag).each do |tag|
65
+ unless tags_hash[tag.value]
66
+ tags_hash[tag.value] = YARD::CodeObjects::Cucumber::TagUsage.new(:root,"tag_#{tag.value}") {|t| t.value = tag.value }
67
+ end
77
68
  tags_hash[tag.value.to_s] << tag
78
69
  end
79
70
 
@@ -12,7 +12,7 @@
12
12
  <div class="title">
13
13
  <span class="pre"><%= stepdef.keyword %></span>
14
14
  <span class="name"><%= stepdef.value %></span>
15
- <div style="float: right;"><%= h( "#{stepdef.files.first.first}:#{stepdef.files.first.last}" ) %></div>
15
+ <div style="float: right;"><%= h( stepdef.location ) %></div>
16
16
  </div>
17
17
 
18
18
 
@@ -21,17 +21,28 @@
21
21
  <% stepdef.steps.each_with_index do |step,step_index| %>
22
22
  <div class="step <%= (step_index + 1) % 2 == 0 ? 'even' : 'odd' %>">
23
23
  <%= h("#{step.keyword} #{step.value}") %>
24
- <div class="details"><a href="<%= step.scenario.feature.filename %>"><%= h(step.location) %></a></div>
24
+ <div class="details"><a href="<%= "#{step.scenario.feature.name}.html" %>"><%= h(step.location) %></a></div>
25
25
  </div>
26
26
  <% end %>
27
27
  <% else %>
28
28
  <span class="undefined">No steps were found to match this step definition.</span>
29
29
  <% end%>
30
30
  </div>
31
-
32
-
31
+
33
32
  <div class="source">
34
- <!-- <%= h(stepdef.source) %> -->
33
+ <span class="showSource">
34
+ [ <a href="#" class="toggleSource">View source</a> ]
35
+ </span>
36
+ <table class="source_code">
37
+ <tr>
38
+ <td>
39
+ <pre class="lines"><%= "" %><%= h format_lines(stepdef) %></pre>
40
+ </td>
41
+ <td>
42
+ <pre class="code"><%= "" %><%= html_syntax_highlight stepdef.source %></pre>
43
+ </td>
44
+ </tr>
45
+ </table>
35
46
  </div>
36
47
  </div>
37
48
 
@@ -21,7 +21,7 @@
21
21
  <div class="title">
22
22
  <span class="pre">Feature:</span>
23
23
  <span class="name">
24
- <a href="<%= tag.scenario.feature.filename %>"><%= tag.scenario.feature.value %></a>
24
+ <a href="<%= "#{tag.scenario.feature.name}.html" %>"><%= tag.scenario.feature.value %></a>
25
25
  </span>
26
26
  </div>
27
27
  <div class="description"><%= tag.scenario.feature.description %></div>
@@ -31,7 +31,7 @@
31
31
  <div class="title">
32
32
  <span class="pre">Scenario:</span>
33
33
  <span class="name">
34
- <a href="<%= tag.scenario.feature.filename %>"><%= tag.scenario.value %></a>
34
+ <a href="<%= "#{tag.scenario.feature.name}.html" %>"><%= tag.scenario.value %></a>
35
35
  </span>
36
36
  </div>
37
37
  <div class="description"><%= tag.scenario.description %></div>
@@ -41,7 +41,7 @@
41
41
  <div class="title">
42
42
  <span class="pre">Feature:</span>
43
43
  <span class="name">
44
- <a href="<%= tag.feature.filename %>"><%= tag.feature.value %></a>
44
+ <a href="<%= "#{tag.feature.name}.html" %>"><%= tag.feature.value %></a>
45
45
  </span>
46
46
  </div>
47
47
  <div class="description"><%= tag.feature.description %></div>
@@ -52,7 +52,7 @@
52
52
  <div class="title">
53
53
  <span class="pre">Scenario:</span>
54
54
  <span class="name">
55
- <a href="<%= scenario.feature.filename %>"><%= scenario.value %></a>
55
+ <a href="<%= "#{scenario.feature.name}.html" %>"><%= scenario.value %></a>
56
56
  </span>
57
57
  </div>
58
58
  <div class="description"><%= scenario.description %></div>
@@ -1,5 +1,5 @@
1
1
  def init
2
2
  super
3
3
  sections.push :tagusage
4
- @tags = object
4
+ @tags = object
5
5
  end
metadata CHANGED
@@ -4,8 +4,8 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 1
7
- - 2
8
- version: "1.2"
7
+ - 3
8
+ version: "1.3"
9
9
  platform: ruby
10
10
  authors:
11
11
  - Frank;lin Webber
@@ -13,7 +13,7 @@ autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
15
 
16
- date: 2010-10-10 00:00:00 -07:00
16
+ date: 2010-10-13 00:00:00 -07:00
17
17
  default_executable:
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
@@ -54,7 +54,7 @@ extra_rdoc_files:
54
54
  - README.md
55
55
  - lib/city.rb
56
56
  - lib/cucumber/city_builder.rb
57
- - lib/yard/code_objects/cucumber_location_helper.rb
57
+ - lib/yard/code_objects/base.rb
58
58
  - lib/yard/code_objects/feature.rb
59
59
  - lib/yard/code_objects/scenario.rb
60
60
  - lib/yard/code_objects/step.rb
@@ -63,8 +63,8 @@ extra_rdoc_files:
63
63
  - lib/yard/handlers/base.rb
64
64
  - lib/yard/handlers/feature_handler.rb
65
65
  - lib/yard/parser/feature.rb
66
- - lib/yard/rb_extensions.rb
67
66
  - lib/yard/rake/city_task.rb
67
+ - lib/yard/rb_extensions.rb
68
68
  - lib/yard/templates/default/feature/html/feature.erb
69
69
  - lib/yard/templates/default/feature/setup.rb
70
70
  - lib/yard/templates/default/fulldoc/html/css/common.css
@@ -89,15 +89,17 @@ extra_rdoc_files:
89
89
  - lib/yard/templates/default/tagusage/setup.rb
90
90
  files:
91
91
  - History.txt
92
+ - Manifest
92
93
  - README.md
93
94
  - Rakefile
95
+ - example/empty.feature
94
96
  - example/example.feature
95
97
  - example/example.step.rb
96
98
  - example/example.third.feature
97
99
  - example/second_example.feature
98
100
  - lib/city.rb
99
101
  - lib/cucumber/city_builder.rb
100
- - lib/yard/code_objects/cucumber_location_helper.rb
102
+ - lib/yard/code_objects/base.rb
101
103
  - lib/yard/code_objects/feature.rb
102
104
  - lib/yard/code_objects/scenario.rb
103
105
  - lib/yard/code_objects/step.rb
@@ -106,8 +108,8 @@ files:
106
108
  - lib/yard/handlers/base.rb
107
109
  - lib/yard/handlers/feature_handler.rb
108
110
  - lib/yard/parser/feature.rb
109
- - lib/yard/rb_extensions.rb
110
111
  - lib/yard/rake/city_task.rb
112
+ - lib/yard/rb_extensions.rb
111
113
  - lib/yard/templates/default/feature/html/feature.erb
112
114
  - lib/yard/templates/default/feature/setup.rb
113
115
  - lib/yard/templates/default/fulldoc/html/css/common.css
@@ -138,7 +140,6 @@ files:
138
140
  - spec/city/yard_parser_cucumber_spec.rb
139
141
  - spec/city/yard_rb_extensions_spec.rb
140
142
  - spec/spec_helper.rb
141
- - Manifest
142
143
  - cucumber-in-the-yard.gemspec
143
144
  has_rdoc: true
144
145
  homepage: http://github.com/burtlo/Cucumber-In-The-Yard
@@ -1,15 +0,0 @@
1
- module CucumberLocationHelper
2
-
3
- def line_number
4
- files.first.last
5
- end
6
-
7
- def file
8
- files.first.first
9
- end
10
-
11
- def location
12
- "#{files.first.first}:#{files.first.last}"
13
- end
14
-
15
- end