Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #11367 from artemeff/sass_in_notes

handle notes in *.sass files
  • Loading branch information...
commit 61f5fba7226f88c4f1c4f66b62e1d30de3642f6f 2 parents daf4387 + dd996ad
@rafaelfranca rafaelfranca authored
View
4 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*
View
2  railties/lib/rails/source_annotation_extractor.rb
@@ -82,7 +82,7 @@ def find_in(dir)
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*%>/
View
4 railties/test/application/rake/notes_test.rb
@@ -24,6 +24,7 @@ def teardown
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 @@ def teardown
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
Please sign in to comment.
Something went wrong with that request. Please try again.