a small update
This commit is contained in:
parent
45bf87a97b
commit
a198119060
@ -2,22 +2,22 @@ require 'sprockets'
|
|||||||
require 'rubygems'
|
require 'rubygems'
|
||||||
|
|
||||||
module ::Sprockets
|
module ::Sprockets
|
||||||
class << self
|
def self.find_gem_vendor_paths(options = {})
|
||||||
def find_gem_vendor_paths(options = {})
|
options = { :paths => %w{vendor lib app} }.merge(options)
|
||||||
for_types = [ options[:for] || [ 'javascripts', 'stylesheets' ] ].flatten
|
|
||||||
|
|
||||||
paths = []
|
for_types = [ options[:for] || [ 'javascripts', 'stylesheets' ] ].flatten
|
||||||
|
|
||||||
Gem::Specification.each do |gemspec|
|
paths = []
|
||||||
%w{vendor lib app}.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)
|
Gem::Specification.each do |gemspec|
|
||||||
end
|
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)
|
||||||
end
|
end
|
||||||
|
|
||||||
paths
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
paths
|
||||||
end
|
end
|
||||||
|
|
||||||
class EnvironmentWithVendoredGems < Environment
|
class EnvironmentWithVendoredGems < Environment
|
||||||
|
Loading…
Reference in New Issue
Block a user