yard-cucumber 2.1.4 → 2.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,6 @@
1
+ # Ignore any built gems that are laying around
2
+ *.gem
3
+
4
+ # Documents folder
5
+ doc
6
+ .yardoc
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ === 2.1.5 / 2011-10-19
2
+
3
+ * FIX for multiple scenario outlines (Thanks @ardavis)
4
+
1
5
  === 2.1.4 / 2011-10-10
2
6
 
3
7
  * Support for multiple scenario outlines (Thanks @jmerrifield)
@@ -1,11 +1,17 @@
1
- <% @scenario.scenarios.each_with_index do |scenario,example_index| %>
2
- <div style="display: none;" class="steps <%= "example#{example_index + 1}" %>">
3
- <% @scenario_outline = @scenario ; @scenario = scenario ; @steps = scenario.steps %>
4
- <%= erb(:steps) %>
5
- <% @scenario = @scenario_outline %>
6
- </div>
1
+ <% sc = 0 %>
2
+ <% @scenario.examples.each_with_index do |example, example_index| %>
3
+ <% example.data.each_with_index do |row, row_index| %>
4
+ <div style="display: none;" class="steps <%= "example#{example_index + 1}-#{row_index +1}" %>">
5
+ <% scenario = @scenario.scenarios[sc] %>
6
+ <% @scenario_outline = @scenario ; @scenario = scenario ; @steps = scenario.steps %>
7
+ <%= erb(:steps) %>
8
+ <% @scenario = @scenario_outline %>
9
+ <% sc += 1 %>
10
+ </div>
11
+ <% end %>
7
12
  <% end %>
8
13
 
14
+
9
15
  <div class="outline">
10
16
 
11
17
  <% if @scenario.examples? %>
@@ -116,11 +116,11 @@ $(function() {
116
116
  if (typeof eventObject.currentTarget !== "undefined") {
117
117
  var exampleRow = $(eventObject.currentTarget);
118
118
 
119
- if (eventObject.currentTarget.className.match(/example\d+/) == null) {
119
+ if (eventObject.currentTarget.className.match(/example\d+-\d+/) == null) {
120
120
  return false;
121
121
  }
122
122
 
123
- var exampleClass = eventObject.currentTarget.className.match(/example\d+/)[0];
123
+ var exampleClass = eventObject.currentTarget.className.match(/example\d+-\d+/)[0];
124
124
  var example = exampleRow.closest('div.details').find('.' + exampleClass);
125
125
 
126
126
  var currentExample = null;
data/lib/yard-cucumber.rb CHANGED
@@ -4,7 +4,7 @@ require 'gherkin/formatter/tag_count_formatter'
4
4
 
5
5
 
6
6
  module CucumberInTheYARD
7
- VERSION = '2.1.4'
7
+ VERSION = '2.1.5'
8
8
  end
9
9
 
10
10
  require File.dirname(__FILE__) + "/yard/code_objects/cucumber/base.rb"
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: yard-cucumber
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 2.1.4
5
+ version: 2.1.5
6
6
  platform: ruby
7
7
  authors:
8
8
  - Franklin Webber
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-10-10 00:00:00 Z
13
+ date: 2011-10-19 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: gherkin
@@ -55,6 +55,7 @@ extra_rdoc_files:
55
55
  - README.md
56
56
  - History.txt
57
57
  files:
58
+ - .gitignore
58
59
  - .rspec
59
60
  - History.txt
60
61
  - README.md
@@ -141,7 +142,7 @@ homepage: http://github.com/burtlo/yard-cucumber
141
142
  licenses: []
142
143
 
143
144
  post_install_message: "\n\
144
- (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)\n\n Thank you for installing yard-cucumber 2.1.4 / 2011-10-10.\n \n Changes:\n \n * Support for multiple scenario outlines (Thanks @jmerrifield)\n \n\n\
145
+ (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)\n\n Thank you for installing yard-cucumber 2.1.5 / 2011-10-19.\n \n Changes:\n \n * FIX for multiple scenario outlines (Thanks @ardavis)\n \n\n\
145
146
  (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)\n\n"
146
147
  rdoc_options:
147
148
  - --charset=UTF-8