Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

require_tree ignore vim backup file #119

Closed
wants to merge 1 commit into from

2 participants

@gutenye

by default, require_tree include vim backup file.

please see this thread rails/rails#1863 (comment)

@josh

This isn't quite the best way to patch this, but I agree that we should do something about it.

@sstephenson wdyt about having hike ignore these type of temp files. It already ignores . files.

@josh josh closed this
@josh

Follow up hike #9

@gutenye

thanks, hike is great.

@josh

Pull request hike #10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 11, 2011
  1. @gutenye
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/sprockets/directive_processor.rb
View
4 lib/sprockets/directive_processor.rb
@@ -287,6 +287,8 @@ def process_require_directory_directive(path = ".")
Dir["#{root}/*"].sort.each do |filename|
if filename == self.file
next
+ elsif filename =~ /~$/
+ next
elsif context.asset_requirable?(filename)
context.require_asset(filename)
end
@@ -310,6 +312,8 @@ def process_require_tree_directive(path = ".")
Dir["#{root}/**/*"].sort.each do |filename|
if filename == self.file
next
+ elsif filename =~ /~$/
+ next
elsif File.directory?(filename)
context.depend_on(filename)
elsif context.asset_requirable?(filename)
Something went wrong with that request. Please try again.