Prevents yard from trying to interpret the README.rdoc as a ruby source file #991

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
Contributor

miketheman commented Jun 17, 2012

When installing, YARD produces a non-threatening error:

Building YARD (yri) index for fog-1.3.1...
[error]: ParserSyntaxError: syntax error in `README.rdoc`:(3,47): syntax error, unexpected tIDENTIFIER, expecting keyword_do or '{' or '('
[error]: Stack trace:
    /Users/michael/.rvm/gems/ruby-1.9.3-p194@10genchef/gems/yard-0.7.5/lib/yard/parser/ruby/ruby_parser.rb:517:in `on_parse_error'
    /Users/michael/.rvm/gems/ruby-1.9.3-p194@10genchef/gems/yard-0.7.5/lib/yard/parser/ruby/ruby_parser.rb:49:in `parse'
    /Users/michael/.rvm/gems/ruby-1.9.3-p194@10genchef/gems/yard-0.7.5/lib/yard/parser/ruby/ruby_parser.rb:49:in `parse'
    /Users/michael/.rvm/gems/ruby-1.9.3-p194@10genchef/gems/yard-0.7.5/lib/yard/parser/ruby/ruby_parser.rb:15:in `parse'
    /Users/michael/.rvm/gems/ruby-1.9.3-p194@10genchef/gems/yard-0.7.5/lib/yard/parser/source_parser.rb:438:in `parse'
    /Users/michael/.rvm/gems/ruby-1.9.3-p194@10genchef/gems/yard-0.7.5/lib/yard/parser/source_parser.rb:361:in `parse_in_order'

According to Yard setup, moving the file behind a "-" will prevent it from being compiled as ruby source code.

So it's either move this there, or edit the README to not terminate lines with colons. This seems easier.

Owner

geemus commented Jun 18, 2012

@miketheman - thanks for the detailed report. Would you be up for helping out with a pull request to remove the colons so that the README will be more conformant? Thanks!

Contributor

miketheman commented Jun 19, 2012

Sure - I'll try to take a stab at this in the next couple of days.

Owner

geemus commented Jun 20, 2012

@miketheman - sounds great, just let me know if you have questions or need help with anything.

Contributor

miketheman commented Jul 7, 2012

Was going to take a stab at this again today, and cleared out working environment to start with a fresh mind.

Now, it seems like even a rake/bundle exec rake fails early, with:

$ bundle exec rake --trace
** Invoke default (first_time)
** Invoke test (first_time)
** Execute test
** Invoke mock_tests (first_time)
** Execute mock_tests

export FOG_MOCK=true && bundle exec spec spec
/Users/michael/Dropbox/code/github/miketheman/fog/spec/spec_helper.rb:1:in `require': cannot load such file -- rspec (LoadError)
    from /Users/michael/Dropbox/code/github/miketheman/fog/spec/spec_helper.rb:1:in `<top (required)>'
    from /Users/michael/Dropbox/code/github/miketheman/fog/spec/core/current_machine_spec.rb:1:in `require'
    from /Users/michael/Dropbox/code/github/miketheman/fog/spec/core/current_machine_spec.rb:1:in `<top (required)>'
    from /Users/michael/.rvm/gems/ruby-1.9.3-p194@fog/gems/rspec-1.3.2/lib/spec/runner/example_group_runner.rb:15:in `load'
    from /Users/michael/.rvm/gems/ruby-1.9.3-p194@fog/gems/rspec-1.3.2/lib/spec/runner/example_group_runner.rb:15:in `block in load_files'
    from /Users/michael/.rvm/gems/ruby-1.9.3-p194@fog/gems/rspec-1.3.2/lib/spec/runner/example_group_runner.rb:14:in `each'
    from /Users/michael/.rvm/gems/ruby-1.9.3-p194@fog/gems/rspec-1.3.2/lib/spec/runner/example_group_runner.rb:14:in `load_files'
    from /Users/michael/.rvm/gems/ruby-1.9.3-p194@fog/gems/rspec-1.3.2/lib/spec/runner/options.rb:134:in `run_examples'
    from /Users/michael/.rvm/gems/ruby-1.9.3-p194@fog/gems/rspec-1.3.2/lib/spec/runner/command_line.rb:9:in `run'
    from /Users/michael/.rvm/gems/ruby-1.9.3-p194@fog/gems/rspec-1.3.2/bin/spec:5:in `<top (required)>'
    from /Users/michael/.rvm/gems/ruby-1.9.3-p194@fog/bin/spec:23:in `load'
    from /Users/michael/.rvm/gems/ruby-1.9.3-p194@fog/bin/spec:23:in `<main>'
rake aborted!
Command failed with status (1): [export FOG_MOCK=true && bundle exec spec s...]
/Users/michael/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/file_utils.rb:53:in `block in create_shell_runner'
/Users/michael/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `call'
/Users/michael/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `sh'
/Users/michael/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:39:in `sh'
/Users/michael/Dropbox/code/github/miketheman/fog/Rakefile:64:in `tests'
/Users/michael/Dropbox/code/github/miketheman/fog/Rakefile:86:in `block in <top (required)>'
/Users/michael/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/Users/michael/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/Users/michael/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/Users/michael/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/Users/michael/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/michael/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/michael/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/michael/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/Users/michael/Dropbox/code/github/miketheman/fog/Rakefile:59:in `block in <top (required)>'
/Users/michael/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/Users/michael/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/Users/michael/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/Users/michael/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/Users/michael/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/michael/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/michael/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/michael/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `block in invoke_prerequisites'
/Users/michael/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `each'
/Users/michael/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/Users/michael/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:157:in `block in invoke_with_call_chain'
/Users/michael/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/michael/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/michael/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/Users/michael/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/Users/michael/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/Users/michael/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/Users/michael/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/Users/michael/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/michael/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/Users/michael/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/Users/michael/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/michael/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/Users/michael/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/Users/michael/.rvm/gems/ruby-1.9.3-p194@global/bin/rake:19:in `load'
/Users/michael/.rvm/gems/ruby-1.9.3-p194@global/bin/rake:19:in `<main>'
Tasks: TOP => mock_tests

In any case, it seems like the correct approach with respect to YARD as well as the common approach in the community, is to have the README in MarkDown, instead of Rdoc's MarkUp.

I'm have to make that change instead.

Owner

geemus commented Jul 9, 2012

@miketheman - sorry for the errors and stuff. Yeah, changing the README to markdown sounds like a good approach, if you want to tackle that I would appreciate it. Thanks!

@miketheman miketheman added a commit to miketheman/fog that referenced this pull request Jul 9, 2012

@miketheman miketheman As discussed in #991, this converts the readme from SimpleMarkup to M…
…arkdown
df3a068
Owner

geemus commented Jul 9, 2012

@miketheman - closing this in favor of the other (but let me know if there are additional parts not covered there.

geemus closed this Jul 9, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment