a small update

This commit is contained in:
John Bintz 2012-07-02 20:45:04 -04:00
parent 45bf87a97b
commit a198119060
1 changed files with 11 additions and 11 deletions

View File

@ -2,14 +2,15 @@ require 'sprockets'
require 'rubygems'
module ::Sprockets
class << self
def find_gem_vendor_paths(options = {})
def self.find_gem_vendor_paths(options = {})
options = { :paths => %w{vendor lib app} }.merge(options)
for_types = [ options[:for] || [ 'javascripts', 'stylesheets' ] ].flatten
paths = []
Gem::Specification.each do |gemspec|
%w{vendor lib app}.product(for_types).each do |base_dir, type|
options[:paths].product(for_types).each do |base_dir, type|
path = File.join(gemspec.gem_dir, base_dir, "assets", type.to_s)
paths << path if File.directory?(path)
@ -18,7 +19,6 @@ module ::Sprockets
paths
end
end
class EnvironmentWithVendoredGems < Environment
def initialize(*args)