Skip to content

Commit

Permalink
Add comment= back (used by rail ties).
Browse files Browse the repository at this point in the history
And bump to version 10.1.0.beta.3
  • Loading branch information
jimweirich committed Apr 30, 2013
1 parent ba21805 commit f4ed5a6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/rake/task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,10 @@ def add_description(description)
add_comment(comment) if comment && ! comment.empty?
end

def comment=(comment)
add_comment(comment)
end

def add_comment(comment)
@comments << comment unless @comments.include?(comment)
end
Expand Down
2 changes: 1 addition & 1 deletion lib/rake/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Rake
VERSION = '10.1.0.beta.2'
VERSION = '10.1.0.beta.3'

module Version # :nodoc: all
MAJOR, MINOR, BUILD, *OTHER = Rake::VERSION.split '.'
Expand Down
6 changes: 6 additions & 0 deletions test/test_rake_task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,12 @@ def test_investigation_output
assert_match(/pre-requisites:\s*--t[23]/, out)
end

# NOTE: Rail-ties uses comment=.
def test_comment_setting
t = task(:t, :name, :rev)
t.comment = "A Comment"
assert_equal "A Comment", t.comment
end

def test_comments_with_sentences
desc "Comment 1. Comment 2."
Expand Down

0 comments on commit f4ed5a6

Please sign in to comment.