Closed tomatobrown closed 8 years ago
Ya.. I'm having a similar issue.. It seems like yard is not recognizing feature files, (and is still only using the ruby parser)
additionally I also tried adding
:"yard-cucumber":
menus: [ 'features', 'directories', 'tags', 'steps', 'step definitions' ]
language:
step_definitions: [ 'Given', 'When', 'Then', 'And']
to my
~/.yard/config file
too, but that doesn't help.
Not sure what we are doing wrong..
I am just hoping an issue here helps getting inputs from people who actually use yard-cucumber :)
I believe it has something to do with using Ruby 2.2.4. I wasn't having these issues with Ruby 2.17
Hmm.. I'm debugging my way through yard-cucumber2 and feel that it is the cucumber
and gherkin
versions that is the issue (lookin at some require
s here) Can you please let me know the cucumber and gherkin versions that you are using with your Ruby 2.17
as opposed to your 2.2.4
?
(i'm in Ruby 2.2.0
btw.. with cucumber (2.3.2)
and gherkin (3.2.0)
)
Sorry, I don't know what versions of cucumber and gherkin I was using with 2.1.7. But, the good news is that am no longer having this issue on a Windows machine. The commits on Mar 14, 2016 must have fixed it.
I am however seeing this issue still when running from CentOS
I believe we can close this ticket and I'll open a new one for the CentOS issue. Sound good?
@tomatobrown @ufo2mstar I'm facing same issue, can you please share your Gemfile and gemfile.lock
sure, here is my Gemfile.lock
GEM remote: https://artifact.SOMEWHERELOCAL.net/content/groups/gems/ specs: activesupport (5.0.0.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (~> 0.7) minitest (~> 5.1) tzinfo (~> 1.1) axiom-types (0.1.1) descendants_tracker (~> 0.0.4) ice_nine (~> 0.11.0) thread_safe (~> 0.3, >= 0.3.1) builder (3.2.2) childprocess (0.5.9) ffi (~> 1.0, >= 1.0.11) chronic (0.10.2) coercible (1.0.0) descendants_tracker (~> 0.0.1) concurrent-ruby (1.0.3) cucumber (2.4.0) builder (>= 2.1.2) cucumber-core (~> 1.5.0) cucumber-wire (~> 0.0.1) diff-lcs (>= 1.1.3) gherkin (~> 4.0) multi_json (>= 1.7.5, < 2.0) multi_test (>= 0.1.2) cucumber-core (1.5.0) gherkin (~> 4.0) cucumber-wire (0.0.1) descendants_tracker (0.0.4) thread_safe (~> 0.3, >= 0.3.1) diff-lcs (1.2.5) domain_name (0.5.20161021) unf (>= 0.0.5, < 1.0.0) equalizer (0.0.11) faker (1.6.6) i18n (~> 0.5) ffi (1.9.14) gherkin (4.0.0) gmail (0.6.0) gmail_xoauth (>= 0.3.0) mail (>= 2.2.1) gmail_xoauth (0.4.2) oauth (>= 0.3.6) http-cookie (1.0.3) domain_name (~> 0.5) i18n (0.7.0) ice_nine (0.11.2) inifile (3.0.0) jar_wrapper (0.1.8) zip json_spec (1.1.4) multi_json (~> 1.0) rspec (>= 2.0, < 4.0) junit_merge (0.1.2) nokogiri (>= 1.5, < 2.0) mail (2.6.4) mime-types (>= 1.16, < 4) mechanize (2.7.4) domain_name (~> 0.5, >= 0.5.1) http-cookie (~> 1.0) mime-types (>= 1.17.2, < 3) net-http-digest_auth (~> 1.1, >= 1.1.1) net-http-persistent (~> 2.5, >= 2.5.2) nokogiri (~> 1.6) ntlm-http (~> 0.1, >= 0.1.1) webrobots (>= 0.0.9, < 0.2) mime-types (2.99.3) mini_portile2 (2.1.0) minitest (5.10.1) multi_json (1.12.1) multi_test (0.1.2) net-http-digest_auth (1.4) net-http-persistent (2.9.4) net-scp (1.2.1) net-ssh (>= 2.6.5) net-ssh (3.2.0) netrc (0.11.0) nexus (1.2.3) nokogiri (1.6.8.1) mini_portile2 (~> 2.1.0) ntlm-http (0.1.1) numbers_in_words (0.4.0) activesupport oauth (0.5.1) os (0.9.6) parallel (1.9.0) parallel_tests (2.10.0) parallel rake (11.3.0) rbh-cucumber-util (1.37.3369) activesupport chronic cucumber faker gmail json_spec mechanize (= 2.7.4) nexus numbers_in_words parallel_tests teamcity_formatter virtus rest-client (2.0.0) http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 4.0) netrc (~> 0.8) rspec (3.3.0) rspec-core (~> 3.3.0) rspec-expectations (~> 3.3.0) rspec-mocks (~> 3.3.0) rspec-core (3.3.2) rspec-support (~> 3.3.0) rspec-expectations (3.3.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.3.0) rspec-mocks (3.3.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.3.0) rspec-support (3.3.0) ruby-mysql (2.9.14) rubysl-securerandom (2.0.0) rubyzip (1.2.0) selenium (0.2.11) jar_wrapper selenium-webdriver (3.0.0) childprocess (~> 0.5) rubyzip (~> 1.0) websocket (~> 1.0) syntax (1.2.1) teamcity_formatter (0.8.2) cucumber (>= 2.0) thread_safe (0.3.5) tzinfo (1.2.2) thread_safe (~> 0.1) unf (0.1.4) unf_ext unf_ext (0.0.7.2) virtus (1.0.5) axiom-types (~> 0.1) coercible (~> 1.0) descendants_tracker (~> 0.0, >= 0.0.3) equalizer (~> 0.0, >= 0.0.9) webrobots (0.1.2) websocket (1.2.3) whatlanguage (1.0.6) yard (0.9.5) yard-cucumber (2.2.3) cucumber (>= 0.7.5) gherkin (>= 2.2.9) yard (>= 0.8.1) zip (2.0.2)
PLATFORMS ruby
DEPENDENCIES chronic cucumber gmail inifile (~> 3.0.0) json_spec junit_merge net-scp nexus os parallel_tests rake rbh-cucumber-util (= 1.37.3369) rest-client (~> 2.0.0.rc2) rspec (~> 3.3.0) ruby-mysql (~> 2.9.13) rubysl-securerandom selenium selenium-webdriver syntax (~> 1.2.0) whatlanguage yard-cucumber
BUNDLED WITH 1.13.6
@tomatobrown Thanks for help.
I'm on a Windows 7 OS with: Ruby 2.2.4... yard (0.8.7.6) yard-cucumber (2.1.6) cucumber (>= 0.7.5) gherkin (>= 2.2.9) yard (>= 0.7.0)
I've copied a piece of an example scenario:
Comments that appear before the feature are associated with the feature
@scenarios Feature: Displaying Scenarios As a reader of the documentation I expect that scenario are documented correctly
Comments after the feature description belong to the background or first scenario
Background: Given this background step
@first @bvt Scenario: No Step Scenario
@second @bvt Scenario: Scenario With Steps Given this first step When this second step Then this third step
And I created a rakefile with: require 'yard'
YARD::Rake::YardocTask.new do |t| t.files = ['features/**/example.feature'] end
My output is: rake yard [warn]: Error loading plugin 'yard-cucumber' [warn]: Syntax error in
features/consumer/banner.feature
:(3,8): syntax error, unexpected ':', expecting end-o f-input [warn]: ParserSyntaxError: syntax error infeatures/consumer/banner.feature
:(3,8): syntax error, unexpected ' :', expecting end-of-input [warn]: Stack trace: C:/Ruby22/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:545:inon_parse_er ror' C:/Ruby22/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:50:in
parse' C:/Ruby22/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:50:inparse' C:/Ruby22/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:15:in
parse' C:/Ruby22/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/source_parser.rb:439:inparse' C:/Ruby22/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/source_parser.rb:44:in
block in parse'Files: 0 Modules: 0 ( 0 undocumented) Classes: 0 ( 0 undocumented) Constants: 0 ( 0 undocumented) Methods: 0 ( 0 undocumented) 100.00% documented