Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YardocTask#define prevents user description of task #705

Closed
RoUS opened this issue Oct 28, 2013 · 2 comments
Closed

YardocTask#define prevents user description of task #705

RoUS opened this issue Oct 28, 2013 · 2 comments

Comments

@RoUS
Copy link

RoUS commented Oct 28, 2013

The protected define method of YARD::Rake::YardocTask forces a hard-coded description of Generate YARD Documentation on the task, preventing the user or Rakefile from giving it a different description. If multiple YardocTasks are used in the Rakefile for different purposes/with different parameters, this prevents them from being described appropriately.

@lsegal
Copy link
Owner

lsegal commented Oct 30, 2013

Allowing a description parameter on the task constructor would solve this.

@DavidEGrayson
Copy link
Contributor

I haven't looked at the YARD code but think it is easier to just check Rake.application.last_comment before adding a description. This is the approach taken by RSpec:

https://github.com/rspec/rspec-core/blob/2e77a83d92eb1e661398f00359fc784da019401a/lib/rspec/core/rake_task.rb#L72

I'll make a pull request.

@lsegal lsegal closed this as completed in 729f95f Dec 9, 2013
lsegal added a commit that referenced this issue Dec 9, 2013
Fix #705 by not calling desc if ::Rake.application.last_comment is set
lsegal added a commit that referenced this issue Mar 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants