Sha256: a22fbd249565478760cd0ad78140ffb3a71e146d373d20f371ff56ce0794b82b
Contents?: true
Size: 595 Bytes
Versions: 14
Compression:
Stored size: 595 Bytes
Contents
class Jasmine::AssetPipelineMapper def self.context context = ::Rails.application.assets.context_class context.extend(::Sprockets::Helpers::IsolatedHelper) context.extend(::Sprockets::Helpers::RailsHelper) end def initialize(context = Jasmine::AssetPipelineMapper.context) @context = context end def files(src_files) src_files.map do |src_file| filename = src_file.gsub(/^assets\//, '').gsub(/\.js$/, '') @context.asset_paths.asset_for(filename, 'js').to_a.map { |p| @context.asset_path(p).gsub(/^\//, '') + "?body=true" } end.flatten.uniq end end
Version data entries
14 entries across 14 versions & 2 rubygems