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

Version Path
rally-jasmine-1.2.0.18 lib/jasmine/asset_pipeline_mapper.rb
rally-jasmine-1.2.0.12 lib/jasmine/asset_pipeline_mapper.rb
rally-jasmine-1.2.0.11 lib/jasmine/asset_pipeline_mapper.rb
rally-jasmine-1.2.0.10 lib/jasmine/asset_pipeline_mapper.rb
rally-jasmine-1.2.0.8 lib/jasmine/asset_pipeline_mapper.rb
jasmine-1.3.0 lib/jasmine/asset_pipeline_mapper.rb
rally-jasmine-1.2.0.7 lib/jasmine/asset_pipeline_mapper.rb
rally-jasmine-1.2.0.6 lib/jasmine/asset_pipeline_mapper.rb
rally-jasmine-1.2.0.5 lib/jasmine/asset_pipeline_mapper.rb
rally-jasmine-1.2.0.4 lib/jasmine/asset_pipeline_mapper.rb
rally-jasmine-1.2.0.3 lib/jasmine/asset_pipeline_mapper.rb
rally-jasmine-1.2.0.2 lib/jasmine/asset_pipeline_mapper.rb
rally-jasmine-1.2.0.1 lib/jasmine/asset_pipeline_mapper.rb
rally-jasmine-1.2.0 lib/jasmine/asset_pipeline_mapper.rb