Permalink
Browse files

Do not override the original method in Sprockets::Inporter

  • Loading branch information...
1 parent ae7e785 commit b6f1773b0e565c8fe672fe9a468f92a5e62da517 Rafael Mendonça França committed Oct 27, 2012
Showing with 8 additions and 4 deletions.
  1. +8 −4 lib/sass/rails/importer.rb
View
@@ -12,21 +12,25 @@ def extensions
}.merge!(super)
end
- def find_relative(name, base, options)
+ def find_relative_with_glob(name, base, options)
if name =~ GLOB
glob_imports(name, Pathname.new(base), options)
else
- super
+ find_relative_without_glob(name, base, options)
end
end
+ alias_method :find_relative_without_glob, :find_relative
+ alias_method :find_relative, :find_relative_with_glob
- def find(name, options)
+ def find_with_glob(name, options)
if name =~ GLOB
nil # globs must be relative
else
- super
+ find_without_glob(name, options)
end
end
+ alias_method :find_without_glob, :find
+ alias_method :find, :find_with_glob
def each_globbed_file(glob, base_pathname, options)
Dir["#{base_pathname}/#{glob}"].sort.each do |filename|

0 comments on commit b6f1773

Please sign in to comment.