diff options
author | Yves Senn <yves.senn@gmail.com> | 2013-08-15 03:36:47 -0700 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2013-08-15 03:36:47 -0700 |
commit | bd493b954c67f52354761da0c7abee9a468b4e0c (patch) | |
tree | 181ce04a4bfc26dd2753cfe52775c13ad9a3cee9 /railties | |
parent | e90f0e0eb68825b7a07e2f468272a138107154c3 (diff) | |
parent | f3073773a31d2a6a4f3946dc706a31400c0f53a0 (diff) | |
download | rails-bd493b954c67f52354761da0c7abee9a468b4e0c.tar.gz rails-bd493b954c67f52354761da0c7abee9a468b4e0c.tar.bz2 rails-bd493b954c67f52354761da0c7abee9a468b4e0c.zip |
Merge pull request #11900 from onlymejosh/add_less_to_rake_todos
Adding LESS to rake notes
Diffstat (limited to 'railties')
-rw-r--r-- | railties/CHANGELOG.md | 4 | ||||
-rw-r--r-- | railties/lib/rails/source_annotation_extractor.rb | 2 | ||||
-rw-r--r-- | railties/test/application/rake/notes_test.rb | 2 |
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 |