diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-07-08 08:34:50 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-07-08 08:34:50 -0700 |
commit | 61f5fba7226f88c4f1c4f66b62e1d30de3642f6f (patch) | |
tree | 96a55d125adafe74dbbd9d149cbed2dfe57c4a9e | |
parent | daf4387f42465c742dbf740fd07c755aa389e5f9 (diff) | |
parent | dd996ad394057a003ad851ff75e6242d0c5e8fa1 (diff) | |
download | rails-61f5fba7226f88c4f1c4f66b62e1d30de3642f6f.tar.gz rails-61f5fba7226f88c4f1c4f66b62e1d30de3642f6f.tar.bz2 rails-61f5fba7226f88c4f1c4f66b62e1d30de3642f6f.zip |
Merge pull request #11367 from artemeff/sass_in_notes
handle notes in *.sass files
-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 | 4 |
3 files changed, 8 insertions, 2 deletions
diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md index b80aa944e0..cc7fecb28a 100644 --- a/railties/CHANGELOG.md +++ b/railties/CHANGELOG.md @@ -1,3 +1,7 @@ +* Fix `rake notes` to look into `*.sass` files + + *Yuri Artemev* + * Removed deprecated `Rails.application.railties.engines`. *Arun Agrawal* diff --git a/railties/lib/rails/source_annotation_extractor.rb b/railties/lib/rails/source_annotation_extractor.rb index 2cbb0a435c..290634290f 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|js)$/ + when /\.(css|scss|sass|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 3508f4225a..9a92c5f6ff 100644 --- a/railties/test/application/rake/notes_test.rb +++ b/railties/test/application/rake/notes_test.rb @@ -24,6 +24,7 @@ module ApplicationTests app_file "app/assets/javascripts/application.js", "// TODO: note in js" 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/controllers/application_controller.rb", 1000.times.map { "" }.join("\n") << "# TODO: note in ruby" app_file "lib/tasks/task.rake", "# TODO: note in rake" @@ -46,9 +47,10 @@ module ApplicationTests assert_match(/note in js/, output) assert_match(/note in css/, output) assert_match(/note in scss/, output) + assert_match(/note in sass/, output) assert_match(/note in rake/, output) - assert_equal 9, lines.size + assert_equal 10, lines.size lines.each do |line| assert_equal 4, line[0].size |