Code Monkey home page Code Monkey logo

yard-cucumber's Introduction

YARD-Cucumber: A Requirements Documentation Tool

Synopsis

YARD-Cucumber (formerly Cucumber-In-The-Yard) is a YARD extension that processes Cucumber features, scenarios, steps, tags, step definitions, and even transforms to provide documentation similar to what you expect to how YARD displays classes, methods and constants.This tools bridges the gap of having feature files found in your source code and true documentation that your team, product owners and stakeholders can use.

Examples

I have created a trivial, example project to help provide a quick visualization of the resulting documentation. I encourage you to look at it as an example and see if it would assist your project from a multitude of perspectives: as the project's core developer; another developer or a new developer; quality assurance engineer; or product owner/stakeholder.

The implemented example has been deployed at http://burtlo.github.io/yard-cucumber/.

1. View Features and Scenarios example

2. Search through features, scenarios, and tags

3. Dynamic Tag Unions and Intersections example

4. View all features and scenarios by tag example

5. View Step Definitions and Transforms example

6. All steps matched to step definitions

7. Steps that have transforms applied to them

8. Undefined steps and even Rubular links of your step definitions.

9. Feature directories with a README.md will be parsed into the description example

10. Configurable Menus - want a searchable steps menu and remove the tags menu

11. Step definitions in your language (Ruby 1.9.2 - Internationalization)

Installation

YARD-Cucumber requires the following gems installed:

Gherkin 2.2.9 - http://cukes.info Cucumber 0.7.5 - http://cukes.info YARD 0.8.1 - http://yardoc.org

To install yard-cucumber use the following command:

$ gem install yard-cucumber

(Add sudo if you're installing under a POSIX system as root)

Usage

YARD supports for automatically including gems with the prefix yard- as a plugin. To enable automatic loading yard-cucumber.

$ mkdir ~/.yard
$ yard config load_plugins true
$ yardoc 'example/**/*.rb' 'example/**/*.feature'

Now you can run YARD as you normally would and have your features, step definitions and transforms captured.

An example with the rake task:

require 'yard'

YARD::Rake::YardocTask.new do |t|
t.files   = ['features/**/*.feature', 'features/**/*.rb']
t.options = ['--any', '--extra', '--opts'] # optional
end

Configuration

  • Adding or Removing search fields (yardoc)

Be default the yardoc output will generate a search field for features and tags. This can be configured through the yard configuration file ~/.yard/config to add or remove these search fields.

--- !ruby/hash-with-ivars:SymbolHash
elements:
  :load_plugins: true
  :ignored_plugins: []
  :autoload_plugins: []
  :safe_mode: false
  :"yard-cucumber":
    menus: [ 'features', 'directories', 'tags', 'steps', 'step definitions' ]
ivars:
  :@symbolize_value: false

By default the configuration, yaml format, that is generate by the yard config command will save a SymbolHash. You can still edit this file add the entry for :"yard-cucumber": and the sub-entry menus: which can contain all of the above mentioned menus or simply an empty array [] if you want no additional menus.

  • Step definitions in your language (Ruby 1.9.2)

Again the yard configuration file you can define additional step definitions that can be matched.

:"yard-cucumber":
  language:
    step_definitions: [ 'Given', 'When', 'Then', 'And', 'Soit', 'Etantdonné', 'Lorsque', 'Lorsqu', 'Alors', 'Et' ]

In this example, I have included the French step definition words alongside the English step definitions. Even without specifying this feature files in other languages are found, this provides the ability for the step definitions to match correctly to step definitions.

  • Exclude features or scenarios from yardoc

You can exclude any feature or scenario from the yardoc by adding a predefined tags to them. To define tags that will be excluded, again in yard configuration file:

:"yard-cucumber":
  exclude_tags: [ 'exclude-yardoc', 'also-exclude-yardoc' ]

Details

There are two things that I enjoy: a test framework written in my own Domain Specific Language (DSL) that is easily understood by all those on a project and the ability for all participants to easily read, search, and view the tests.

Cucumber is an amazing tool that allowed me to define exercisable requirements. My biggest obstacle was bringing these requirements to my team, the product owner, and other stakeholders.

Initially I tried to expose more of the functionality by providing freshly authored requirements through email, attachments to JIRA tickets, or linked in wiki documents. None of these methods were very sustainable or successful. First, I was continually pushing out the documents to those interested. Second, the documents were displayed to the user in text without the syntax highlighting that was exceedingly helpful for quickly understanding the requirements.

I also found it hard to share the test framework that I had put together with another developer that joined the team. It was difficult to direct them around the features, tags, step definitions, and transforms. It was when I started to convey to them the conventions that I had established that I wished I had a tool that would allow me to provide documentation like one would find generated by a great tool like YARD.

So I set out to integrate Cucumber objects like features, backgrounds, scenarios, tags, steps, step definitions, and transforms into a YARD template. From my quick survey of the landscape I can see that the my needs are different than a lot of others that use Cucumber. The entire project that spawned this effort was solely to exercise the functionality of a different, large project and so there is a huge dependence on having the requirements documented. This is in contrast to other projects that are using this on a small scale to test the functionality of small software component. Though, ultimately, I realized that the functionality may provide a valuable tool for many as I feel it helps more solidly bridge the reporting of the documentation by putting a coat of paint on it.

LICENSE

(The MIT License)

Copyright (c) 2011 Franklin Webber

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

yard-cucumber's People

Contributors

bfaloona avatar cs-wellington-santos avatar dlongmuir avatar elhuang avatar erran avatar idstein avatar mabotelh avatar norekinc avatar pghalliday avatar stephen-kaye avatar turboladen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

yard-cucumber's Issues

error loading plugin 'yard-cucumber'

I'm getting this error any time I run a rake task in my rails app. Any ideas?

→ cat ~/.yard/config 
--- !ruby/hash:SymbolHash
:load_plugins: true
:ignored_plugins: []
:autoload_plugins: []
:safe_mode: false

→ cat Rakefile
#!/usr/bin/env rake
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.

require File.expand_path('../config/application', __FILE__)

C4C::Application.load_tasks

# desc "`rake` will default to running `rake:spec`"
# task :default => :spec
#
# desc "Run all the rspec examples"
# task :spec do
#   system "bundle exec rspec -c -f d spec/*_spec.rb"
# end
#

undefined method `multiline_arg' for #<Gherkin::Formatter::Model::Step with Gherkin 2.5.x

I created a Rake task to generate my cuke yard docs; since gherkin 2.5.0 & 2.5.1 came out, I haven't been able to run the rake task anymore. Looks like there's no #multiline_arg accessor in Gherkin::Formatter::Model::Step:
http://rdoc.info/gems/gherkin/2.5.1/Gherkin/Formatter/Model/Step

[sloveless@sloveless-mbp:trunk]$ rake yard --trace
** Invoke yard (first_time)
** Execute yard
rake aborted!
undefined method `multiline_arg' for #<Gherkin::Formatter::Model::Step:0x007ff4911230d0>
/Users/sloveless/.rvm/gems/ruby-1.9.2-p290/gems/yard-cucumber-2.1.2/lib/cucumber/city_builder.rb:259:in `step'
/Users/sloveless/.rvm/gems/ruby-1.9.2-p290/gems/gherkin-2.5.1/lib/gherkin/formatter/tag_count_formatter.rb:43:in `method_missing'
/Users/sloveless/.rvm/gems/ruby-1.9.2-p290/gems/gherkin-2.5.1/lib/gherkin/listener/formatter_listener.rb:106:in `replay_step_or_examples'
/Users/sloveless/.rvm/gems/ruby-1.9.2-p290/gems/gherkin-2.5.1/lib/gherkin/listener/formatter_listener.rb:51:in `step'
/Users/sloveless/.rvm/gems/ruby-1.9.2-p290/gems/gherkin-2.5.1/lib/gherkin/parser/parser.rb:46:in `method_missing'
/Users/sloveless/.rvm/gems/ruby-1.9.2-p290/gems/gherkin-2.5.1/lib/gherkin/lexer/i18n_lexer.rb:23:in `scan'
/Users/sloveless/.rvm/gems/ruby-1.9.2-p290/gems/gherkin-2.5.1/lib/gherkin/lexer/i18n_lexer.rb:23:in `scan'
/Users/sloveless/.rvm/gems/ruby-1.9.2-p290/gems/gherkin-2.5.1/lib/gherkin/parser/parser.rb:31:in `parse'
/Users/sloveless/.rvm/gems/ruby-1.9.2-p290/gems/yard-cucumber-2.1.2/lib/yard/parser/cucumber/feature.rb:38:in `parse'
/Users/sloveless/.rvm/gems/ruby-1.9.2-p290/gems/yard-0.7.2/lib/yard/parser/source_parser.rb:429:in `parse'
/Users/sloveless/.rvm/gems/ruby-1.9.2-p290/gems/yard-0.7.2/lib/yard/parser/source_parser.rb:352:in `parse_in_order'
/Users/sloveless/.rvm/gems/ruby-1.9.2-p290/gems/yard-0.7.2/lib/yard/parser/source_parser.rb:80:in `block in parse'
/Users/sloveless/.rvm/gems/ruby-1.9.2-p290/gems/yard-0.7.2/lib/yard/logging.rb:66:in `enter_level'
/Users/sloveless/.rvm/gems/ruby-1.9.2-p290/gems/yard-0.7.2/lib/yard/parser/source_parser.rb:79:in `parse'
/Users/sloveless/.rvm/gems/ruby-1.9.2-p290/gems/yard-0.7.2/lib/yard.rb:18:in `parse'
/Users/sloveless/.rvm/gems/ruby-1.9.2-p290/gems/yard-0.7.2/lib/yard/cli/yardoc.rb:215:in `run'
/Users/sloveless/.rvm/gems/ruby-1.9.2-p290/gems/yard-0.7.2/lib/yard/rake/yardoc_task.rb:65:in `block in define'
/Users/sloveless/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/task.rb:205:in `call'
/Users/sloveless/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/task.rb:205:in `block in execute'
/Users/sloveless/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/task.rb:200:in `each'
/Users/sloveless/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute'
/Users/sloveless/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/sloveless/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/sloveless/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/sloveless/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke'
/Users/sloveless/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/application.rb:112:in `invoke_task'
/Users/sloveless/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/application.rb:90:in `block (2 levels) in top_level'
/Users/sloveless/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/application.rb:90:in `each'
/Users/sloveless/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/application.rb:90:in `block in top_level'
/Users/sloveless/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Users/sloveless/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/application.rb:84:in `top_level'
/Users/sloveless/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/application.rb:62:in `block in run'
/Users/sloveless/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Users/sloveless/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/Users/sloveless/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/bin/rake:32:in `<top (required)>'
/Users/sloveless/.rvm/gems/ruby-1.9.2-p290/bin/rake:19:in `load'
/Users/sloveless/.rvm/gems/ruby-1.9.2-p290/bin/rake:19:in `<main>'

My Rake task:

YARD::Rake::YardocTask.new do |t|
  t.files = ['features/**/*.feature', 'features/**/*.rb', '-', '*.rdoc']
  t.options = %w(--readme README.rdoc)
end

My env:

[sloveless@sloveless-mbp:trunk]$ gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.10
  - RUBY VERSION: 1.9.2 (2011-07-09 patchlevel 290) [x86_64-darwin11.1.0]
  - INSTALLATION DIRECTORY: /Users/sloveless/.rvm/gems/ruby-1.9.2-p290
  - RUBY EXECUTABLE: /Users/sloveless/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
  - EXECUTABLE DIRECTORY: /Users/sloveless/.rvm/gems/ruby-1.9.2-p290/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-darwin-11
  - GEM PATHS:
     - /Users/sloveless/.rvm/gems/ruby-1.9.2-p290
     - /Users/sloveless/.rvm/gems/ruby-1.9.2-p290@global
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
     - :sources => ["http://rubygems.org", "http://mirror.pelco.org/greybox/"]
  - REMOTE SOURCES:
     - http://rubygems.org

yard server - Cucumber Additions

It seems the cucumber additions are showing up in /doc/*.html, but when I run yard server it doesn't seem to show the cucumber changes on the doc server.

The javascripts don't function for the Features buttons, and when I manually go to the features pages, the cucumber.css isn't included.

.yardopts

**/*.feature
**/*.rb
-e yard-cucumber

Makes me wonder if it has to do with yard server. I also attempted yard server -e yard-cucumber

At localhost:8808, I am seeing:

<link charset="utf-8" media="screen" type="text/css" href="/css/custom.css" rel="stylesheet">

But there is no mention of cucumber.css, also it's interesting to note that I DO see:

<script src="/js/cucumber.js" charset="utf-8" type="text/javascript">

CITY fails to parse when Gherkin 2.3.1 is installed

Sadly it's a fairly silent failure. YARD will simply report that the file could not be loaded implying that it cannot be found:

[error]: The file `lib/city.rb' could not be loaded, check the path and try again.

The information attached to the exception is the following

* RubyGem version error: gherkin(2.3.1 not ~> 2.2.9)

cannot see step and step definition

I have config:
--- !map:SymbolHash
:load_plugins: true
:ignored_plugins: []
:autoload_plugins: []
:safe_mode: false
:"yard-cucumber":
menus: [ 'features', 'tags', 'steps', 'step definitions' ]

And rake task:
require 'yard'

YARD::Rake::YardocTask.new do |t|
t.files = ['features//*.feature', 'features//*.rb']
end
But I cannot see anything in 'steps' and 'step defs'.
This links don't open, when I click.
Screenshot: http://www.diigo.com/item/image/1si9r/km62

Differences between Tables

@dalton and I have just realized that yard-cucumber automatically converts the first item in a table to be a header. However, in many cases, this will not be true.

Using an example similar to the (currently beta) Cucumber Book, you can say things like:

Given my shopping cart contains the following items:
    | cheese  |
    | onion   |
    | sauce   |
    | oranges |

This would cause cheese to be a header in the documentation, when in reality, it's just a list of items.

I cannot come up with a way to distinguish a list of items from a table with a header.

One thought would maybe to examine the step definitions and look if they call 'raw' on the table? That's what I do in order to extract each item from the list, as opposed to having a set of hashes.

Thoughts?

YARD Server does not display features on first load

I found that when I visit:
http:://localhost:8808/requirements
No data is present. When I select the search field or some other field or option the data gets loaded. So it seems that these pages are missing from whatever loads the data when visited.

License missing from gemspec

Some companies will only use gems with a certain license.
The canonical and easy way to check is via the gemspec
via e.g.

spec.license = 'MIT'
# or
spec.licenses = ['MIT', 'GPL-2']

There is even a License Finder to help companies ensure all gems they use
meet their licensing needs. This tool depends on license information being available in the gemspec.
Including a license in your gemspec is a good practice, in any case.

How did I find you?

I'm using a script to collect stats on gems, originally looking for download data, but decided to collect licenses too,
and make issues for missing ones as a public service :)
https://gist.github.com/bf4/5952053#file-license_issue-rb-L13 So far it's going pretty well

warn An error occurred while attempting to render the comments for

$ yardoc 'example/**/*.rb' 'example/**/*.feature'
[warn]: An error occurred while attempting to render the comments for: example/step_definitions/example.step.rb:36 
Files:          18
Modules:         4 (    4 undocumented)
Classes:         5 (    4 undocumented)
Constants:       3 (    3 undocumented)
Methods:         2 (    1 undocumented)
 14.29% documented

Step definitions fail to map when methods/variables are used in definitions

When a step definition contains the result of a method or the value of a variable, the step definitions will not match to the steps. This is commonly the case when using the Pickle gem or any other use of a method result or variable.

Given /^the first #{method_call}$/ do |model|
  # ... do something with the model
end

Ability to create references to to step definition, tag, and feature

This is maybe already supported, but haven't found a way how to do
it. If I want to reference another step or tag or feature within
cucumber documentation, how can I do it? Let's look at the example:

#
# @see #Step::other_step
# @see #Tag::@web
# @see #Feature::"Ajax support feature"
# Look at {Sign_in_step this} step for more info about signing
# {Feature::"Login feature for guests" This} feature is ...
  • those proposals are only my guessing, not sure if that is the best
    way, how to implement it.
  • it would be awesome to use this references either in feature/scenario
    scope or in step definitions or to be as generous as possible - wherever
  • even from helper ruby libraries, to be able but reference, where such
    method has been used:
# ...
# @note This method is use in {Step::"Some Sign In Step"}
#
def sign_in
...
end

Step Definitions support @param tags

# @param [String] type these type: [php, java] are supported
# @param [String] place the place from [local, there, somewhere]
Given /I create the "[^"]+" app at "[^"]+"/
pending
end

Features by Directory do not appear in YARD Server

Setting up YARD to show directories will not have them appear when YARD Server is run:

  1. Update YARD Config to allow directories:
:"yard-cucumber": 
  menus: [ 'features', 'directories', 'tags', 'steps', 'step definitions' ]
  1. Run `yardoc 'example/*/'
  2. Run yard server

incompatible character encodings: UTF-8 and ASCII-8BIT (Encoding::CompatibilityError)

$ yardoc 'features//*.rb' 'features//*.feature'

/home/davidm/.rvm/gems/ruby-1.9.2-p180@mobile/gems/yard-0.8.1/lib/yard/templates/helpers/html_syntax_highlight_helper.rb:32:in `block in html_syntax_highlight_ruby_ripper': incompatible character encodings: UTF-8 and ASCII-8BIT (Encoding::CompatibilityError)
    from /home/davidm/.rvm/gems/ruby-1.9.2-p180@mobile/gems/yard-0.8.1/lib/yard/templates/helpers/html_syntax_highlight_helper.rb:24:in `each'
    from /home/davidm/.rvm/gems/ruby-1.9.2-p180@mobile/gems/yard-0.8.1/lib/yard/templates/helpers/html_syntax_highlight_helper.rb:24:in `html_syntax_highlight_ruby_ripper'
    from /home/davidm/.rvm/gems/ruby-1.9.2-p180@mobile/gems/yard-0.8.1/lib/yard/templates/helpers/html_syntax_highlight_helper.rb:13:in `html_syntax_highlight_ruby'
    from /home/davidm/.rvm/gems/ruby-1.9.2-p180@mobile/gems/yard-0.8.1/lib/yard/templates/helpers/html_helper.rb:161:in `html_syntax_highlight'
    from /home/davidm/.rvm/gems/ruby-1.9.2-p180@mobile/gems/yard-cucumber-2.1.7/lib/templates/default/steptransformers/html/transformers.erb:35:in `block in _erb_cache_50'
    from /home/davidm/.rvm/gems/ruby-1.9.2-p180@mobile/gems/yard-cucumber-2.1.7/lib/templates/default/steptransformers/html/transformers.erb:3:in `each'
    from /home/davidm/.rvm/gems/ruby-1.9.2-p180@mobile/gems/yard-cucumber-2.1.7/lib/templates/default/steptransformers/html/transformers.erb:3:in `_erb_cache_50'
    from /home/davidm/.rvm/gems/ruby-1.9.2-p180@mobile/gems/yard-0.8.1/lib/yard/templates/template.rb:267:in `erb'
    from /home/davidm/.rvm/gems/ruby-1.9.2-p180@mobile/gems/yard-cucumber-2.1.7/lib/templates/default/steptransformers/html/setup.rb:29:in `stepdefinitions'
    from /home/davidm/.rvm/gems/ruby-1.9.2-p180@mobile/gems/yard-0.8.1/lib/yard/templates/template.rb:343:in `render_section'
    from /home/davidm/.rvm/gems/ruby-1.9.2-p180@mobile/gems/yard-0.8.1/lib/yard/templates/template.rb:239:in `block (2 levels) in run'
    from /home/davidm/.rvm/gems/ruby-1.9.2-p180@mobile/gems/yard-0.8.1/lib/yard/templates/template.rb:236:in `each'
    from /home/davidm/.rvm/gems/ruby-1.9.2-p180@mobile/gems/yard-0.8.1/lib/yard/templates/template.rb:236:in `block in run'
    from /home/davidm/.rvm/gems/ruby-1.9.2-p180@mobile/gems/yard-0.8.1/lib/yard/templates/template.rb:374:in `add_options'
    from /home/davidm/.rvm/gems/ruby-1.9.2-p180@mobile/gems/yard-0.8.1/lib/yard/templates/template.rb:235:in `run'
    from /home/davidm/.rvm/gems/ruby-1.9.2-p180@mobile/gems/yard-0.8.1/lib/yard/templates/template.rb:123:in `run'

Step Definitions are getting missed when parsing the step definitions because of new standard

Also, since cucumber/gherkin is now recommending parentheses around step definition regexes cucumber/common#328 , that means IDEs like RubyMine are including them with default step-def generation. They then get missed during step:>step-def matching when I switch to the older cucumber/gherkin gems to generate docs. I'm correcting for that with my script but it's a bit of a kludge. Since your gem utilizes the loaded cucumber/gherkin to generate its parsing rules, I imagine the need for that handling would go away with a yard-cucumber update.

Multiple example groups not supported

When a Scenario Outline has multiple example groups, yard-cucumber ignores all but the last example group.

e.g. the following Scenario Outline:

  Scenario Outline: Multiple Example Table
    Given that <Customer> is a valid customer
    And that the product, named '<Product>', is a valid product
    When the customer has purchased the product
    Then I expect the customer to be a member of the '<Product>' group

    Examples: Example group A
     | Customer   | Product   |
     | Customer A | Product A |

    Examples: Example group B
     | Customer   | Product   |
     | Customer B | Product A |

Gets rendered as: (copied from browser so formatting lost)

Scenario Outline: Multiple Example Table link
Given that <Customer> is a valid customer
And that the product, named '<Product>', is a valid product
When the customer has purchased the product
Then I expect the customer to be a member of the '<Product>' group
Examples
Customer    Product
Customer B  Product A

Any chance we could get support for multiple example groups?

yard server - can't get features in doc

Hi , I'm trying to use yard-cucumber
It seems to generate the doc ok (scenarios and steps seems to be in .yardoc/objects/root.data) also I need to add yard-cucumber' int theautoload_plugin` section, but when I launch the server the features (and the other ones) tab are empty.

Plugin does not work with Cucumber 2.0

$ bundle exec yardoc
[warn]: Error loading plugin 'yard-cucumber'
[warn]: Error loading plugin 'yard-cucumber'

The plugin can't work with a Cucumber 2.0 dependency. There are some bugs in Cucumber 1.3 that have only been fixed in 2.0 and later.

[warn]: Error loading plugin 'yard-cucumber'

I have installed the yard-cucumber and trying to run rake parrell test but keep getting [warn]: Error loading plugin 'yard-cucumber'

[warn]: Error loading plugin 'yard-cucumber'
rake aborted!
Don't know how to build task 'parallel:'
/Users/diana/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in eval' /Users/diana/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in

'

NoMethodError: undefined method `parameters' for #<yardoc class CustomerUsageBehavior>

Repro:

CustomerUsageBehavior = Struct.new(:weight, :days, :time, :location, :other_party, :usage_type, :direction, :quantity)

Result:

[error]: Exception occurred while generating 'CustomerUsageBehavior.html'
[error]: NoMethodError: undefined method `parameters' for #<yardoc class CustomerUsageBehavior>
[error]: Stack trace:
        /usr/local/lib/ruby/gems/1.8/gems/yard-0.7.1/lib/yard/code_objects/base.rb:328:in `method_missing'
        /usr/local/lib/ruby/gems/1.8/gems/yard-0.7.1/templates/default/tags/html/tag.erb:11:in `_erb_cache_41'
        /usr/local/lib/ruby/gems/1.8/gems/yard-0.7.1/templates/default/tags/html/tag.erb:3:in `each'
        /usr/local/lib/ruby/gems/1.8/gems/yard-0.7.1/templates/default/tags/html/tag.erb:3:in `_erb_cache_41'
        /usr/local/lib/ruby/gems/1.8/gems/yard-0.7.1/lib/yard/templates/template.rb:238:in `send'
        /usr/local/lib/ruby/gems/1.8/gems/yard-0.7.1/lib/yard/templates/template.rb:238:in `erb'

Dropdown menu is no dropdown anymore

Since I have installed yard-cucumber (and it really is nice, thank you!), the dropdown menu on the upper right (with Features, Tags, Steps, etc.) doesn't drop down anymore but it loads a new page with the dropdown content. Any idea why this happens? Thanks.

Can't get features to be displayed in docs

Hi!

I'm giving Cucumber-in-the-yard a try. However features do not appear in the docs generated by $ rake yard. The "features" tab is not even displayed (but there is a "features" entry in the method list). Am I missing something?

Thank you!

Julien.

Provide support for Cucumber 1.3.1

Cucumber 1.3.1 (which requires Gherkin 2.12.0), yardoc returns errors on Feature files, effectively breaking Yard-Cucumber. These errors don't exist with Cucumber 1.2.5 and Gherkin 2.11.8.

"uninitialized constant YARD" when yard gem not in Gemfile

I had a Gemfile with gem 'yard-cucumber' in it, which pulls in the yard dependency, but when I ran rake yard, I would get the error:

rake aborted!
uninitialized constant YARD
/home/haxney/.rvm/gems/ruby-2.0.0-p247@railskating/gems/yard-cucumber-2.3.2/lib/yard/code_objects/cucumber/base.rb:1:in `<top (required)>'
/home/haxney/.rvm/gems/ruby-2.0.0-p247@railskating/gems/yard-cucumber-2.3.2/lib/yard-cucumber.rb:8:in `<top (required)>'
/home/haxney/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'

I found that either adding a require 'yard' to the top of yard-cucumber-2.3.2/lib/yard/code_objects/cucumber/base.rb:1 or adding gem 'yard' to my Gemfile solved the problem, but yard-cucumber should be able to function even without the user having to list gem 'yard' in their Gemfile.

undefined method `inheritance_tree' for #<yardoc steptransformers requirements::step_transformers>

Crash running city on crabgrass (git clone git://labs.riseup.net/crabgrass.git) with:
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]
yard (0.6.4)
cucumber-in-the-yard (1.7.8, 1.7.7)

Below:

  1. rake task
  2. 'rake yard --trace' output
  3. gem list

+++
#1) rake task

YARD::Rake::CitydocTask.new do |t|
t.files = ['features//*', 'lib//*.rb']
t.options = ['--out', 'yardoc']
end
#2) result

~/Sites/crabgrass (master)
$ rake yard --trace
(in /Users/brandon/Sites/crabgrass)
** Invoke yard (first_time)
** Execute yard
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_fields using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_fields using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_fields using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_fields using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_fields using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_fields using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_fields using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_fields using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_model using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_fields using an empty string for value.
warn: StepTransformer#find_value_for_constant : Could not find the CONSTANT capture_fields using an empty string for value.
warn: in YARD::Handlers::Ruby::Legacy::MethodHandler: Undocumentable method defined on object instance
warn: in file 'lib/zip/zip.rb':1258:

 1258: def buf.read(count)

warn: In file README':69: Cannot resolve link to Development from text: [warn]: {Development overview}... [warn]: In fileREADME':74: Cannot resolve link to Running from text:
warn: {Running and writing Crabgrass tests}...
warn: In file README':79: Cannot resolve link to Code from text: [warn]: {Code changes}... [warn]: In fileREADME':74: Cannot resolve link to Running from text:
warn: {Running and writing Crabgrass tests}...
warn: In file README':69: Cannot resolve link to Development from text: [warn]: {Development overview}... [warn]: In fileREADME':74: Cannot resolve link to Running from text:
warn: {Running and writing Crabgrass tests}...
warn: In file README':79: Cannot resolve link to Code from text: [warn]: {Code changes}... [warn]: In fileREADME':74: Cannot resolve link to Running from text:
warn: {Running and writing Crabgrass tests}...
warn: In file lib/extension/core.rb':4: Cannot resolve link to 1 from text: [warn]: ...{1 => 2, 2 => 4, 3 => 6}... [warn]: In filelib/extension/core.rb':162: Cannot resolve link to 1 from text:
warn: ...{1 => 2, 2 => 4, 3 => 6}...
warn: In file `(unknown)':5: Cannot resolve link to “user”=>“red”, from text:

warn: In file `features/step_definitions/common/pickle_helper.rb':5: Cannot resolve link to “user”=>“red”, from text:

rake aborted!
undefined method inheritance_tree' for #<yardoc steptransformers requirements::step_transformers> /Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/code_objects/base.rb:325:inmethod_missing'
/Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/registry.rb:271:in resolve' /Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/helpers/html_helper.rb:219:inlink_object'
/Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/helpers/base_helper.rb:63:in linkify' /Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/helpers/html_helper.rb:192:inresolve_links'
/Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/helpers/html_helper.rb:180:in gsub' /Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/helpers/html_helper.rb:180:inresolve_links'
/Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/helpers/html_helper.rb:49:in htmlify' /Library/Ruby/Gems/1.8/gems/yard-0.6.4/templates/default/docstring/html/text.erb:1:in_erb_cache_25'
/Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:238:in send' /Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:238:inerb'
/Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:316:in render_section' /Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:210:inrun'
/Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:207:in each' /Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:207:inrun'
/Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:345:in add_options' /Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:206:inrun'
/Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:228:in yieldall' /Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:359:inwith_section'
/Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:228:in yieldall' /Library/Ruby/Gems/1.8/gems/yard-0.6.4/templates/default/docstring/html/index.erb:3:in_erb_cache_24'
/Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:238:in send' /Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:238:inerb'
/Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:316:in render_section' /Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:210:inrun'
/Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:207:in each' /Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:207:inrun'
/Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:345:in add_options' /Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:206:inrun'
/Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:91:in run' /Library/Ruby/Gems/1.8/gems/cucumber-in-the-yard-1.7.8/lib/templates/default/steptransformers/html/transformers.erb:21:in_erb_cache_50'
/Library/Ruby/Gems/1.8/gems/cucumber-in-the-yard-1.7.8/lib/templates/default/steptransformers/html/transformers.erb:1:in each' /Library/Ruby/Gems/1.8/gems/cucumber-in-the-yard-1.7.8/lib/templates/default/steptransformers/html/transformers.erb:1:in_erb_cache_50'
/Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:238:in send' /Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:238:inerb'
/Library/Ruby/Gems/1.8/gems/cucumber-in-the-yard-1.7.8/lib/templates/default/steptransformers/html/setup.rb:29:in stepdefinitions' /Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:314:insend'
/Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:314:in render_section' /Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:210:inrun'
/Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:207:in each' /Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:207:inrun'
/Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:345:in add_options' /Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:206:inrun'
/Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:91:in run' /Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:319:inrender_section'
/Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:210:in run' /Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:207:ineach'
/Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:207:in run' /Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:345:inadd_options'
/Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:206:in run' /Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:228:inyieldall'
/Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:359:in with_section' /Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:228:inyieldall'
/Library/Ruby/Gems/1.8/gems/yard-0.6.4/templates/default/layout/html/layout.erb:20:in _erb_cache_5' /Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:238:insend'
/Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:238:in erb' /Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:316:inrender_section'
/Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:210:in run' /Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:207:ineach'
/Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:207:in run' /Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:345:inadd_options'
/Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:206:in run' /Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:91:inrun'
/Library/Ruby/Gems/1.8/gems/yard-0.6.4/templates/default/fulldoc/html/setup.rb:34:in serialize' /Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/engine.rb:115:inwith_serializer'
/Library/Ruby/Gems/1.8/gems/yard-0.6.4/templates/default/fulldoc/html/setup.rb:33:in serialize' /Library/Ruby/Gems/1.8/gems/cucumber-in-the-yard-1.7.8/lib/templates/default/fulldoc/html/setup.rb:25:ininit'
/Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:144:in initialize' /Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:86:insend'
/Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:86:in new' /Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/template.rb:91:inrun'
/Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/templates/engine.rb:103:in generate' /Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/cli/yardoc.rb:297:inrun_generate'
/Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/cli/yardoc.rb:212:in run' /Library/Ruby/Gems/1.8/gems/yard-0.6.4/lib/yard/rake/yardoc_task.rb:64:indefine'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in call' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:inexecute'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in each' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:inexecute'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in invoke_with_call_chain' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:insynchronize'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in invoke_with_call_chain' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:ininvoke'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in invoke_task' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:intop_level'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in each' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:intop_level'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in standard_exception_handling' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:intop_level'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in run' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:instandard_exception_handling'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in run' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/bin/rake:31 /usr/bin/rake:19:inload'
/usr/bin/rake:19
#3) gem list

abstract (1.0.0)
actionmailer (2.3.5, 2.2.2, 2.1.0, 1.3.6)
actionpack (3.0.3, 2.3.5, 2.2.2, 2.1.0, 1.13.6)
actionwebservice (1.2.6)
activemodel (3.0.3)
activerecord (2.3.5, 2.2.2, 2.1.0, 1.15.6)
activeresource (2.3.5, 2.2.2, 2.1.0)
activesupport (3.0.3, 2.3.5, 2.2.2, 2.1.0, 1.4.4)
acts_as_ferret (0.4.3)
authlogic (2.1.3)
autotest (4.4.6, 4.1.4)
autotest-fsevent (0.2.4)
autotest-growl (0.2.9, 0.1.7)
autotest-rails (4.1.0)
bcrypt-ruby (2.1.2)
bluecloth (2.0.7)
bret-watircraft (0.5.0)
builder (2.1.2)
bundler (1.0.3)
capistrano (2.5.2)
capybara (0.2.0)
cgi_multipart_eof_fix (2.5.0)
ci_reporter (1.6.0)
columnize (0.3.1)
commonwatir (1.6.5)
configuration (1.1.0)
cucumber (0.9.2, 0.8.0, 0.6.1)
cucumber-in-the-yard (1.7.8, 1.7.7)
cucumber-rails (0.2.2)
culerity (0.2.6)
daemons (1.0.10)
database_cleaner (0.4.0)
devise (0.4.1)
diff-lcs (1.1.2)
dnssd (0.6.0)
erubis (2.6.6)
eventmachine (0.12.10)
fastthread (1.0.1)
fcgi (0.8.7)
ferret (0.11.6)
ffi (0.5.4)
firewatir (1.6.5)
flog (2.5.0)
gem_plugin (0.2.3)
gherkin (2.3.2, 2.2.9, 1.0.30)
git (1.2.5)
haml (2.2.16)
hanna (0.1.12)
heckle (1.4.3)
heroku (1.10.14, 1.7.1, 1.7.0, 1.6.5)
highline (1.5.0)
hoe (2.6.0, 2.4.0)
hpricot (0.6.164)
i18n (0.5.0)
indy (0.1.5)
jeweler (1.4.0)
jrails (0.6.0)
json (1.4.6, 1.2.0)
json_pure (1.4.3, 1.2.0)
launchy (0.3.5)
libxml-ruby (1.1.2)
linecache (0.43)
memcached (0.19.2)
mime-types (1.16)
minitest (2.0.2)
mocha (0.9.8)
mongrel (1.1.5)
needle (1.3.0)
net-scp (1.0.1)
net-sftp (2.0.1, 1.1.1)
net-ssh (2.0.4, 1.1.4)
net-ssh-gateway (1.0.0)
nifty-generators (0.3.0)
nokogiri (1.4.3.1, 1.4.1)
paperclip (2.3.1.1)
ParseTree (3.0.6)
polyglot (0.2.9)
prawn (0.8.4)
prawn-core (0.8.4)
prawn-layout (0.8.4)
prawn-security (0.8.4)
rack (1.2.1, 1.0.1)
rack-mount (0.6.13)
rack-test (0.5.7, 0.5.3)
rails (2.3.5, 2.2.2, 2.1.0, 1.2.6)
railties (3.0.3)
rake (0.8.7, 0.8.3)
rb-appscript (0.5.3)
rcov (0.9.9)
rdoc (2.5.8, 2.5.3, 2.3.0)
rdoc-data (2.5.3)
RedCloth (4.1.1)
redgreen (1.2.2)
rest-client (1.6.1, 1.3.0, 1.2.0)
rspec (2.4.0, 2.0.1, 1.2.9)
rspec-core (2.4.0, 2.0.1)
rspec-expectations (2.4.0, 2.0.1)
rspec-mocks (2.4.0, 2.0.1)
rspec-prof (0.0.3)
rspec-rails (2.4.1, 1.2.9)
rubigen (1.5.2)
ruby-debug (0.10.3)
ruby-debug-base (0.10.3)
ruby-debug-ide (0.4.9)
ruby-openid (2.1.2)
ruby-prof (0.9.2)
ruby-yadis (0.3.4)
ruby2ruby (1.2.5)
ruby_parser (2.0.5)
rubyforge (2.0.3)
rubygems-update (1.4.2, 1.3.7, 1.3.6, 1.3.5)
RubyInline (3.8.6)
rubynode (0.1.5)
s4t-utils (1.0.4)
safariwatir (0.3.7)
sc-core-ext (1.2.1)
selenium-webdriver (0.0.13)
sequel (3.15.0, 3.0.0)
sexp_processor (3.0.5)
shotgun (0.6)
simplest_auth (0.2.6)
sinatra (1.0, 0.9.2)
spork (0.8.4, 0.7.5)
sqlite3-ruby (1.2.5, 1.2.4)
syntax (1.0.0)
sys-uname (0.8.5)
taglob (1.1.2)
taps (0.3.13, 0.2.23)
taza (0.8.7)
term-ansicolor (1.0.5, 1.0.4)
termios (0.9.4)
thor (0.14.6, 0.9.9)
treetop (1.4.3)
trollop (1.16.2)
tzinfo (0.3.23)
user-choices (1.1.6)
uwchat (0.1.2)
warden (0.5.3)
will_paginate (2.3.12)
xml-simple (1.0.12)
xmpp4r (0.4)
yard (0.6.4)
ZenTest (4.4.2)

YARD::CLI::Yardoc don't parse feature files

I have many subdirs within project (git submodules).
So I want Rake task to generate documentation within given directory. That is why I didn't use standard YARD::Rake::YardocTask.new.

Rakefile:

require 'yard'
desc 'update'
task :update, :project do |_, args|
  dir = args[:project]
  Dir.chdir(dir) do
    YARD::CLI::Yardoc.new do |t|
      t.files = [
        'features/**/*.feature',
        'features/step_definitions/**/*.rb',
        'lib/**/*.rb'
      ]
    end.run
  end
end

Gemfile:

source 'http://rubygems.org'
gem 'unicorn', '~> 4.8'
gem 'sinatra', '~> 1.4'
gem 'rake', '~> 10.1'
gem 'yard'
gem 'yard-cucumber', '~> 2.3'

But that didn't parse *.feature files. Is there any way to define rake task with ability to parse *.feature files?

Steps that call other steps display that information.

It's quite often case, when one step is calling another one. I'm
thinking of having a tree of hierarchy of calling steps.

Given /I create something/ do
  step %Q<I create something via rest api>
end

And as the result, there might be a kinda tree with links, what other
steps are called. Moreover, I can imagine to have a graphviz picture for
better visualization, but I realize, this is quite complex issue.

Online Example

It would be great to see an online example of this in action.

Invalid configuration file

After install yard-cucumber YARD stared write error:

yardoc 'features/attach_file/cms_delete_attach_file/cms_delete_attach_file.feature'
[error]: Invalid configuration file, using default options.
[warn]: Syntax error in features/attach_file/cms_delete_attach_file/cms_delete_attach_file.feature:(2,8): syntax error, unexpected ':', expecting end-of-input
[warn]: ParserSyntaxError: syntax error in features/attach_file/cms_delete_attach_file/cms_delete_attach_file.feature:(2,8): syntax error, unexpected ':', expecting end-of-input
[warn]: Stack trace:
/home/luvs/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/yard-0.8.6.1/lib/yard/parser/ruby/ruby_parser.rb:542:in on_parse_error' /home/luvs/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/yard-0.8.6.1/lib/yard/parser/ruby/ruby_parser.rb:50:inparse'
/home/luvs/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/yard-0.8.6.1/lib/yard/parser/ruby/ruby_parser.rb:50:in parse' /home/luvs/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/yard-0.8.6.1/lib/yard/parser/ruby/ruby_parser.rb:15:inparse'
/home/luvs/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/yard-0.8.6.1/lib/yard/parser/source_parser.rb:439:in parse' /home/luvs/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/yard-0.8.6.1/lib/yard/parser/source_parser.rb:44:inblock in parse'

Files: 0
Modules: 0 ( 0 undocumented)
Classes: 0 ( 0 undocumented)
Constants: 0 ( 0 undocumented)
Methods: 0 ( 0 undocumented)
0.00% documented

Gem list:
bundler (1.3.5)
cucumber (1.3.2)
diff-lcs (1.2.4)
gherkin (2.12.0)
io-console (0.4.2)
json (1.8.0, 1.7.7)
log4r (1.1.10)
minitest (5.0.3, 4.3.2)
multi_json (1.7.4)
nokogiri (1.5.9)
parallel (0.6.5)
parallel_tests (0.13.3)
plugin_manager (1.5)
psych (2.0.0)
rake (10.0.4, 0.9.6)
rdoc (4.0.1, 4.0.0)
rspec (2.13.0)
rspec-core (2.13.1)
rspec-expectations (2.13.0)
rspec-mocks (2.13.1)
ruby-oci8 (2.1.5)
ruby-plsql (0.5.0)
rubygems-update (2.0.3)
test-unit (2.5.5, 2.0.0.0)
thor (0.18.1)
yard (0.8.6.1)
yard-cucumber (2.2.3)
zip (2.0.2)

Step Definitions and Step Transforms with Constants sometimes does not match

Step Definitions and Step Transforms that are loaded before the constants that they depend on will not match to the steps and matches within that step because they have not unpacked all their constants.

  1. Unilaterally move all Step Definitions and Step Transforms to the back of line before Feature files.
  2. Instead of iterating over all the constants ask the Registry for one by name. When it is not present move the step object to the back of the line. If the CONSTANT is never added, still add the step definition and step transform with a message that there may not be matches present because there are unmatched constants within the step object.

'Step Definitions' menu doesn't deal with transforms properly

In the example project, the step Given /^that (#{CUSTOMER}) is a valid customer$/ is displayed normally on the Step Definitions list (on the page /requirements/step_transformers.html#step_definitions).

If you enable the 'step definitions' menu by editing the ~/.yard/config file with something like the following:

:"yard-cucumber":
  menus: [ 'features', 'tags', 'steps', 'step definitions' ]

Then in the 'Step Defs' dropdown, that CUSTOMER constant is fully expanded, so it is displayed as:

Given /^that ((?:(?:an?|the|(?:first|second|third)) customer|teddy bear)) is a valid customer$/

Some of my transforms run to 40 lines of code, and all that code is shown in the dropdown, for every step definition that references it. It would be great if the dropdown displayed the step def in the same way as on the 'Step Definitions' page.

Error with Gherkin 2.4.0

Gherking recently Gherkin::Formatter::Model::PyString with Gherkin::Formatter::Model::DocString:

yard-cucumber has a reference to Gherkin::Formatter::Model::PyString:

This causes an error when using yard-cucumber with Gherkin 2.4.0:

gems/yard-cucumber-2.1.0/lib/cucumber/city_builder.rb:262:in `step': uninitialized constant Gherkin::Formatter::Model::PyString (NameError)

Step Definitions create links based on YARD references (e.g. links to classes and methods)

Another feature request is to support references to other part of
documentation, which are cucumber helpers, defined somewhere in the
project, but documentation is generated together with cucumber.

# Function creates object
# @see NS::MyCustomHelper::rest#do_create
#
# also via yardoc reference style:
#
# For details look at {NS::MyCustomHelper::rest#do_create}
#
Given /I create something via rest api/ do
$helper.rest.do_create
end
  • both tags are supported directly by yardoc.
  • currently, there is only warn message and no output

Problem: features & tags menu open & close immediately

When i click in Features or Tags links the menu show & hide immediately.

<a href="feature_list.html" id="feature_list_link" class="full_list_link">
    Features
</a>

and i have a javascript error:

link.attr("title") is undefined
[Parar en este error]   

var fullName = link.attr('title').split(' ')[0];

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.