Skip to content

Commit

Permalink
Fixes rake annotations to search erb and builder files as well (closes
Browse files Browse the repository at this point in the history
…#9150) [m.langenberg]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7553 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
dhh committed Sep 22, 2007
1 parent 9b55e3d commit f336cf4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion activesupport/lib/active_support/dependencies.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ def new_constants_in(*descs)


class LoadingModule #:nodoc: class LoadingModule #:nodoc:
# Old style environment.rb referenced this method directly. Please note, it doesn't # Old style environment.rb referenced this method directly. Please note, it doesn't
# actualy *do* anything any more. # actually *do* anything any more.
def self.root(*args) def self.root(*args)
if defined?(RAILS_DEFAULT_LOGGER) if defined?(RAILS_DEFAULT_LOGGER)
RAILS_DEFAULT_LOGGER.warn "Your environment.rb uses the old syntax, it may not continue to work in future releases." RAILS_DEFAULT_LOGGER.warn "Your environment.rb uses the old syntax, it may not continue to work in future releases."
Expand Down
4 changes: 3 additions & 1 deletion railties/CHANGELOG
Original file line number Original file line Diff line number Diff line change
@@ -1,6 +1,8 @@
*SVN* *SVN*


* Remove web_service generator. [Koz] * Fixes rake annotations to search erb and builder files as well #9150 [m.langenberg]

* Removed web_service generator [Koz]


* Added the :all option to config.plugins that'll include the rest of the plugins not already explicitly named #9613 [fcheung]. Example: * Added the :all option to config.plugins that'll include the rest of the plugins not already explicitly named #9613 [fcheung]. Example:


Expand Down
4 changes: 2 additions & 2 deletions railties/lib/tasks/annotations.rake
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ class SourceAnnotationExtractor


if File.directory?(item) if File.directory?(item)
results.update(find_in(item)) results.update(find_in(item))
elsif item =~ /\.r(?:b|xml|js)$/ elsif item =~ /\.(builder|(r(?:b|xml|js)))$/
results.update(extract_annotations_from(item, /#\s*(#{tag}):?\s*(.*)$/)) results.update(extract_annotations_from(item, /#\s*(#{tag}):?\s*(.*)$/))
elsif item =~ /\.rhtml$/ elsif item =~ /\.(rhtml|erb)$/
results.update(extract_annotations_from(item, /<%\s*#\s*(#{tag}):?\s*(.*?)\s*%>/)) results.update(extract_annotations_from(item, /<%\s*#\s*(#{tag}):?\s*(.*?)\s*%>/))
end end
end end
Expand Down

0 comments on commit f336cf4

Please sign in to comment.