aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorJosh Crowder <josh@seriousfox.co.uk>2013-08-15 11:30:01 +0100
committerJosh Crowder <josh@seriousfox.co.uk>2013-08-15 11:30:01 +0100
commitf3073773a31d2a6a4f3946dc706a31400c0f53a0 (patch)
tree181ce04a4bfc26dd2753cfe52775c13ad9a3cee9 /railties
parente90f0e0eb68825b7a07e2f468272a138107154c3 (diff)
downloadrails-f3073773a31d2a6a4f3946dc706a31400c0f53a0.tar.gz
rails-f3073773a31d2a6a4f3946dc706a31400c0f53a0.tar.bz2
rails-f3073773a31d2a6a4f3946dc706a31400c0f53a0.zip
Adding LESS to rake notes
Diffstat (limited to 'railties')
-rw-r--r--railties/CHANGELOG.md4
-rw-r--r--railties/lib/rails/source_annotation_extractor.rb2
-rw-r--r--railties/test/application/rake/notes_test.rb2
3 files changed, 7 insertions, 1 deletions
diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md
index 2f41d92f55..cc9722e59c 100644
--- a/railties/CHANGELOG.md
+++ b/railties/CHANGELOG.md
@@ -1,3 +1,7 @@
+* rake notes now searches *.less files
+
+ *Josh Crowder*
+
* Generate nested route for namespaced controller generated using
`rails g controller`.
Fixes #11532.
diff --git a/railties/lib/rails/source_annotation_extractor.rb b/railties/lib/rails/source_annotation_extractor.rb
index 290634290f..b806b922b7 100644
--- a/railties/lib/rails/source_annotation_extractor.rb
+++ b/railties/lib/rails/source_annotation_extractor.rb
@@ -82,7 +82,7 @@ class SourceAnnotationExtractor
case item
when /\.(builder|rb|coffee|rake)$/
/#\s*(#{tag}):?\s*(.*)$/
- when /\.(css|scss|sass|js)$/
+ when /\.(css|scss|sass|less|js)$/
/\/\/\s*(#{tag}):?\s*(.*)$/
when /\.erb$/
/<%\s*#\s*(#{tag}):?\s*(.*?)\s*%>/
diff --git a/railties/test/application/rake/notes_test.rb b/railties/test/application/rake/notes_test.rb
index 9a92c5f6ff..46ed500167 100644
--- a/railties/test/application/rake/notes_test.rb
+++ b/railties/test/application/rake/notes_test.rb
@@ -25,6 +25,7 @@ module ApplicationTests
app_file "app/assets/stylesheets/application.css", "// TODO: note in css"
app_file "app/assets/stylesheets/application.css.scss", "// TODO: note in scss"
app_file "app/assets/stylesheets/application.css.sass", "// TODO: note in sass"
+ app_file "app/assets/stylesheets/application.css.less", "// TODO: note in less"
app_file "app/controllers/application_controller.rb", 1000.times.map { "" }.join("\n") << "# TODO: note in ruby"
app_file "lib/tasks/task.rake", "# TODO: note in rake"
@@ -48,6 +49,7 @@ module ApplicationTests
assert_match(/note in css/, output)
assert_match(/note in scss/, output)
assert_match(/note in sass/, output)
+ assert_match(/note in less/, output)
assert_match(/note in rake/, output)
assert_equal 10, lines.size