yard-cucumber 2.1.0 → 2.1.1

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.
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ === 2.1.1 / 2011-06-17
2
+
3
+ * Gherkin 2.4.0 Compatibility (Thanks @bowsersenior)
4
+
1
5
  === 2.1.0 / 2011-05-22
2
6
 
3
7
  * YARD 0.7.0 compatibility (removed some monkey-patching)
data/README.md CHANGED
@@ -49,7 +49,7 @@ Installation
49
49
 
50
50
  YARD-Cucumber requires the following gems installed:
51
51
 
52
- Gherkin 2.3.5 - http://cukes.info
52
+ Gherkin 2.2.9 - http://cukes.info
53
53
  Cucumber 0.7.5 - http://cukes.info
54
54
  YARD 0.7.0 - http://yardoc.org
55
55
 
@@ -259,7 +259,7 @@ module Cucumber
259
259
  multiline_arg = rubify(step.multiline_arg)
260
260
 
261
261
  case(multiline_arg)
262
- when Gherkin::Formatter::Model::PyString
262
+ when gherkin_multiline_string_class
263
263
  @table_owner.text = multiline_arg.value
264
264
  when Array
265
265
  #log.info "Matrix: #{matrix(multiline_arg).collect{|row| row.collect{|cell| cell.class } }.flatten.join("\n")}"
@@ -283,6 +283,23 @@ module Cucumber
283
283
  def matrix(gherkin_table)
284
284
  gherkin_table.map {|gherkin_row| gherkin_row.cells }
285
285
  end
286
+
287
+ #
288
+ # This helper method is used to deteremine what class is the current
289
+ # Gherkin class.
290
+ #
291
+ # @return [Class] the class that is the current supported Gherkin Model
292
+ # for multiline strings. Prior to Gherkin 2.4.0 this was the PyString
293
+ # class. As of Gherkin 2.4.0 it is the DocString class.
294
+ def gherkin_multiline_string_class
295
+ if defined?(Gherkin::Formatter::Model::PyString)
296
+ Gherkin::Formatter::Model::PyString
297
+ elsif defined?(Gherkin::Formatter::Model::DocString)
298
+ Gherkin::Formatter::Model::DocString
299
+ else
300
+ raise "Unable to find a suitable class in the Gherkin Library to parse the multiline step data."
301
+ end
302
+ end
286
303
 
287
304
  def clone_table(base)
288
305
  base.map {|row| row.map {|cell| cell.dup }}
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.0'
7
+ VERSION = '2.1.1'
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.0
5
+ version: 2.1.1
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-05-22 00:00:00 -07:00
13
+ date: 2011-06-17 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -141,7 +141,7 @@ homepage: http://github.com/burtlo/yard-cucumber
141
141
  licenses: []
142
142
 
143
143
  post_install_message: "\n\
144
- (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)\n\n Thank you for installing yard-cucumber 2.1.0 / 2011-05-22.\n \n Changes:\n \n * YARD 0.7.0 compatibility (removed some monkey-patching)\n * Add more menus (Steps and Step Definitions)\n * Define step definitions in your language Internalization (Ruby 1.9.2)\n \n\n\
144
+ (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)\n\n Thank you for installing yard-cucumber 2.1.1 / 2011-06-17.\n \n Changes:\n \n * Gherkin 2.4.0 Compatibility (Thanks @bowsersenior)\n \n\n\
145
145
  (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)\n\n"
146
146
  rdoc_options:
147
147
  - --charset=UTF-8